diff options
author | Daniil <dkustov4@gmail.com> | 2022-10-13 08:25:16 +0300 |
---|---|---|
committer | kin4stat <dkustov4@gmail.com> | 2022-10-13 12:29:48 +0300 |
commit | 93b9132b0a1e68cb4c5dcde1bad2ddea7f0726f4 (patch) | |
tree | 167d3e93a2601f05406c2c74276cbe795fa38ec3 | |
parent | 936697e5b1944bf1630cfbb9e82144f8bdc32815 (diff) |
Replace iterator difference with std::distance
-rw-r--r-- | include/spdlog/common-inl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/spdlog/common-inl.h b/include/spdlog/common-inl.h index 9fd2bcb5..728f9831 100644 --- a/include/spdlog/common-inl.h +++ b/include/spdlog/common-inl.h @@ -34,7 +34,7 @@ SPDLOG_INLINE spdlog::level::level_enum from_str(const std::string &name) SPDLOG { 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<level::level_enum>(it - std::begin(level_string_views)); + return static_cast<level::level_enum>(std::distance(std::begin(level_string_views), it)); // check also for "warn" and "err" before giving up.. if (name == "warn") |