diff --git a/lib/timer.cpp b/lib/timer.cpp index 56401cbd0..44d71043f 100644 --- a/lib/timer.cpp +++ b/lib/timer.cpp @@ -73,7 +73,7 @@ void TimerResults::AddResults(const std::string& str, std::clock_t clocks) Timer::Timer(const std::string& str, unsigned int showtimeMode, TimerResultsIntf* timerResults) : _str(str) - , _timerResults(timerResults) + , mTimerResults(timerResults) , _start(0) , _showtimeMode(showtimeMode) , _stopped(false) @@ -97,8 +97,8 @@ void Timer::Stop() const double sec = (double)diff / CLOCKS_PER_SEC; std::cout << _str << ": " << sec << "s" << std::endl; } else { - if (_timerResults) - _timerResults->AddResults(_str, diff); + if (mTimerResults) + mTimerResults->AddResults(_str, diff); } } diff --git a/lib/timer.h b/lib/timer.h index 1043ed453..e4a4fb39f 100644 --- a/lib/timer.h +++ b/lib/timer.h @@ -78,7 +78,7 @@ private: Timer& operator=(const Timer&); // disallow assignments const std::string _str; - TimerResultsIntf* _timerResults; + TimerResultsIntf* mTimerResults; std::clock_t _start; const unsigned int _showtimeMode; bool _stopped; diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 85eebe32b..f5c11931c 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -146,7 +146,7 @@ Tokenizer::Tokenizer() : mVarId(0), mUnnamedCount(0), mCodeWithTemplates(false), //is there any templates? - _timerResults(nullptr) + mTimerResults(nullptr) #ifdef MAXTIME ,maxtime(std::time(0) + MAXTIME) #endif @@ -161,7 +161,7 @@ Tokenizer::Tokenizer(const Settings *settings, ErrorLogger *errorLogger) : mVarId(0), mUnnamedCount(0), mCodeWithTemplates(false), //is there any templates? - _timerResults(nullptr) + mTimerResults(nullptr) #ifdef MAXTIME ,maxtime(std::time(0) + MAXTIME) #endif @@ -3553,8 +3553,8 @@ bool Tokenizer::simplifyTokenList1(const char FileName[]) simplifyAsm(); // Bail out if code is garbage - if (_timerResults) { - Timer t("Tokenizer::tokenize::findGarbageCode", mSettings->showtime, _timerResults); + if (mTimerResults) { + Timer t("Tokenizer::tokenize::findGarbageCode", mSettings->showtime, mTimerResults); findGarbageCode(); } else { findGarbageCode(); @@ -3723,8 +3723,8 @@ bool Tokenizer::simplifyTokenList1(const char FileName[]) simplifyVarDecl(false); // typedef.. - if (_timerResults) { - Timer t("Tokenizer::tokenize::simplifyTypedef", mSettings->showtime, _timerResults); + if (mTimerResults) { + Timer t("Tokenizer::tokenize::simplifyTypedef", mSettings->showtime, mTimerResults); simplifyTypedef(); } else { simplifyTypedef(); @@ -3841,8 +3841,8 @@ bool Tokenizer::simplifyTokenList1(const char FileName[]) validate(); // #6772 "segmentation fault (invalid code) in Tokenizer::setVarId" - if (_timerResults) { - Timer t("Tokenizer::tokenize::setVarId", mSettings->showtime, _timerResults); + if (mTimerResults) { + Timer t("Tokenizer::tokenize::setVarId", mSettings->showtime, mTimerResults); setVarId(); } else { setVarId(); diff --git a/lib/tokenize.h b/lib/tokenize.h index 4f461b324..590d815a2 100644 --- a/lib/tokenize.h +++ b/lib/tokenize.h @@ -84,7 +84,7 @@ public: ~Tokenizer(); void setTimerResults(TimerResults *tr) { - _timerResults = tr; + mTimerResults = tr; } /** Is the code C. Used for bailouts */ @@ -896,7 +896,7 @@ private: /** * TimerResults */ - TimerResults *_timerResults; + TimerResults *mTimerResults; #ifdef MAXTIME /** Tokenizer maxtime */