Skip to content

Commit

Permalink
Applied clang-tidy changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr15Jones committed Sep 8, 2017
1 parent 86e482e commit 7fa6640
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion FWCore/Framework/bin/cmsRun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ int main(int argc, char* argv[]) {
}
}
if (!ex.alreadyPrinted()) {
if (jobRep.get() != 0) {
if (jobRep.get() != nullptr) {
edm::printCmsException(ex, &(jobRep->get()), returnCode);
}
else {
Expand Down
10 changes: 5 additions & 5 deletions FWCore/Services/plugins/Timing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ namespace edm {
class Timing : public TimingServiceBase {
public:
Timing(ParameterSet const&, ActivityRegistry&);
~Timing();
~Timing() override;

static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);

virtual void addToCPUTime(StreamID id, double iTime) override;
virtual double getTotalCPU() const override;
void addToCPUTime(StreamID id, double iTime) override;
double getTotalCPU() const override;

private:

Expand Down Expand Up @@ -116,7 +116,7 @@ namespace edm {

static double getTime() {
struct timeval t;
if(gettimeofday(&t, 0) < 0)
if(gettimeofday(&t, nullptr) < 0)
throw cms::Exception("SysCallFailed", "Failed call to gettimeofday");
return static_cast<double>(t.tv_sec) + (static_cast<double>(t.tv_usec) * 1E-6);
}
Expand Down Expand Up @@ -151,7 +151,7 @@ namespace edm {
static
double popStack() {
auto& modStack = moduleTimeStack();
assert(modStack.size() > 0);
assert(!modStack.empty());
double curr_module_time = modStack.back();
modStack.pop_back();
double t = getTime() - curr_module_time;
Expand Down
2 changes: 1 addition & 1 deletion FWCore/Utilities/src/TimingServiceBase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ double TimingServiceBase::s_jobStartTime = 0.0;
void TimingServiceBase::jobStarted() {
if (0.0 == s_jobStartTime) {
struct timeval t;
if(gettimeofday(&t, 0) < 0) {
if(gettimeofday(&t, nullptr) < 0) {
return;
}
s_jobStartTime = static_cast<double>(t.tv_sec) + (static_cast<double>(t.tv_usec) * 1E-6);
Expand Down

0 comments on commit 7fa6640

Please sign in to comment.