Skip to content
Snippets Groups Projects
Commit 5b84fed6 authored by Sebastian Eibl's avatar Sebastian Eibl
Browse files

clang-tidy -checks=-*,bugprone-incorrect-roundings

parent 56c60cd6
Branches
Tags
No related merge requests found
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
#include <cmath>
#include <fstream> #include <fstream>
#include <map> #include <map>
#include <sstream> #include <sstream>
...@@ -678,9 +679,9 @@ namespace geometry { ...@@ -678,9 +679,9 @@ namespace geometry {
os << " "; os << " ";
for( auto it = mesh.getVertexColors().begin(); it != mesh.getVertexColors().end(); ++it ) for( auto it = mesh.getVertexColors().begin(); it != mesh.getVertexColors().end(); ++it )
{ {
os << static_cast<uint16_t>( (*it)[0] * 255.0f + 0.5f ) << ' ' os << std::lround( (*it)[0] * 255.0f ) << ' '
<< static_cast<uint16_t>( (*it)[1] * 255.0f + 0.5f ) << ' ' << std::lround( (*it)[1] * 255.0f ) << ' '
<< static_cast<uint16_t>( (*it)[2] * 255.0f + 0.5f ) << ' '; << std::lround( (*it)[2] * 255.0f ) << ' ';
} }
os << " </DataArray>\n"; os << " </DataArray>\n";
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment