Spectre/Game/GameTime: remove useless m_inLoop variable.
This commit is contained in:
parent
d49d91a294
commit
ed876ca64d
2 changed files with 2 additions and 9 deletions
|
|
@ -42,8 +42,6 @@ protected :
|
||||||
|
|
||||||
// Timeslice.
|
// Timeslice.
|
||||||
Time m_slice;
|
Time m_slice;
|
||||||
|
|
||||||
bool m_inLoop;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace sp
|
} // namespace sp
|
||||||
|
|
|
||||||
|
|
@ -29,14 +29,10 @@ Time GameTime::getElapsed() const
|
||||||
|
|
||||||
bool GameTime::beginFrame()
|
bool GameTime::beginFrame()
|
||||||
{
|
{
|
||||||
m_inLoop = false;
|
|
||||||
|
|
||||||
accumulateTime();
|
accumulateTime();
|
||||||
|
|
||||||
if (m_acc > m_slice) {
|
// Signal if we should tick
|
||||||
m_inLoop = true;
|
return m_acc > m_slice;
|
||||||
}
|
|
||||||
return m_inLoop;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GameTime::tick()
|
bool GameTime::tick()
|
||||||
|
|
@ -51,7 +47,6 @@ bool GameTime::tick()
|
||||||
void GameTime::reset()
|
void GameTime::reset()
|
||||||
{
|
{
|
||||||
m_watch.restart();
|
m_watch.restart();
|
||||||
m_inLoop = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameTime::accumulateTime()
|
void GameTime::accumulateTime()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue