From 7fba6ecef1a7d307764068a920f749a32122da31 Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Wed, 23 Aug 2017 17:54:20 +0300 Subject: [PATCH] Remove and disallow unused copy constructor --- lib/timer.cpp | 9 --------- lib/timer.h | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) 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;