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.
This commit is contained in:
Sergey Zolotukhin
2024-08-09 11:20:58 +02:00
parent 9a10c33734
commit c5da0775f2

View File

@@ -235,7 +235,7 @@ public:
}
template <typename T = std::string_view>
std::optional<T> get(std::string_view key) {
std::optional<T> get(std::string_view key) const {
if (!_shared_data) {
on_internal_error(errinj_logger, "injection_shared_data is not initialized");
}