mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-02 02:53:44 +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
@@ -141,7 +141,7 @@ void CrossBorderGraphSerializer::Serialize(CrossBorderGraph const & graph, Sink
|
||||
{
|
||||
WriteVarUint(sink, segId);
|
||||
|
||||
WriteVarUint(sink, static_cast<uint64_t>(std::round(seg.m_weight * kDouble2Int)));
|
||||
WriteVarUint(sink, static_cast<uint64_t>(std::lround(seg.m_weight * kDouble2Int)));
|
||||
|
||||
writeSegEnding(seg.m_start);
|
||||
writeSegEnding(seg.m_end);
|
||||
|
||||
Reference in New Issue
Block a user