[tidy] Check modernize-pass-by-value
Ref: http://clang.llvm.org/extra/clang-tidy/checks/modernize-pass-by-value.html
This commit is contained in:
@@ -15,11 +15,11 @@ stopwatch::stopwatch(Event event_)
|
||||
stopwatch::stopwatch(EventSeverity severity_, Event event_)
|
||||
: severity(severity_), event(event_), start(Clock::now()) {}
|
||||
|
||||
stopwatch::stopwatch(const std::string &name_, Event event_)
|
||||
: name(name_), event(event_), start(Clock::now()) {}
|
||||
stopwatch::stopwatch(std::string name_, Event event_)
|
||||
: name(std::move(name_)), event(event_), start(Clock::now()) {}
|
||||
|
||||
stopwatch::stopwatch(const std::string &name_, EventSeverity severity_, Event event_)
|
||||
: name(name_), severity(severity_), event(event_), start(Clock::now()) {}
|
||||
stopwatch::stopwatch(std::string name_, EventSeverity severity_, Event event_)
|
||||
: name(std::move(name_)), severity(severity_), event(event_), start(Clock::now()) {}
|
||||
|
||||
void stopwatch::report(const std::string &name_) {
|
||||
Duration duration = Clock::now() - start;
|
||||
|
||||
Reference in New Issue
Block a user