Apply clang-format to code base

This commit is contained in:
clang-format-bot 2022-09-22 21:26:05 +03:00 committed by ζeh Matt
parent f37d0be806
commit ddb0522bbf
No known key found for this signature in database
GPG key ID: 18CE582C71A225B0
2199 changed files with 118692 additions and 114392 deletions

View file

@ -13,29 +13,32 @@ namespace Misc
class DeviatingPeriodicTimer
{
public:
explicit DeviatingPeriodicTimer(float period, float deviation, float timeLeft)
: mPeriod(period), mDeviation(deviation), mTimeLeft(timeLeft)
{}
public:
explicit DeviatingPeriodicTimer(float period, float deviation, float timeLeft)
: mPeriod(period)
, mDeviation(deviation)
, mTimeLeft(timeLeft)
{
}
TimerStatus update(float duration, Rng::Generator& prng)
TimerStatus update(float duration, Rng::Generator& prng)
{
if (mTimeLeft > 0)
{
if (mTimeLeft > 0)
{
mTimeLeft -= duration;
return TimerStatus::Waiting;
}
mTimeLeft = Rng::deviate(mPeriod, mDeviation, prng);
return TimerStatus::Elapsed;
mTimeLeft -= duration;
return TimerStatus::Waiting;
}
void reset(float timeLeft) { mTimeLeft = timeLeft; }
mTimeLeft = Rng::deviate(mPeriod, mDeviation, prng);
return TimerStatus::Elapsed;
}
private:
const float mPeriod;
const float mDeviation;
float mTimeLeft;
void reset(float timeLeft) { mTimeLeft = timeLeft; }
private:
const float mPeriod;
const float mDeviation;
float mTimeLeft;
};
}