Better variable names
This commit is contained in:
parent
cad30446e4
commit
93e5140945
|
@ -78,7 +78,7 @@
|
|||
/*static*/ FILE* CppCheckExecutor::exceptionOutput = stdout;
|
||||
|
||||
CppCheckExecutor::CppCheckExecutor()
|
||||
: _settings(nullptr), time1(0), errorOutput(nullptr), errorlist(false)
|
||||
: _settings(nullptr), latestProgressOutputTime(0), errorOutput(nullptr), errorlist(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -828,7 +828,7 @@ int CppCheckExecutor::check_internal(CppCheck& cppcheck, int /*argc*/, const cha
|
|||
}
|
||||
|
||||
if (settings.reportProgress)
|
||||
time1 = std::time(nullptr);
|
||||
latestProgressOutputTime = std::time(nullptr);
|
||||
|
||||
if (!settings.outputFile.empty()) {
|
||||
errorOutput = new std::ofstream(settings.outputFile);
|
||||
|
@ -989,13 +989,13 @@ void CppCheckExecutor::reportProgress(const std::string &filename, const char st
|
|||
{
|
||||
(void)filename;
|
||||
|
||||
if (!time1)
|
||||
if (!latestProgressOutputTime)
|
||||
return;
|
||||
|
||||
// Report progress messages every 10 seconds
|
||||
const std::time_t time2 = std::time(nullptr);
|
||||
if (time2 >= (time1 + 10)) {
|
||||
time1 = time2;
|
||||
const std::time_t currentTime = std::time(nullptr);
|
||||
if (currentTime >= (latestProgressOutputTime + 10)) {
|
||||
latestProgressOutputTime = currentTime;
|
||||
|
||||
// format a progress message
|
||||
std::ostringstream ostr;
|
||||
|
|
|
@ -175,7 +175,7 @@ private:
|
|||
/**
|
||||
* Report progress time
|
||||
*/
|
||||
std::time_t time1;
|
||||
std::time_t latestProgressOutputTime;
|
||||
|
||||
/**
|
||||
* Output file name for exception handler
|
||||
|
|
Loading…
Reference in New Issue