diff --git a/src/common.cpp b/src/common.cpp index df0b43f5e..b1845bb76 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -9,7 +9,7 @@ namespace spdlog { spdlog::level level_from_str(const std::string &name) noexcept { - auto *it = std::find(std::begin(level_string_views), std::end(level_string_views), name); + const auto it = std::find(std::begin(level_string_views), std::end(level_string_views), name); if (it != std::end(level_string_views)) return static_cast(std::distance(std::begin(level_string_views), it)); // check also for "warn" and "err" before giving up