Qualify tolower with std:: and remove obsolete comments

* Fixes RIPD-1759
This commit is contained in:
Howard Hinnant
2020-02-01 10:22:54 -05:00
committed by Manoj doshi
parent 2831ed0538
commit 79896af275
2 changed files with 2 additions and 4 deletions

View File

@@ -193,7 +193,7 @@ struct LexicalCast <Out, std::string>
std::transform(in.begin (), in.end (), in.begin (),
[](auto c)
{
return ::tolower(static_cast<unsigned char>(c));
return std::tolower(static_cast<unsigned char>(c));
});
if (in == "1" || in == "true")

View File

@@ -237,7 +237,6 @@ Json::Output makeOutput (Session& session)
};
}
// HACK!
static
std::map<std::string, std::string>
build_map(boost::beast::http::fields const& h)
@@ -246,11 +245,10 @@ build_map(boost::beast::http::fields const& h)
for (auto const& e : h)
{
auto key (e.name_string().to_string());
// TODO Replace with safe C++14 version
std::transform (key.begin(), key.end(), key.begin(),
[](auto kc)
{
return ::tolower(static_cast<unsigned char>(kc));
return std::tolower(static_cast<unsigned char>(kc));
});
c [key] = e.value().to_string();
}