change type of MAX_LOG_SIZE rather than cast its only use

This commit is contained in:
Seth Alves 2015-09-14 08:47:14 -07:00
parent 61c9da1d27
commit 414d9162ef

View file

@ -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;