Codechange: Replace old non-standard attributes with C++17/20 standard attributes.

This commit is contained in:
frosch
2024-01-31 21:03:17 +01:00
committed by frosch
parent 8a4f0c4b02
commit b1718478c8
79 changed files with 169 additions and 206 deletions

View File

@@ -30,7 +30,7 @@ public:
*
* @param period The period of the timer.
*/
NODISCARD BaseTimer(const TPeriod period) :
[[nodiscard]] BaseTimer(const TPeriod period) :
period(period)
{
TimerManager<TTimerType>::RegisterTimer(*this);
@@ -84,7 +84,7 @@ public:
* @param interval The interval between each callback.
* @param callback The callback to call when the interval has passed.
*/
NODISCARD IntervalTimer(const TPeriod interval, std::function<void(uint)> callback) :
[[nodiscard]] IntervalTimer(const TPeriod interval, std::function<void(uint)> callback) :
BaseTimer<TTimerType>(interval),
callback(callback)
{
@@ -127,7 +127,7 @@ public:
* @param callback The callback to call when the timeout has passed.
* @param start Whether to start the timer immediately. If false, you can call Reset() to start it.
*/
NODISCARD TimeoutTimer(const TPeriod timeout, std::function<void()> callback, bool start = false) :
[[nodiscard]] TimeoutTimer(const TPeriod timeout, std::function<void()> callback, bool start = false) :
BaseTimer<TTimerType>(timeout),
fired(!start),
callback(callback)