Renamed _timerResults

This commit is contained in:
Daniel Marjamäki 2018-06-16 22:14:59 +02:00
parent 63e6d35cb6
commit 66785c238a
4 changed files with 14 additions and 14 deletions

View File

@ -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) Timer::Timer(const std::string& str, unsigned int showtimeMode, TimerResultsIntf* timerResults)
: _str(str) : _str(str)
, _timerResults(timerResults) , mTimerResults(timerResults)
, _start(0) , _start(0)
, _showtimeMode(showtimeMode) , _showtimeMode(showtimeMode)
, _stopped(false) , _stopped(false)
@ -97,8 +97,8 @@ void Timer::Stop()
const double sec = (double)diff / CLOCKS_PER_SEC; const double sec = (double)diff / CLOCKS_PER_SEC;
std::cout << _str << ": " << sec << "s" << std::endl; std::cout << _str << ": " << sec << "s" << std::endl;
} else { } else {
if (_timerResults) if (mTimerResults)
_timerResults->AddResults(_str, diff); mTimerResults->AddResults(_str, diff);
} }
} }

View File

@ -78,7 +78,7 @@ private:
Timer& operator=(const Timer&); // disallow assignments Timer& operator=(const Timer&); // disallow assignments
const std::string _str; const std::string _str;
TimerResultsIntf* _timerResults; TimerResultsIntf* mTimerResults;
std::clock_t _start; std::clock_t _start;
const unsigned int _showtimeMode; const unsigned int _showtimeMode;
bool _stopped; bool _stopped;

View File

@ -146,7 +146,7 @@ Tokenizer::Tokenizer() :
mVarId(0), mVarId(0),
mUnnamedCount(0), mUnnamedCount(0),
mCodeWithTemplates(false), //is there any templates? mCodeWithTemplates(false), //is there any templates?
_timerResults(nullptr) mTimerResults(nullptr)
#ifdef MAXTIME #ifdef MAXTIME
,maxtime(std::time(0) + MAXTIME) ,maxtime(std::time(0) + MAXTIME)
#endif #endif
@ -161,7 +161,7 @@ Tokenizer::Tokenizer(const Settings *settings, ErrorLogger *errorLogger) :
mVarId(0), mVarId(0),
mUnnamedCount(0), mUnnamedCount(0),
mCodeWithTemplates(false), //is there any templates? mCodeWithTemplates(false), //is there any templates?
_timerResults(nullptr) mTimerResults(nullptr)
#ifdef MAXTIME #ifdef MAXTIME
,maxtime(std::time(0) + MAXTIME) ,maxtime(std::time(0) + MAXTIME)
#endif #endif
@ -3553,8 +3553,8 @@ bool Tokenizer::simplifyTokenList1(const char FileName[])
simplifyAsm(); simplifyAsm();
// Bail out if code is garbage // Bail out if code is garbage
if (_timerResults) { if (mTimerResults) {
Timer t("Tokenizer::tokenize::findGarbageCode", mSettings->showtime, _timerResults); Timer t("Tokenizer::tokenize::findGarbageCode", mSettings->showtime, mTimerResults);
findGarbageCode(); findGarbageCode();
} else { } else {
findGarbageCode(); findGarbageCode();
@ -3723,8 +3723,8 @@ bool Tokenizer::simplifyTokenList1(const char FileName[])
simplifyVarDecl(false); simplifyVarDecl(false);
// typedef.. // typedef..
if (_timerResults) { if (mTimerResults) {
Timer t("Tokenizer::tokenize::simplifyTypedef", mSettings->showtime, _timerResults); Timer t("Tokenizer::tokenize::simplifyTypedef", mSettings->showtime, mTimerResults);
simplifyTypedef(); simplifyTypedef();
} else { } else {
simplifyTypedef(); simplifyTypedef();
@ -3841,8 +3841,8 @@ bool Tokenizer::simplifyTokenList1(const char FileName[])
validate(); // #6772 "segmentation fault (invalid code) in Tokenizer::setVarId" validate(); // #6772 "segmentation fault (invalid code) in Tokenizer::setVarId"
if (_timerResults) { if (mTimerResults) {
Timer t("Tokenizer::tokenize::setVarId", mSettings->showtime, _timerResults); Timer t("Tokenizer::tokenize::setVarId", mSettings->showtime, mTimerResults);
setVarId(); setVarId();
} else { } else {
setVarId(); setVarId();

View File

@ -84,7 +84,7 @@ public:
~Tokenizer(); ~Tokenizer();
void setTimerResults(TimerResults *tr) { void setTimerResults(TimerResults *tr) {
_timerResults = tr; mTimerResults = tr;
} }
/** Is the code C. Used for bailouts */ /** Is the code C. Used for bailouts */
@ -896,7 +896,7 @@ private:
/** /**
* TimerResults * TimerResults
*/ */
TimerResults *_timerResults; TimerResults *mTimerResults;
#ifdef MAXTIME #ifdef MAXTIME
/** Tokenizer maxtime */ /** Tokenizer maxtime */