On mardi 29 septembre 2020 11:55:40 CEST Alessandro Pasotti wrote:
> Looks like cppcheck is not smart enough...
Yeah, it hardly understands C++ (it doesn't need to be able to fully compile a
file to analyze it,
if I remember correctly)
>
> const double factor { std::pow( 10, - mPrecisionSpinBox->value() ) };
I noticed this too. It is easily confused by curly initializer list, when used
in a method body. It
might also have sometimes issues with lambdas and variable scope.
> const double factor { std::pow( 10, - mPrecisionSpinBox->value() ) };
Using ( ) or = should fix it
const double factor (std::pow( 10, - mPrecisionSpinBox->value() ));
const double factor = std::pow( 10, - mPrecisionSpinBox->value() );
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer