Skip to content
Snippets Groups Projects
Commit 116a4919 authored by bdvd's avatar bdvd Committed by Brad King
Browse files

RegularExpression: Reduce scope of 'len' variable

parent f892bacf
No related branches found
No related tags found
1 merge request!143Some minor modification suggestions
......@@ -337,7 +337,6 @@ bool RegularExpression::compile(const char* exp)
{
const char* scan;
const char* longest;
size_t len;
int flags;
if (exp == KWSYS_NULLPTR) {
......@@ -412,7 +411,7 @@ bool RegularExpression::compile(const char* exp)
//
if (flags & SPSTART) {
longest = KWSYS_NULLPTR;
len = 0;
size_t len = 0;
for (; scan != KWSYS_NULLPTR; scan = regnext(scan))
if (OP(scan) == EXACTLY && strlen(OPERAND(scan)) >= len) {
longest = OPERAND(scan);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment