From 414d9162efb6bc362f93013dbf9b771f249cef61 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Mon, 14 Sep 2015 08:47:14 -0700 Subject: [PATCH] change type of MAX_LOG_SIZE rather than cast its only use --- interface/src/FileLogger.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/src/FileLogger.cpp b/interface/src/FileLogger.cpp index 013ea2d1be..f09397322f 100644 --- a/interface/src/FileLogger.cpp +++ b/interface/src/FileLogger.cpp @@ -26,7 +26,7 @@ static const QString FILENAME_FORMAT = "hifi-log_%1_%2.txt"; static const QString DATETIME_FORMAT = "yyyy-MM-dd_hh.mm.ss"; static const QString LOGS_DIRECTORY = "Logs"; // Max log size is 1 MB -static const uint64_t MAX_LOG_SIZE = 1024 * 1024; +static const qint64 MAX_LOG_SIZE = 1024 * 1024; // Max log age is 1 hour static const uint64_t MAX_LOG_AGE_USECS = USECS_PER_SECOND * 3600; @@ -53,7 +53,7 @@ public: protected: void rollFileIfNecessary(QFile& file) { uint64_t now = usecTimestampNow(); - if ((file.size() > (qint64)MAX_LOG_SIZE) || (now - _lastRollTime) > MAX_LOG_AGE_USECS) { + if ((file.size() > MAX_LOG_SIZE) || (now - _lastRollTime) > MAX_LOG_AGE_USECS) { QString newFileName = getLogRollerFilename(); if (file.copy(newFileName)) { _lastRollTime = now;