Skip to content

Commit

Permalink
fix: avoid -Wsign-compare warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
gfx authored and yonghong-song committed May 26, 2020
1 parent 0b2f4d0 commit ec64e6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cc/frontends/b/lexer.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Lexer : public yyFlexLexer {
}
std::string text(const position& begin, const position& end) const {
std::string result;
for (size_t i = begin.line; i <= end.line; ++i) {
for (auto i = begin.line; i <= end.line; ++i) {
if (i == begin.line && i == end.line) {
result += lines_.at(i - 1).substr(begin.column - 1, end.column - begin.column);
} else if (i == begin.line && i < end.line) {
Expand Down

0 comments on commit ec64e6a

Please sign in to comment.