Skip to content

Commit

Permalink
Merge pull request cms-sw#46973 from iarspider/iarspider-patch-202412…
Browse files Browse the repository at this point in the history
…17-3

[Geometry] Use std::abs to fix clang compilation warnings
  • Loading branch information
cmsbuild authored Dec 22, 2024
2 parents b523ab3 + 66e2850 commit 3950ee4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions DetectorDescription/DDCMS/test/DDFilteredView.find.cppunit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ void testDDFilteredViewFind::checkFilteredView() {
double radLength = fview.getNextValue("TrackerRadLength");
std::cout << radLength << "\n";
double xi = fview.getNextValue("TrackerXi");
CPPUNIT_ASSERT(abs(radLength - refRadLength_) < 10e-6);
CPPUNIT_ASSERT(abs(xi - refXi_) < 10e-6);
CPPUNIT_ASSERT(std::abs(radLength - refRadLength_) < 10e-6);
CPPUNIT_ASSERT(std::abs(xi - refXi_) < 10e-6);

std::cout << "TrackerRadLength = " << radLength << "\nTrackerXi = " << xi << "\n";

Expand Down
4 changes: 2 additions & 2 deletions DetectorDescription/DDCMS/test/DDFilteredView.get.cppunit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ void testDDFilteredViewGet::checkFilteredView() {

double radLength = fview.getNextValue("TrackerRadLength");
double xi = fview.getNextValue("TrackerXi");
CPPUNIT_ASSERT(abs(radLength - refRadLength_) < 10e-6);
CPPUNIT_ASSERT(abs(xi - refXi_) < 10e-6);
CPPUNIT_ASSERT(std::abs(radLength - refRadLength_) < 10e-6);
CPPUNIT_ASSERT(std::abs(xi - refXi_) < 10e-6);

std::cout << "TrackerRadLength = " << radLength << "\nTrackerXi = " << xi << "\n";
auto vals = fview.getValuesNS<std::string>("TrackerRadLength");
Expand Down
4 changes: 2 additions & 2 deletions DetectorDescription/DDCMS/test/DDFilteredView.goto.cppunit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ void testDDFilteredViewGoTo::checkFilteredView() {

double radLength = fview.get<double>("TrackerRadLength");
double xi = fview.getNextValue("TrackerXi");
CPPUNIT_ASSERT(abs(radLength - refRadLength_) < 10e-6);
CPPUNIT_ASSERT(abs(xi - refXi_) < 10e-6);
CPPUNIT_ASSERT(std::abs(radLength - refRadLength_) < 10e-6);
CPPUNIT_ASSERT(std::abs(xi - refXi_) < 10e-6);

std::cout << "TrackerRadLength = " << radLength << "\nTrackerXi = " << xi << "\n";

Expand Down

0 comments on commit 3950ee4

Please sign in to comment.