From 1f055ef47236f931a48f73ba98daea26bbe575ce Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 10 Oct 2016 23:57:43 -0700 Subject: [PATCH] [Stopwatch] start()/stop() return const & --- toolsrc/include/Stopwatch.h | 4 ++-- toolsrc/src/Stopwatch.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/toolsrc/include/Stopwatch.h b/toolsrc/include/Stopwatch.h index 2bd5c31bf4..105a4b1ee4 100644 --- a/toolsrc/include/Stopwatch.h +++ b/toolsrc/include/Stopwatch.h @@ -14,9 +14,9 @@ namespace vcpkg bool isRunning() const; - Stopwatch& start(); + const Stopwatch& start(); - Stopwatch& stop(); + const Stopwatch& stop(); Stopwatch& reset(); diff --git a/toolsrc/src/Stopwatch.cpp b/toolsrc/src/Stopwatch.cpp index 035d54c2ba..ddc0f8bcbc 100644 --- a/toolsrc/src/Stopwatch.cpp +++ b/toolsrc/src/Stopwatch.cpp @@ -18,7 +18,7 @@ namespace vcpkg return this->m_isRunning; } - Stopwatch& Stopwatch::start() + const Stopwatch& Stopwatch::start() { Checks::check_exit(!this->m_isRunning, "This stopwatch is already running."); this->m_isRunning = true; @@ -26,7 +26,7 @@ namespace vcpkg return *this; } - Stopwatch& Stopwatch::stop() + const Stopwatch& Stopwatch::stop() { auto tick = std::chrono::high_resolution_clock::now(); Checks::check_exit(this->m_isRunning, "This stopwatch is already stopped.");