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
14401440
14411441 assert ( s1 and s2 );
14421442
1443- size_t p = s1->find ( *s2 );
1443+ const size_t p = s1->find ( *s2 );
14441444
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 ();
14491448 i->OStack .push ( i->baselookup ( i->false_name ) );
14501449 }
14511450 else
14521451 {
14531452 StringDatum* s3 = new StringDatum ();
14541453
1455- size_t n = p; // number of pre elements
1454+ const size_t n = p; // number of pre elements
14561455 s3->assign ( *s1, ( size_t ) 0 , n );
14571456 s1->erase ( 0 , n + s2->size () );
14581457
You can’t perform that action at this time.
0 commit comments