From 41d98e41ac785a149fec098fdba7d4d61838efcb Mon Sep 17 00:00:00 2001 From: Sebastian Nobbelin Date: Thu, 14 Sep 2023 19:59:27 +0200 Subject: [PATCH] fix: add premium --- src/account/account.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/account/account.cpp b/src/account/account.cpp index 30b92b5c694..5c093f917bd 100644 --- a/src/account/account.cpp +++ b/src/account/account.cpp @@ -170,7 +170,7 @@ namespace account { } void Account::addPremiumDays(const int32_t &days) { - uint32_t timeLeft = static_cast((m_account.premiumLastDay - getTimeNow()) % 86400); + auto timeLeft = static_cast((m_account.premiumLastDay - getTimeNow()) % 86400); setPremiumDays(m_account.premiumRemainingDays + days); if (timeLeft > 0) { @@ -199,8 +199,8 @@ namespace account { time_t currentTime = getTimeNow(); - uint32_t daysLeft = static_cast((lastDay - currentTime) / 86400); - uint32_t timeLeft = static_cast((lastDay - currentTime) % 86400); + auto daysLeft = static_cast((lastDay - currentTime) / 86400); + auto timeLeft = static_cast((lastDay - currentTime) % 86400); m_account.premiumRemainingDays = daysLeft > 0 ? daysLeft : 0;