File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -1440,19 +1440,18 @@ Search_sFunction::execute( SLIInterpreter* i ) const
1440
1440
1441
1441
assert ( s1 and s2 );
1442
1442
1443
- size_t p = s1->find ( *s2 );
1443
+ const size_t p = s1->find ( *s2 );
1444
1444
1445
-
1446
- if ( p == ULONG_MAX ) // what we realy want is MAX of size_type
1447
- { // as soon as C++ limits are supported
1448
- i->OStack .pop (); // (see Stroustrup 3rd ed. p. 586)
1445
+ if ( p == s1->npos )
1446
+ {
1447
+ i->OStack .pop ();
1449
1448
i->OStack .push ( i->baselookup ( i->false_name ) );
1450
1449
}
1451
1450
else
1452
1451
{
1453
1452
StringDatum* s3 = new StringDatum ();
1454
1453
1455
- size_t n = p; // number of pre elements
1454
+ const size_t n = p; // number of pre elements
1456
1455
s3->assign ( *s1, ( size_t ) 0 , n );
1457
1456
s1->erase ( 0 , n + s2->size () );
1458
1457
You can’t perform that action at this time.
0 commit comments