Skip to content

Commit

Permalink
Pos::getSnippetUpTo(): Fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed Jul 16, 2024
1 parent 9c6678d commit 3d8fa9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libutil/position.cc
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,12 @@ std::optional<std::string> Pos::getSnippetUpTo(const Pos & end) const {
if (auto source = getSource()) {

auto firstLine = LinesIterator(*source);
for (auto i = 1; i < this->line; ++i) {
for (uint32_t i = 1; i < this->line; ++i) {
++firstLine;
}

auto lastLine = LinesIterator(*source);
for (auto i = 1; i < end.line; ++i) {
for (uint32_t i = 1; i < end.line; ++i) {
++lastLine;
}

Expand Down

0 comments on commit 3d8fa9f

Please sign in to comment.