Skip to content

Commit

Permalink
gate: check: mark as const
Browse files Browse the repository at this point in the history
`check()` doesn't modify the object so it can be marked as `const`.

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
  • Loading branch information
bhalevy authored and avikivity committed Oct 22, 2024
1 parent f821bda commit 9826fa1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/seastar/core/gate.hh
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public:
/// voluntarily stop itself after the gate is closed, by making calls to
/// check() in appropriate places. check() with throw an exception and
/// bail out of the long-running code if the gate is closed.
void check() {
void check() const {
if (_stopped) {
throw gate_closed_exception();
}
Expand Down

0 comments on commit 9826fa1

Please sign in to comment.