Skip to content

Commit

Permalink
Fix code
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-antognini-sonarsource committed Jan 18, 2024
1 parent 9a4a3b1 commit 42a6ef9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rules/S6872/cfamily/rule.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ long readInteger();
auto readCoordinate() {
// Explicitly handle the conversion:
// Here, we saturate, but throwing an exception may also be appropriate.
auto readInt = []() { return saturate_cast<int>(readInteger()); }
auto readInt = []() { return saturate_cast<int>(readInteger()); };
return Coordinate{readInt(), readInt()}; // Compliant
}
----
Expand Down

0 comments on commit 42a6ef9

Please sign in to comment.