X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/0907aa4037b12b6b88ee24495d4577a064d4f8db..8bfc0bdce2bf4f53ac2c072e7a44e9a7d3b3cca8:/projects/stargazer/user_impl.cpp?ds=sidebyside diff --git a/projects/stargazer/user_impl.cpp b/projects/stargazer/user_impl.cpp index 2b7cc3a9..f5f4c4b4 100644 --- a/projects/stargazer/user_impl.cpp +++ b/projects/stargazer/user_impl.cpp @@ -47,6 +47,7 @@ #include #include +#include #include #include @@ -641,7 +642,7 @@ void UserImpl::Run() { STG_LOCKER lock(&mutex); -if (stgTime > static_cast(lastWriteStat + settings->GetStatWritePeriod())) +if (stgTime > lastWriteStat + settings->GetStatWritePeriod()) { printfd(__FILE__, "UserImpl::WriteStat user=%s\n", GetLogin().c_str()); WriteStat(); @@ -1046,8 +1047,7 @@ double UserImpl::GetPassiveTimePart() const { STG_LOCKER lock(&mutex); -static int daysInMonth[12] = -{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; +static const std::array daysInMonth{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; struct tm tms; time_t t = stgTime;