From 858aea5dd475b3bae5f4b18dcec818fc83050af5 Mon Sep 17 00:00:00 2001 From: jeffreylindsey Date: Tue, 31 May 2022 11:43:20 -0700 Subject: [PATCH] Fixed compiler errors when building for C++20. -error C4596: 'Reset': illegal qualified name in member declaration -error C4596: 'Elapsed': illegal qualified name in member declaration -error C4596: 'ElapsedMillis': illegal qualified name in member declaration --- Walnut/src/Walnut/Timer.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Walnut/src/Walnut/Timer.h b/Walnut/src/Walnut/Timer.h index c2b3aeb1..d04b615c 100644 --- a/Walnut/src/Walnut/Timer.h +++ b/Walnut/src/Walnut/Timer.h @@ -14,17 +14,17 @@ namespace Walnut { Reset(); } - void Timer::Reset() + void Reset() { m_Start = std::chrono::high_resolution_clock::now(); } - float Timer::Elapsed() + float Elapsed() { return std::chrono::duration_cast(std::chrono::high_resolution_clock::now() - m_Start).count() * 0.001f * 0.001f * 0.001f; } - float Timer::ElapsedMillis() + float ElapsedMillis() { return Elapsed() * 1000.0f; }