Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 3, 2010, 2:23:18 AM (14 years ago)
Author:
rgrieder
Message:

Fixed bug in SubString. "a (),b" was split in "a (" and "b" instead of "a ()" and "b".
For the sake of performance, I just inserted a few lines instead of a generic solution at the end of SL_NORMAL.
(And please don't cite Donald Knuth for that optimisation…).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/doc/src/libraries/util/SubString.cc

    r7327 r7332  
    320320                    if (!bRemoveEscapeChar)
    321321                        token += line[i];
     322                    fallBackNeighbours = 0;
    322323                }
    323324                else if(line[i] == safemodeChar)
     
    327328                    if (!bRemoveSafemodeChar)
    328329                        token += line[i];
     330                    fallBackNeighbours = 0;
    329331                }
    330332                else if(line[i] == openparenthesisChar)
     
    334336                    if (!bRemoveParenthesisChars)
    335337                        token += line[i];
     338                    fallBackNeighbours = 0;
    336339                }
    337340                else if(line[i] == commentChar)
     
    339342                    if (fallBackNeighbours > 0)
    340343                        token = token.substr(0, token.size() - fallBackNeighbours);
     344                    fallBackNeighbours = 0;
    341345                    // FINISH
    342346                    if(bAllowEmptyEntries || token.size() > 0)
     
    355359                    if (fallBackNeighbours > 0)
    356360                        token = token.substr(0, token.size() - fallBackNeighbours);
     361                    fallBackNeighbours = 0;
    357362                    // FINISH
    358363                    if(bAllowEmptyEntries || token.size() > 0)
Note: See TracChangeset for help on using the changeset viewer.