mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 04:53:36 +00:00
Fixed failing is_finite tests on the latest clang
Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
committed by
Konstantin Pastbin
parent
8fe788c98d
commit
82133c5743
@@ -18,7 +18,6 @@
|
||||
#include <cstdlib>
|
||||
#include <optional>
|
||||
#include <regex>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
|
||||
namespace
|
||||
@@ -36,7 +35,7 @@ void RemoveDuplicatesAndKeepOrder(std::vector<T> & vec)
|
||||
std::unordered_set<T> seen;
|
||||
auto const predicate = [&seen](T const & value)
|
||||
{
|
||||
if (seen.find(value) != seen.end())
|
||||
if (seen.contains(value))
|
||||
return true;
|
||||
seen.insert(value);
|
||||
return false;
|
||||
@@ -79,7 +78,7 @@ bool Prefix2Double(std::string const & str, double & d)
|
||||
char const * s = str.c_str();
|
||||
// TODO: Replace with a faster and locale-ignored double conversion.
|
||||
d = std::strtod(s, &stop);
|
||||
return (s != stop && strings::is_finite(d));
|
||||
return (s != stop && math::is_finite(d));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@@ -466,8 +465,7 @@ std::string MetadataTagProcessorImpl::ValidateAndFormat_duration(std::string con
|
||||
return {};
|
||||
|
||||
char const type = v[pos];
|
||||
auto const addHours = convert(type, *op);
|
||||
if (addHours)
|
||||
if (auto const addHours = convert(type, *op))
|
||||
hours += *addHours;
|
||||
else
|
||||
return {};
|
||||
|
||||
Reference in New Issue
Block a user