Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Geometry: fix clang warnings about abs #16932

Merged
merged 3 commits into from Dec 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions Geometry/CaloEventSetup/test/CaloGeometryAnalyzer.cc
Expand Up @@ -217,7 +217,7 @@ CaloGeometryAnalyzer::cmpset( const CaloSubdetectorGeometry* geom ,
}
else
{
if( 2 < abs( base.size() - over.size() ) )
if( 2 < std::abs( (int)(base.size()) - (int)(over.size()) ) )
{
DetSet inBaseNotOver ;
DetSet inOverNotBase ;
Expand Down Expand Up @@ -366,7 +366,7 @@ CaloGeometryAnalyzer::ovrTst( const CaloGeometry& cg ,
{
static const GlobalPoint origin (0,0,0) ;
const int ieta ( id.ieta() ) ;
if( 85 == abs( ieta ) )
if( 85 == std::abs( ieta ) )
{
const EcalBarrelGeometry* ebG ( dynamic_cast<const EcalBarrelGeometry*>( geom ) );
const CaloCellGeometry* cell ( geom->getGeometry(id) ) ;
Expand Down
4 changes: 2 additions & 2 deletions Geometry/HGCalCommonData/plugins/DDHGCalNoTaperEndcap.cc
Expand Up @@ -67,12 +67,12 @@ DDHGCalNoTaperEndcap::createQuarter( DDCompactView& cpv, int xQuadrant, int yQua
#ifdef EDM_ML_DEBUG
int rowmax(0), column(0);
#endif
while (abs(offsetX) < m_rMax) {
while (std::abs(offsetX) < m_rMax) {
#ifdef EDM_ML_DEBUG
column++;
int row(0);
#endif
while (abs(offsetY) < m_rMax) {
while (std::abs(offsetY) < m_rMax) {
#ifdef EDM_ML_DEBUG
row++;
#endif
Expand Down