diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-08-29 01:24:49 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-08-29 01:24:49 +0300 |
commit | ca130a19b36a78c6a23aa56c6ea82eaa187b0a06 (patch) | |
tree | a22f311c5698f3f4ee370c0f1d3cb05230a1da95 /src/gui/windows | |
parent | eeffaaf3ab0593f815e772bfb523b9e7a94d45f5 (diff) | |
download | plus-ca130a19b36a78c6a23aa56c6ea82eaa187b0a06.tar.gz plus-ca130a19b36a78c6a23aa56c6ea82eaa187b0a06.tar.bz2 plus-ca130a19b36a78c6a23aa56c6ea82eaa187b0a06.tar.xz plus-ca130a19b36a78c6a23aa56c6ea82eaa187b0a06.zip |
Use time_t for time values.
Diffstat (limited to 'src/gui/windows')
-rw-r--r-- | src/gui/windows/killstats.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/killstats.h | 8 | ||||
-rw-r--r-- | src/gui/windows/shopwindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/shopwindow.h | 8 | ||||
-rw-r--r-- | src/gui/windows/socialwindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/socialwindow.h | 2 | ||||
-rw-r--r-- | src/gui/windows/whoisonline.h | 2 |
7 files changed, 13 insertions, 13 deletions
diff --git a/src/gui/windows/killstats.cpp b/src/gui/windows/killstats.cpp index dfc3c616e..68b57b077 100644 --- a/src/gui/windows/killstats.cpp +++ b/src/gui/windows/killstats.cpp @@ -289,7 +289,7 @@ void KillStats::gainXp(int xp) void KillStats::recalcStats() { BLOCK_START("KillStats::recalcStats") - const int curTime = cur_time; + const time_t curTime = cur_time; // Need Update Exp Counter if (curTime - m1minExpTime > 60) diff --git a/src/gui/windows/killstats.h b/src/gui/windows/killstats.h index d3b7a88b8..db41cf0e2 100644 --- a/src/gui/windows/killstats.h +++ b/src/gui/windows/killstats.h @@ -73,7 +73,7 @@ class KillStats final : public Window, const int newVal) override final; private: - int mKillTimer; /**< Timer for kill stats. */ + time_t mKillTimer; /**< Timer for kill stats. */ Button *mResetButton A_NONNULLPOINTER; Button *mTimerButton A_NONNULLPOINTER; Label *mLine1; @@ -98,15 +98,15 @@ class KillStats final : public Window, int mKillTCounter; /**< Timer Kill counter. */ int mExpTCounter; /**< Timer Exp counter. */ - int m1minExpTime; + time_t m1minExpTime; int m1minExpNum; int m1minSpeed; - int m5minExpTime; + time_t m5minExpTime; int m5minExpNum; int m5minSpeed; - int m15minExpTime; + time_t m15minExpTime; int m15minExpNum; int m15minSpeed; }; diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp index cab3bcb37..e98d9ce1a 100644 --- a/src/gui/windows/shopwindow.cpp +++ b/src/gui/windows/shopwindow.cpp @@ -1030,7 +1030,7 @@ void ShopWindow::updateTimes() BLOCK_END("ShopWindow::updateTimes") } -bool ShopWindow::checkFloodCounter(int &counterTime) +bool ShopWindow::checkFloodCounter(time_t &counterTime) { if (!counterTime || counterTime > cur_time) counterTime = cur_time; diff --git a/src/gui/windows/shopwindow.h b/src/gui/windows/shopwindow.h index 3123178e7..50d924a1f 100644 --- a/src/gui/windows/shopwindow.h +++ b/src/gui/windows/shopwindow.h @@ -136,7 +136,7 @@ class ShopWindow final : public Window, const int mode); void updateTimes(); - static bool checkFloodCounter(int &counterTime) A_WARN_UNUSED; + static bool checkFloodCounter(time_t &counterTime) A_WARN_UNUSED; bool findShopItem(const ShopItem *const shopItem, const int mode) const A_WARN_UNUSED; @@ -188,9 +188,9 @@ class ShopWindow final : public Window, std::string mTradeNick; std::string mSellShopName; int mSelectedItem; - int mAnnonceTime; - int mLastRequestTimeList; - int mLastRequestTimeItem; + time_t mAnnonceTime; + time_t mLastRequestTimeList; + time_t mLastRequestTimeItem; int mRandCounter; int mTradeMoney; int mSellShopSize; diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp index 055b19ed8..0ab894ba6 100644 --- a/src/gui/windows/socialwindow.cpp +++ b/src/gui/windows/socialwindow.cpp @@ -464,7 +464,7 @@ void SocialWindow::updateActiveList() void SocialWindow::slowLogic() { BLOCK_START("SocialWindow::slowLogic") - const unsigned int nowTime = cur_time; + const time_t nowTime = cur_time; if (mNeedUpdate && nowTime - mLastUpdateTime > 1) { mPlayers->updateList(); diff --git a/src/gui/windows/socialwindow.h b/src/gui/windows/socialwindow.h index 4c2f82068..ad60c9ca8 100644 --- a/src/gui/windows/socialwindow.h +++ b/src/gui/windows/socialwindow.h @@ -160,7 +160,7 @@ class SocialWindow final : public Window, TabbedArea *mTabs A_NONNULLPOINTER; Map *mMap; - int mLastUpdateTime; + time_t mLastUpdateTime; int mPartyId; bool mNeedUpdate; bool mProcessedPortals; diff --git a/src/gui/windows/whoisonline.h b/src/gui/windows/whoisonline.h index 4bc7d0ca2..5233a17ad 100644 --- a/src/gui/windows/whoisonline.h +++ b/src/gui/windows/whoisonline.h @@ -134,7 +134,7 @@ class WhoIsOnline final : public Window, UPDATE_LIST }; - int mUpdateTimer; + time_t mUpdateTimer; /** A thread that use libcurl to download updates. */ SDL_Thread *mThread; |