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

Fix scram b code-checks warnings associated with FWCore #31396

Merged
merged 1 commit into from Sep 9, 2020
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: 4 additions & 0 deletions DataFormats/Provenance/interface/LuminosityBlockAuxiliary.h
Expand Up @@ -23,7 +23,11 @@ namespace edm {
Timestamp const& theTime,
Timestamp const& theEndTime)
: processHistoryID_(), id_(theRun, theLumi), beginTime_(theTime), endTime_(theEndTime) {}
LuminosityBlockAuxiliary(LuminosityBlockAuxiliary&&) = default;
LuminosityBlockAuxiliary(LuminosityBlockAuxiliary const&) = default;
~LuminosityBlockAuxiliary() {}
LuminosityBlockAuxiliary& operator=(LuminosityBlockAuxiliary&&) = default;
LuminosityBlockAuxiliary& operator=(LuminosityBlockAuxiliary const&) = default;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

NOTE: this changed allowed a use of std::move to actually do something useful.

void write(std::ostream& os) const;
ProcessHistoryID const& processHistoryID() const { return processHistoryID_; }
void setProcessHistoryID(ProcessHistoryID const& phid) { processHistoryID_ = phid; }
Expand Down
5 changes: 2 additions & 3 deletions FWCore/Framework/interface/HistoryAppender.h
Expand Up @@ -13,6 +13,8 @@ namespace edm {
class HistoryAppender {
public:
HistoryAppender();
HistoryAppender(HistoryAppender const&) = delete;
HistoryAppender& operator=(HistoryAppender const&) = delete;

// Used to append the current process to the process history
// when necessary. Optimized to cache the results so it
Expand All @@ -22,9 +24,6 @@ namespace edm {
ProcessConfiguration const& pc);

private:
HistoryAppender(HistoryAppender const&) = delete;
HistoryAppender& operator=(HistoryAppender const&) = delete;

// Throws if the new process name is already in the process
// process history
void checkProcessHistory(ProcessHistory const& ph, ProcessConfiguration const& pc) const;
Expand Down
2 changes: 1 addition & 1 deletion FWCore/Framework/interface/ProductRegistryHelper.h
Expand Up @@ -49,7 +49,7 @@ namespace edm {
};

struct BranchAliasSetter {
BranchAliasSetter(TypeLabelItem& iItem, EDPutToken iToken) : value_(iItem), token_(std::move(iToken)) {}
BranchAliasSetter(TypeLabelItem& iItem, EDPutToken iToken) : value_(iItem), token_(iToken) {}

BranchAliasSetter& setBranchAlias(std::string alias) {
value_.branchAlias_ = std::move(alias);
Expand Down
6 changes: 2 additions & 4 deletions FWCore/Framework/interface/global/EDProducer.h
Expand Up @@ -38,6 +38,8 @@ namespace edm {
public virtual EDProducerBase {
public:
EDProducer() = default;
EDProducer(const EDProducer&) = delete;
EDProducer& operator=(const EDProducer&) = delete;

// ---------- const member functions ---------------------
bool wantsProcessBlocks() const final { return WantsProcessBlockTransitions<T...>::value; }
Expand Down Expand Up @@ -66,10 +68,6 @@ namespace edm {
// ---------- member functions ---------------------------

private:
EDProducer(const EDProducer&) = delete;

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

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

Expand Down
2 changes: 1 addition & 1 deletion FWCore/Framework/src/LuminosityBlockProcessingStatus.h
Expand Up @@ -98,7 +98,7 @@ namespace edm {
}
edm::Timestamp const& lastTimestamp() const { return endTime_; }

void setNextSyncValue(IOVSyncValue iValue) { nextSyncValue_ = std::move(iValue); }
void setNextSyncValue(IOVSyncValue const& iValue) { nextSyncValue_ = iValue; }

const IOVSyncValue nextSyncValue() const { return nextSyncValue_; }

Expand Down
6 changes: 2 additions & 4 deletions FWCore/Framework/src/OutputModuleCommunicator.h
Expand Up @@ -39,6 +39,8 @@ namespace edm {
class OutputModuleCommunicator {
public:
OutputModuleCommunicator() = default;
OutputModuleCommunicator(const OutputModuleCommunicator&) = delete;
OutputModuleCommunicator& operator=(const OutputModuleCommunicator&) = delete;
virtual ~OutputModuleCommunicator();

virtual void closeFile() = 0;
Expand Down Expand Up @@ -83,10 +85,6 @@ namespace edm {
virtual ModuleDescription const& description() const = 0;

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

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

// ---------- member data --------------------------------
};
} // namespace edm
Expand Down
6 changes: 2 additions & 4 deletions FWCore/Framework/src/Path.h
Expand Up @@ -61,6 +61,8 @@ namespace edm {

Path(Path const&);

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

template <typename T>
void runAllModulesAsync(WaitingTask*,
typename T::MyPrincipal const&,
Expand Down Expand Up @@ -99,10 +101,6 @@ namespace edm {
void setPathStatusInserter(PathStatusInserter* pathStatusInserter, Worker* pathStatusInserterWorker);

private:
// If you define this be careful about the pointer in the
// PlaceInPathContext object in the contained WorkerInPath objects.
Path const& operator=(Path const&) = delete; // stop default

int timesRun_;
int timesPassed_;
int timesFailed_;
Expand Down
7 changes: 3 additions & 4 deletions FWCore/Framework/src/SystemTimeKeeper.h
Expand Up @@ -50,6 +50,9 @@ namespace edm {
service::TriggerNamesService const& iNameService,
ProcessContext const* iProcessContext);

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

// ---------- const member functions ---------------------

// ---------- static member functions --------------------
Expand Down Expand Up @@ -86,10 +89,6 @@ namespace edm {
void fillTriggerTimingReport(TriggerTimingReport& rep) const;

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

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

PathTiming& pathTiming(StreamContext const&, PathContext const&);
bool checkBounds(unsigned int id) const;

Expand Down
6 changes: 2 additions & 4 deletions FWCore/Utilities/interface/CPUTimer.h
Expand Up @@ -39,6 +39,8 @@ namespace edm {
CPUTimer();
~CPUTimer();
CPUTimer(CPUTimer&&) = default;
CPUTimer(const CPUTimer&) = delete;
CPUTimer& operator=(const CPUTimer&) = delete;

struct Times {
Times() : real_(0), cpu_(0) {}
Expand All @@ -60,10 +62,6 @@ namespace edm {
void add(const Times& t);

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

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

Times calculateDeltaTime() const;

// ---------- member data --------------------------------
Expand Down
3 changes: 1 addition & 2 deletions FWCore/Utilities/interface/LuminosityBlockIndex.h
Expand Up @@ -33,6 +33,7 @@ namespace edm {
class LuminosityBlockIndex {
public:
LuminosityBlockIndex(const LuminosityBlockIndex&) = default;
LuminosityBlockIndex() = delete;
LuminosityBlockIndex& operator=(const LuminosityBlockIndex&) = default;
~LuminosityBlockIndex() = default;

Expand All @@ -53,8 +54,6 @@ namespace edm {

explicit LuminosityBlockIndex(unsigned int iValue) : value_{iValue} {}

LuminosityBlockIndex() = delete;

// ---------- member data --------------------------------
unsigned int value_;

Expand Down
3 changes: 1 addition & 2 deletions FWCore/Utilities/interface/RunIndex.h
Expand Up @@ -32,6 +32,7 @@ namespace edm {
class RunIndex {
public:
~RunIndex() = default;
RunIndex() = delete;
RunIndex(const RunIndex&) = default;
RunIndex& operator=(const RunIndex&) = default;

Expand All @@ -50,8 +51,6 @@ namespace edm {
friend class RunPrincipal;
explicit RunIndex(unsigned int iIndex) : value_(iIndex) {}

RunIndex() = delete;

// ---------- member data --------------------------------
unsigned int value_;

Expand Down
6 changes: 2 additions & 4 deletions FWCore/Utilities/interface/Signal.h
Expand Up @@ -40,6 +40,8 @@ namespace edm {
Signal() = default;
~Signal() = default;
Signal(Signal&&) = default;
Signal(const Signal&) = delete;
Signal& operator=(const Signal&) = delete;

// ---------- const member functions ---------------------
template <typename... Args>
Expand Down Expand Up @@ -69,10 +71,6 @@ namespace edm {
}

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

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

// ---------- member data --------------------------------
slot_list_type m_slots;
};
Expand Down
3 changes: 1 addition & 2 deletions FWCore/Utilities/interface/StreamID.h
Expand Up @@ -30,6 +30,7 @@ namespace edm {
class StreamID {
public:
~StreamID() = default;
StreamID() = delete;
StreamID(const StreamID&) = default;
StreamID& operator=(const StreamID&) = default;

Expand All @@ -49,8 +50,6 @@ namespace edm {
friend class EventPrincipal;
explicit StreamID(unsigned int iValue) : value_(iValue) {}

StreamID() = delete;

// ---------- member data --------------------------------
unsigned int value_;
};
Expand Down
3 changes: 1 addition & 2 deletions FWCore/Utilities/interface/TypeToGet.h
Expand Up @@ -37,6 +37,7 @@ namespace edm {
and iKind should be edm::ProductType **/
TypeToGet(TypeID const& iID, KindOfType iKind) : m_type(iID), m_kind(iKind) {}

TypeToGet() = delete;
// ---------- const member functions ---------------------
TypeID const& type() const { return m_type; }
KindOfType kind() const { return m_kind; }
Expand Down Expand Up @@ -68,8 +69,6 @@ namespace edm {
return ELEMENT_TYPE;
}

TypeToGet() = delete;

// ---------- member data --------------------------------
TypeID m_type;
KindOfType m_kind;
Expand Down
6 changes: 2 additions & 4 deletions FWCore/Utilities/interface/WallclockTimer.h
Expand Up @@ -39,6 +39,8 @@ namespace edm {
WallclockTimer();
~WallclockTimer();
WallclockTimer(WallclockTimer&&) = default;
WallclockTimer(const WallclockTimer&) = delete;
WallclockTimer& operator=(const WallclockTimer&) = delete;

// ---------- const member functions ---------------------
double realTime() const;
Expand All @@ -53,10 +55,6 @@ namespace edm {
void add(double t);

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

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

double calculateDeltaTime() const;

// ---------- member data --------------------------------
Expand Down