Skip to content

Commit

Permalink
Merge pull request #43404 from smuzaffar/simulation-fix-deprecated1
Browse files Browse the repository at this point in the history
[SIMULATION] [DEVEL] Fix warnings on deprecated copy-constructors
  • Loading branch information
cmsbuild authored Nov 28, 2023
2 parents b11a7a4 + d9e966b commit c65a1a6
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 24 deletions.
1 change: 0 additions & 1 deletion SimDataFormats/CaloHit/interface/CaloHit.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class CaloHit {
public:
CaloHit(int deti, int layi, double ei, double etai, double phii, double timi, uint32_t idi = 0);
CaloHit();
CaloHit(const CaloHit&);
virtual ~CaloHit();

int det() const { return deth; }
Expand Down
10 changes: 0 additions & 10 deletions SimDataFormats/CaloHit/src/CaloHit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,6 @@ CaloHit::CaloHit(int deti, int layi, double ei, double etai, double fi, double t

CaloHit::CaloHit() : deth(0), layerh(0), eh(0), etah(0), phih(0), timeh(0), idh(0) {}

CaloHit::CaloHit(const CaloHit& right) {
deth = right.deth;
layerh = right.layerh;
eh = right.eh;
etah = right.etah;
phih = right.phih;
timeh = right.timeh;
idh = right.idh;
}

CaloHit::~CaloHit() {}

bool CaloHit::operator<(const CaloHit& hit) const {
Expand Down
1 change: 1 addition & 0 deletions SimDataFormats/CrossingFrame/interface/CrossingFrame.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class CrossingFrame {

CrossingFrame() : firstCrossing_(0), lastCrossing_(0), bunchSpace_(75), subdet_(""), maxNbSources_(0) {}
CrossingFrame(int minb, int maxb, int bunchsp, std::string subdet, unsigned int maxNbSources);
CrossingFrame(const CrossingFrame& v) = default;

~CrossingFrame() { ; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,6 @@ class MaterialAccountingStep {
return std::make_pair(part1, part2);
}

/// assignement operator
MaterialAccountingStep& operator=(const MaterialAccountingStep& step) {
m_length = step.m_length;
m_radiationLengths = step.m_radiationLengths;
m_energyLoss = step.m_energyLoss;
m_in = step.m_in;
m_out = step.m_out;
return *this;
}

/// add a step
MaterialAccountingStep& operator+=(const MaterialAccountingStep& step) {
m_length += step.m_length;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class TMultiDimFet : public TNamed {

public:
TMultiDimFet();
// TMultiDimFet(const TMultiDimFet &in);
TMultiDimFet(const TMultiDimFet &in) = default;
const TMultiDimFet &operator=(const TMultiDimFet &in);

TMultiDimFet(Int_t dimension, EMDFPolyType type = kMonomials, Option_t *option = "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ TMultiDimFet::TMultiDimFet() {

const TMultiDimFet &TMultiDimFet::operator=(const TMultiDimFet &in) {
if (this == &in) {
return in;
return *this;
}

fMeanQuantity = in.fMeanQuantity; // Mean of dependent quantity
Expand Down Expand Up @@ -152,7 +152,7 @@ const TMultiDimFet &TMultiDimFet::operator=(const TMultiDimFet &in) {
fShowCorrelation = in.fShowCorrelation; // print correlation matrix
fIsUserFunction = in.fIsUserFunction; // Flag for user defined function
fIsVerbose = in.fIsVerbose; //
return in;
return *this;
}

//____________________________________________________________________
Expand Down

0 comments on commit c65a1a6

Please sign in to comment.