From 9826fa17ceb19c877d8e1c788fe624341efe7f04 Mon Sep 17 00:00:00 2001 From: Benny Halevy Date: Tue, 22 Oct 2024 09:56:56 +0300 Subject: [PATCH] gate: check: mark as const `check()` doesn't modify the object so it can be marked as `const`. Signed-off-by: Benny Halevy --- include/seastar/core/gate.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/seastar/core/gate.hh b/include/seastar/core/gate.hh index 1424ac0b5eb..c9bcd13fa62 100644 --- a/include/seastar/core/gate.hh +++ b/include/seastar/core/gate.hh @@ -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(); }