Renamed _timerResults
This commit is contained in:
parent
63e6d35cb6
commit
66785c238a
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue