diff --git a/lib/timer.cpp b/lib/timer.cpp index 12fc5fdc8..88eba035e 100644 --- a/lib/timer.cpp +++ b/lib/timer.cpp @@ -82,15 +82,6 @@ Timer::Timer(const std::string& str, unsigned int showtimeMode, TimerResultsIntf _start = std::clock(); } -Timer::Timer(const Timer& other) - : _str(other._str) - , _timerResults(other._timerResults) - , _start(other._start) - , _showtimeMode(other._showtimeMode) - , _stopped(other._stopped) -{ -} - Timer::~Timer() { Stop(); diff --git a/lib/timer.h b/lib/timer.h index 647d8239b..c56d2f879 100644 --- a/lib/timer.h +++ b/lib/timer.h @@ -70,11 +70,11 @@ private: class CPPCHECKLIB Timer { public: Timer(const std::string& str, unsigned int showtimeMode, TimerResultsIntf* timerResults = nullptr); - Timer(const Timer& other); ~Timer(); void Stop(); private: + Timer(const Timer& other); // disallow copying Timer& operator=(const Timer&); // disallow assignments const std::string _str;