diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-06-12 13:53:35 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-06-13 23:32:05 +0300 |
commit | 4161d197fdb59587b3ef5deac321605fc911a2ab (patch) | |
tree | 0bf4fa48a4e42fac0afce07f099ebace3ff5a698 /src/mbgl/util/stopwatch.cpp | |
parent | 92f605df326ac4b1f4dd65928d6350b97eea6096 (diff) | |
download | qtlocation-mapboxgl-4161d197fdb59587b3ef5deac321605fc911a2ab.tar.gz |
[tidy] Check modernize-pass-by-value
Ref: http://clang.llvm.org/extra/clang-tidy/checks/modernize-pass-by-value.html
Diffstat (limited to 'src/mbgl/util/stopwatch.cpp')
-rw-r--r-- | src/mbgl/util/stopwatch.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mbgl/util/stopwatch.cpp b/src/mbgl/util/stopwatch.cpp index bbc6bfba0c..8cf0f7fd22 100644 --- a/src/mbgl/util/stopwatch.cpp +++ b/src/mbgl/util/stopwatch.cpp @@ -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; |