move member var to implementation
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
#include "timeadvancer.hpp"
|
||||
|
||||
namespace
|
||||
{
|
||||
// Time per hour tick
|
||||
constexpr float kProgressStepDelay = 1.0f / 60.0f;
|
||||
}
|
||||
|
||||
namespace MWGui
|
||||
{
|
||||
TimeAdvancer::TimeAdvancer()
|
||||
@@ -7,7 +13,7 @@ namespace MWGui
|
||||
, mCurHour(0)
|
||||
, mHours(1)
|
||||
, mInterruptAt(-1)
|
||||
, mRemainingTime(mDelay)
|
||||
, mRemainingTime(kProgressStepDelay)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -16,7 +22,7 @@ namespace MWGui
|
||||
mHours = hours;
|
||||
mCurHour = 0;
|
||||
mInterruptAt = interruptAt;
|
||||
mRemainingTime = mDelay;
|
||||
mRemainingTime = kProgressStepDelay;
|
||||
|
||||
mRunning = true;
|
||||
}
|
||||
@@ -42,7 +48,7 @@ namespace MWGui
|
||||
|
||||
while (mRemainingTime <= 0)
|
||||
{
|
||||
mRemainingTime += mDelay;
|
||||
mRemainingTime += kProgressStepDelay;
|
||||
++mCurHour;
|
||||
|
||||
if (mCurHour <= mHours)
|
||||
|
||||
@@ -32,7 +32,6 @@ namespace MWGui
|
||||
int mHours;
|
||||
int mInterruptAt;
|
||||
|
||||
static constexpr float mDelay = 1.0f / 60.0f;
|
||||
float mRemainingTime;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user