Skip to content

Commit

Permalink
Merge pull request #113 from jefftrull/bugfix/clang-for-loop-analysis…
Browse files Browse the repository at this point in the history
…-warning

Clarify loop logic to satisfy a Clang warning
  • Loading branch information
jefftrull authored Sep 25, 2020
2 parents 4584e29 + 06c2ca1 commit bb34e46
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions samples/preprocess_pragma_output/preprocess_pragma_output.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ class preprocess_pragma_output_hooks
typename Context::token_type const& option,
Container const& values, typename Context::token_type const& act_token)
{
typedef typename Context::token_type token_type;
typedef typename Context::iterator_type iterator_type;

if (option.get_value() == "pp") {
Expand All @@ -140,10 +139,10 @@ class preprocess_pragma_output_hooks
Container pragma;
iterator_type end = ctx.end();
for (iterator_type it = ctx.begin(s.begin(), s.end());
it != end && token_id(*it) != T_EOF; ++it)
it != end && token_id(*it) != T_EOF;
std::advance(it, 2)) // skip over whitespace
{
pragma.push_back(*it);
it++;
}

// prepend the newly generated token sequence to the 'pending'
Expand Down

0 comments on commit bb34e46

Please sign in to comment.