Fixed some cppcheck warnings
This commit is contained in:
@@ -190,9 +190,9 @@ SIMPLE_BINARY(unsigned long);
|
||||
static size_t store( std::ostream& _os, const value_type& _val, \
|
||||
bool _swap=false) { \
|
||||
value_type tmp = _val; \
|
||||
size_t i, b = size_of(_val), N = value_type::size_; \
|
||||
size_t b = size_of(_val), N = value_type::size_; \
|
||||
if (_swap) \
|
||||
for (i=0; i<N; ++i) \
|
||||
for (size_t i=0; i<N; ++i) \
|
||||
reverse_byte_order( tmp[i] ); \
|
||||
_os.write( (const char*)&tmp[0], b ); \
|
||||
return _os.good() ? b : 0; \
|
||||
@@ -200,10 +200,10 @@ SIMPLE_BINARY(unsigned long);
|
||||
\
|
||||
static size_t restore( std::istream& _is, value_type& _val, \
|
||||
bool _swap=false) { \
|
||||
size_t i, N=value_type::size_; \
|
||||
size_t N=value_type::size_; \
|
||||
size_t b = N * sizeof(value_type::value_type); \
|
||||
_is.read( (char*)&_val[0], b ); \
|
||||
if (_swap) for (i=0; i<N; ++i) \
|
||||
if (_swap) for (size_t i=0; i<N; ++i) \
|
||||
reverse_byte_order( _val[i] ); \
|
||||
return _is.good() ? b : 0; \
|
||||
} \
|
||||
|
||||
@@ -85,8 +85,8 @@ void ModEdgeLengthT<MeshT>::set_error_tolerance_factor(double _factor) {
|
||||
// the smaller the factor, the smaller edge_length_ gets
|
||||
// thus creating a stricter constraint
|
||||
// division by error_tolerance_factor_ is for normalization
|
||||
typename Mesh::Scalar edge_length = edge_length_ * static_cast<typename Mesh::Scalar>(_factor / this->error_tolerance_factor_);
|
||||
set_edge_length(edge_length);
|
||||
typename Mesh::Scalar new_edge_length = edge_length_ * static_cast<typename Mesh::Scalar>(_factor / this->error_tolerance_factor_);
|
||||
set_edge_length(new_edge_length);
|
||||
this->error_tolerance_factor_ = _factor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -267,8 +267,8 @@ void ModHausdorffT<MeshT>::set_error_tolerance_factor(double _factor) {
|
||||
// the smaller the factor, the smaller tolerance gets
|
||||
// thus creating a stricter constraint
|
||||
// division by error_tolerance_factor_ is for normalization
|
||||
Scalar tolerance = tolerance_ * Scalar(_factor / this->error_tolerance_factor_);
|
||||
set_tolerance(tolerance);
|
||||
Scalar new_tolerance = tolerance_ * Scalar(_factor / this->error_tolerance_factor_);
|
||||
set_tolerance(new_tolerance);
|
||||
this->error_tolerance_factor_ = _factor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,8 +139,8 @@ void ModQuadricT<MeshT>::set_error_tolerance_factor(double _factor) {
|
||||
// the smaller the factor, the smaller max_err_ gets
|
||||
// thus creating a stricter constraint
|
||||
// division by error_tolerance_factor_ is for normalization
|
||||
double max_err = max_err_ * _factor / this->error_tolerance_factor_;
|
||||
set_max_err(max_err);
|
||||
double new_max_err = max_err_ * _factor / this->error_tolerance_factor_;
|
||||
set_max_err(new_max_err);
|
||||
this->error_tolerance_factor_ = _factor;
|
||||
|
||||
initialize();
|
||||
|
||||
Reference in New Issue
Block a user