Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gabime/spdlog.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabi Melman <gmelman1@gmail.com>2022-10-15 00:41:16 +0300
committerGitHub <noreply@github.com>2022-10-15 00:41:16 +0300
commitd011332616464bd0c84817d6255bf5910b7803e9 (patch)
tree167d3e93a2601f05406c2c74276cbe795fa38ec3
parent936697e5b1944bf1630cfbb9e82144f8bdc32815 (diff)
parent93b9132b0a1e68cb4c5dcde1bad2ddea7f0726f4 (diff)
Merge pull request #2509 from kin4stat/v1.x
Replace iterator difference with std::distance(revert #2030)
-rw-r--r--include/spdlog/common-inl.h2
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")