Skip to content

Commit

Permalink
remove check that is always true
Browse files Browse the repository at this point in the history
Fixes compiler warning (`-Wtype-limits`) raised because i2 is of unsigned type, so it is always non-negative.
  • Loading branch information
svigerske authored and glebbelov committed Jan 6, 2025
1 parent a6d5cb6 commit 22522cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nl-reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ fmt::StringRef mp::NameProvider::name(
return fmt::StringRef(name, pos1past - name);
}
writer_.clear();
if (i2>=0 && index>=i2)
if (index>=i2)
writer_ << gen_name_2_ << '[' << (index - i2 + 1) << ']';
else
writer_ << gen_name_ << '[' << (index + 1) << ']';
Expand Down

0 comments on commit 22522cc

Please sign in to comment.