Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StringUtils::Tokenize: clarify, simplify and optimize #4982

Merged
merged 1 commit into from
Jul 3, 2014

Commits on Jul 3, 2014

  1. StringUtils::Tokenize: clarify, simplify and optimize

    1. pos must be string::npos when lastPos=string::npos, so no need to check pos != string::npos in the while condition. A != a || B != b = !(A==a && B==b) = !(B==b) = B != b
    2. as pos needn't be in the condition, it mayaswell be in the while loop.
    3. rename variables to reflect what they do.
    Karlson2k committed Jul 3, 2014
    Configuration menu
    Copy the full SHA
    41806d8 View commit details
    Browse the repository at this point in the history