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

[GCC 8] [RECO] Fixed const correctness for operator() #23246

Merged
merged 2 commits into from
May 21, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion DataFormats/METReco/interface/HcalNoiseRBX.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ namespace reco {

// helper function to get the unique calotowers
struct twrcomp {
inline bool operator() ( const CaloTower & t1, const CaloTower & t2 ) {
inline bool operator() ( const CaloTower & t1, const CaloTower & t2 ) const{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This overlaps with #23235

return t1.id() < t2.id();
}
};
Expand Down
4 changes: 2 additions & 2 deletions DataFormats/MuonData/interface/MuonDigiCollection.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ template <typename IndexType, typename DigiType>
DigiContainerIterator &operator++ (void)
{ ++base_; return *this; }

bool operator== (const DigiContainerIterator &x)
bool operator== (const DigiContainerIterator &x) const
{ return x.base_ == base_; }

bool operator!= (const DigiContainerIterator &x)
bool operator!= (const DigiContainerIterator &x) const
{ return x.base_ != base_; }

value_type operator* (void) const
Expand Down
2 changes: 1 addition & 1 deletion EventFilter/EcalTBRawToDigi/src/DCCDataMapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public :
/**
Overloads operator() returning true if DCCDataField 1 comes first then DCCDataField 2 in the DCC data block
*/
bool operator()(DCCTBDataField *d1, DCCTBDataField * d2){
bool operator()(DCCTBDataField *d1, DCCTBDataField * d2) const{
bool value(false);

if (d1->wordPosition() < d2->wordPosition()){
Expand Down
2 changes: 1 addition & 1 deletion RecoMET/METAlgorithms/interface/HcalNoiseAlgo.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class JoinCaloTowerRefVectorsWithoutDuplicates

// helper function to compare calotower references
struct twrrefcomp {
inline bool operator() ( const edm::Ref<CaloTowerCollection> & t1, const edm::Ref<CaloTowerCollection> & t2 ) {
inline bool operator() ( const edm::Ref<CaloTowerCollection> & t1, const edm::Ref<CaloTowerCollection> & t2 ) const{
return t1->id() < t2->id();
}
};
Expand Down
4 changes: 2 additions & 2 deletions RecoVertex/MultiVertexFit/interface/LinTrackCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ class LinTrackCache
private:
struct Comparer
{
bool operator() ( const GlobalPoint &, const GlobalPoint & );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This overlaps with #23237

bool operator() ( const GlobalPoint &, const GlobalPoint & ) const;
};

struct Vicinity
{
bool operator() ( const GlobalPoint &, const GlobalPoint & );
bool operator() ( const GlobalPoint &, const GlobalPoint & ) const;
};

public:
Expand Down
5 changes: 3 additions & 2 deletions RecoVertex/MultiVertexFit/src/LinTrackCache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ LinTrackCache::RefCountedLinearizedTrackState LinTrackCache::linTrack
return lTrData;
}

bool LinTrackCache::Comparer::operator() ( const GlobalPoint & left, const GlobalPoint & right )
bool LinTrackCache::Comparer::operator() ( const GlobalPoint & left,
const GlobalPoint & right ) const
{
// if theyre closer than 1 micron, they're
// indistinguishable, i.e. the same
Expand All @@ -50,7 +51,7 @@ bool LinTrackCache::Comparer::operator() ( const GlobalPoint & left,
}

bool LinTrackCache::Vicinity::operator() ( const GlobalPoint & p1,
const GlobalPoint & p2 )
const GlobalPoint & p2 ) const
{
if ( (p1 - p2).mag() < maxRelinDistance() )
{
Expand Down