VirtualPlanetBuilder icon indicating copy to clipboard operation
VirtualPlanetBuilder copied to clipboard

absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value

Open ryandesign opened this issue 2 years ago • 0 comments

Building the latest git code on macOS 12, I get these warnings:

include/vpb/Source:595:43: warning: absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value [-Wabsolute-value]
                float closestResolution = fabsf(composite._sourceList[0]->getSortValue()-_targetResolution);
                                          ^
include/vpb/Source:595:43: note: use function 'std::abs' instead
                float closestResolution = fabsf(composite._sourceList[0]->getSortValue()-_targetResolution);
                                          ^~~~~
                                          std::abs
include/vpb/Source:598:35: warning: absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value [-Wabsolute-value]
                    float delta = fabsf(composite._sourceList[i]->getSortValue()-_targetResolution);
                                  ^
include/vpb/Source:598:35: note: use function 'std::abs' instead
                    float delta = fabsf(composite._sourceList[i]->getSortValue()-_targetResolution);
                                  ^~~~~
                                  std::abs

ryandesign avatar Aug 09 '23 12:08 ryandesign