From 4377803708d90592da1de4a31abdd95103809705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Fri, 28 Oct 2016 10:44:04 +0200 Subject: [PATCH] More warnings fixed --- src/OpenMesh/Tools/Decimater/ModNormalDeviationT.hh | 3 ++- src/OpenMesh/Tools/Decimater/ModRoundnessT.hh | 2 +- src/OpenMesh/Tools/Subdivider/Uniform/LoopT.hh | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/OpenMesh/Tools/Decimater/ModNormalDeviationT.hh b/src/OpenMesh/Tools/Decimater/ModNormalDeviationT.hh index da1975b2..0415b042 100644 --- a/src/OpenMesh/Tools/Decimater/ModNormalDeviationT.hh +++ b/src/OpenMesh/Tools/Decimater/ModNormalDeviationT.hh @@ -214,7 +214,8 @@ public: // the smaller the factor, the smaller normal_deviation_ gets // thus creating a stricter constraint // division by error_tolerance_factor_ is for normalization - Scalar normal_deviation = (normal_deviation_ * static_cast(180.0)/static_cast(M_PI) ) * _factor / this->error_tolerance_factor_; + Scalar normal_deviation = normal_deviation_ * static_cast( 180.0 / M_PI * _factor / this->error_tolerance_factor_); + set_normal_deviation(normal_deviation); this->error_tolerance_factor_ = _factor; } diff --git a/src/OpenMesh/Tools/Decimater/ModRoundnessT.hh b/src/OpenMesh/Tools/Decimater/ModRoundnessT.hh index f31692d7..622947bf 100644 --- a/src/OpenMesh/Tools/Decimater/ModRoundnessT.hh +++ b/src/OpenMesh/Tools/Decimater/ModRoundnessT.hh @@ -185,7 +185,7 @@ class ModRoundnessT : public ModBaseT // the smaller the factor, the smaller min_r_ gets // thus creating a stricter constraint // division by error_tolerance_factor_ is for normalization - value_type min_roundness = min_r_ * _factor / this->error_tolerance_factor_; + value_type min_roundness = min_r_ * static_cast(_factor / this->error_tolerance_factor_); set_min_roundness(min_roundness); this->error_tolerance_factor_ = _factor; } diff --git a/src/OpenMesh/Tools/Subdivider/Uniform/LoopT.hh b/src/OpenMesh/Tools/Subdivider/Uniform/LoopT.hh index dd535b01..036a9d12 100644 --- a/src/OpenMesh/Tools/Subdivider/Uniform/LoopT.hh +++ b/src/OpenMesh/Tools/Subdivider/Uniform/LoopT.hh @@ -231,7 +231,7 @@ private: double t = (3.0 + 2.0 * cos( 2.0 * M_PI * inv_v) ); double alpha = (40.0 - t * t)/64.0; - return weight_t( 1.0-alpha, inv_v*alpha); + return weight_t( static_cast(1.0-alpha), static_cast(inv_v*alpha) ); } return weight_t(0.0, 0.0); }