diff --git a/3party/succinct/bit_vector.hpp b/3party/succinct/bit_vector.hpp index 22c9ea45bc..8b6e157ec0 100644 --- a/3party/succinct/bit_vector.hpp +++ b/3party/succinct/bit_vector.hpp @@ -113,7 +113,7 @@ namespace succinct { n -= 64; } if (n) { - append_bits(uint64_t(-1) >> (64 - n), util::to_size(n)); + append_bits(uint64_t(-1) >> (64 - n), static_cast(n)); } } diff --git a/render/feature_styler.cpp b/render/feature_styler.cpp index 82a6f3015b..d478e34643 100644 --- a/render/feature_styler.cpp +++ b/render/feature_styler.cpp @@ -34,12 +34,8 @@ namespace namespace di { DrawRule::DrawRule(drule::BaseRule const * p, double depth) - : m_rule(p), m_depth(depth) + : m_rule(p), m_depth(my::clamp(depth, graphics::minDepth, graphics::maxDepth)) { - if (m_depth < graphics::minDepth) - m_depth = graphics::minDepth; - else if (m_depth > graphics::maxDepth) - m_depth = graphics::maxDepth; } uint32_t DrawRule::GetID(size_t threadSlot) const