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

[Misc1][clang-tidy] make deleted function public #34689

Merged
merged 2 commits into from Jul 29, 2021
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
Expand Up @@ -20,14 +20,13 @@ namespace magneticfield {
class UniformMagneticFieldESProducer : public edm::ESProducer {
public:
UniformMagneticFieldESProducer(const edm::ParameterSet& pset);

std::unique_ptr<MagneticField> produce(const IdealMagneticFieldRecord&);

private:
// forbid copy ctor and assignment op.
UniformMagneticFieldESProducer(const UniformMagneticFieldESProducer&) = delete;
const UniformMagneticFieldESProducer& operator=(const UniformMagneticFieldESProducer&) = delete;

std::unique_ptr<MagneticField> produce(const IdealMagneticFieldRecord&);

private:
float value;
};
} // namespace magneticfield
Expand Down
9 changes: 5 additions & 4 deletions PhysicsTools/CondLiteIO/interface/RecordWriter.h
Expand Up @@ -33,6 +33,11 @@ namespace fwlite {
class RecordWriter {
public:
RecordWriter(const char* iName, TFile* iFile);

RecordWriter(const RecordWriter&) = delete; // stop default

const RecordWriter& operator=(const RecordWriter&) = delete; // stop default

virtual ~RecordWriter();

struct DataBuffer {
Expand All @@ -53,10 +58,6 @@ namespace fwlite {
void write();

private:
RecordWriter(const RecordWriter&) = delete; // stop default

const RecordWriter& operator=(const RecordWriter&) = delete; // stop default

// ---------- member data --------------------------------
TTree* tree_;
edm::ESRecordAuxiliary aux_;
Expand Down
6 changes: 2 additions & 4 deletions TrackingTools/TrackAssociator/plugins/DetIdAssociatorMaker.h
Expand Up @@ -29,6 +29,8 @@ class DetIdAssociatorRecord;
class DetIdAssociatorMaker {
public:
DetIdAssociatorMaker() = default;
DetIdAssociatorMaker(const DetIdAssociatorMaker&) = delete;
const DetIdAssociatorMaker& operator=(const DetIdAssociatorMaker&) = delete;
virtual ~DetIdAssociatorMaker() = default;

// ---------- const member functions ---------------------
Expand All @@ -39,10 +41,6 @@ class DetIdAssociatorMaker {
// ---------- member functions ---------------------------

private:
DetIdAssociatorMaker(const DetIdAssociatorMaker&) = delete;

const DetIdAssociatorMaker& operator=(const DetIdAssociatorMaker&) = delete;

// ---------- member data --------------------------------
};

Expand Down
4 changes: 2 additions & 2 deletions TrackingTools/TrackFitters/interface/KFTrajectoryFitter.h
Expand Up @@ -63,6 +63,8 @@ class KFTrajectoryFitter final : public TrajectoryFitter {
theGeometry = &dummyGeometry;
}

KFTrajectoryFitter(KFTrajectoryFitter const&) = delete;

~KFTrajectoryFitter() override {
if (owner) {
delete thePropagator;
Expand Down Expand Up @@ -94,8 +96,6 @@ class KFTrajectoryFitter final : public TrajectoryFitter {
void setHitCloner(TkCloner const* hc) override { theHitCloner = hc; }

private:
KFTrajectoryFitter(KFTrajectoryFitter const&) = delete;

static const DetLayerGeometry dummyGeometry;
const Propagator* thePropagator;
const TrajectoryStateUpdator* theUpdator;
Expand Down
9 changes: 5 additions & 4 deletions Utilities/StorageFactory/interface/LocalFileSystem.h
Expand Up @@ -13,6 +13,11 @@ class LocalFileSystem {

public:
LocalFileSystem(void);

// undefined, no semantics
LocalFileSystem(LocalFileSystem &) = delete;
void operator=(LocalFileSystem &) = delete;

~LocalFileSystem(void);

bool isLocalPath(const std::string &path) const;
Expand All @@ -27,10 +32,6 @@ class LocalFileSystem {

std::vector<FSInfo *> fs_;
std::vector<std::string> fstypes_;

// undefined, no semantics
LocalFileSystem(LocalFileSystem &) = delete;
void operator=(LocalFileSystem &) = delete;
};

#endif // STORAGE_FACTORY_LOCAL_FILE_SYSTEM_H
10 changes: 5 additions & 5 deletions Utilities/StorageFactory/interface/Storage.h
Expand Up @@ -22,6 +22,11 @@ class Storage : public virtual IOInput, public virtual IOOutput {
enum Relative { SET, CURRENT, END };

Storage(void);

// undefined, no semantics
Storage(const Storage &) = delete;
Storage &operator=(const Storage &) = delete;

~Storage(void) override;

using IOInput::read;
Expand All @@ -48,11 +53,6 @@ class Storage : public virtual IOInput, public virtual IOOutput {

virtual void flush(void);
virtual void close(void);

private:
// undefined, no semantics
Storage(const Storage &) = delete;
Storage &operator=(const Storage &) = delete;
};

#endif // STORAGE_FACTORY_STORAGE_H
2 changes: 1 addition & 1 deletion Utilities/StorageFactory/interface/StorageAccount.h
Expand Up @@ -104,12 +104,12 @@ class StorageAccount {
class StorageClassToken {
public:
StorageClassToken(StorageClassToken const&) = default;
StorageClassToken() = delete;
int value() const { return m_value; }

friend class StorageAccount;

private:
StorageClassToken() = delete;
explicit StorageClassToken(int iValue) : m_value{iValue} {}

int m_value;
Expand Down
5 changes: 2 additions & 3 deletions Validation/EcalHits/interface/EcalSimHitsValidProducer.h
Expand Up @@ -31,14 +31,13 @@ class EcalSimHitsValidProducer : public SimProducer,

public:
EcalSimHitsValidProducer(const edm::ParameterSet &);
EcalSimHitsValidProducer(const EcalSimHitsValidProducer &) = delete; // stop default
const EcalSimHitsValidProducer &operator=(const EcalSimHitsValidProducer &) = delete; // stop default
~EcalSimHitsValidProducer() override;

void produce(edm::Event &, const edm::EventSetup &) override;

private:
EcalSimHitsValidProducer(const EcalSimHitsValidProducer &) = delete; // stop default
const EcalSimHitsValidProducer &operator=(const EcalSimHitsValidProducer &) = delete; // stop default

void update(const BeginOfEvent *) override;
void update(const G4Step *) override;
void update(const EndOfEvent *) override;
Expand Down
5 changes: 2 additions & 3 deletions Validation/Geometry/src/MaterialBudgetVolume.cc
Expand Up @@ -41,6 +41,8 @@ class MaterialBudgetVolume : public SimProducer,
public Observer<const EndOfTrack*> {
public:
MaterialBudgetVolume(const edm::ParameterSet& p);
MaterialBudgetVolume(const MaterialBudgetVolume&) = delete; // stop default
const MaterialBudgetVolume& operator=(const MaterialBudgetVolume&) = delete;
~MaterialBudgetVolume() override {}

void produce(edm::Event&, const edm::EventSetup&) override;
Expand All @@ -51,9 +53,6 @@ class MaterialBudgetVolume : public SimProducer,
};

private:
MaterialBudgetVolume(const MaterialBudgetVolume&) = delete; // stop default
const MaterialBudgetVolume& operator=(const MaterialBudgetVolume&) = delete;

// observer classes
void update(const BeginOfRun* run) override;
void update(const BeginOfEvent* evt) override;
Expand Down
5 changes: 2 additions & 3 deletions Validation/HcalHits/interface/SimG4HcalValidation.h
Expand Up @@ -39,14 +39,13 @@ class SimG4HcalValidation : public SimProducer,
public Observer<const G4Step *> {
public:
SimG4HcalValidation(const edm::ParameterSet &p);
SimG4HcalValidation(const SimG4HcalValidation &) = delete; // stop default
const SimG4HcalValidation &operator=(const SimG4HcalValidation &) = delete;
~SimG4HcalValidation() override;

void produce(edm::Event &, const edm::EventSetup &) override;

private:
SimG4HcalValidation(const SimG4HcalValidation &) = delete; // stop default
const SimG4HcalValidation &operator=(const SimG4HcalValidation &) = delete;

void init();

// observer classes
Expand Down