mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-09 05:44:34 +00:00
Removed SignedRound and replaced std::round with std::lround where needed
Also see https://clang.llvm.org/extra/clang-tidy/checks/bugprone/incorrect-roundings.html Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
committed by
Konstantin Pastbin
parent
ae349462c6
commit
76d7ef146c
@@ -12,6 +12,7 @@
|
||||
#include "base/thread_pool_computational.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <fstream>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
@@ -188,8 +189,8 @@ public:
|
||||
double lt = pos.m_lat - m_bottomLat;
|
||||
lt = 1 - lt; // From North to South, the same direction as inside the SRTM tiles.
|
||||
|
||||
auto const row = static_cast<size_t>(std::round(kArcSecondsInDegree * lt));
|
||||
auto const col = static_cast<size_t>(std::round(kArcSecondsInDegree * ln));
|
||||
auto const row = std::lround(kArcSecondsInDegree * lt);
|
||||
auto const col = std::lround(kArcSecondsInDegree * ln);
|
||||
|
||||
auto const ix = row * (kArcSecondsInDegree + 1) + col;
|
||||
CHECK(ix < m_values.size(), (pos));
|
||||
|
||||
Reference in New Issue
Block a user