From c5da0775f287c8bc26f5b0b0dda5a7e110a06b12 Mon Sep 17 00:00:00 2001 From: Sergey Zolotukhin Date: Fri, 9 Aug 2024 11:20:58 +0200 Subject: [PATCH] utils: Ensure const correctness of injection_handler::get(). Make utils::error_injection::injection_handler::get() method 'const' as it does not mutate object's state. --- utils/error_injection.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/error_injection.hh b/utils/error_injection.hh index aaf2efcdaf..ebedc16c21 100644 --- a/utils/error_injection.hh +++ b/utils/error_injection.hh @@ -235,7 +235,7 @@ public: } template - std::optional get(std::string_view key) { + std::optional get(std::string_view key) const { if (!_shared_data) { on_internal_error(errinj_logger, "injection_shared_data is not initialized"); }