From 4819ff3b278a28eec784ad0830c4b5103dc68ef8 Mon Sep 17 00:00:00 2001 From: Joseph Cloutier Date: Mon, 5 Feb 2024 15:11:33 -0500 Subject: [PATCH] Make C++ mutex methods constant. Closes #1729. Co-authored-by: Diego Fonseca --- project/include/system/Mutex.h | 6 +++--- project/src/backend/sdl/SDLMutex.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/project/include/system/Mutex.h b/project/include/system/Mutex.h index 289ede933c..a49f53dbed 100644 --- a/project/include/system/Mutex.h +++ b/project/include/system/Mutex.h @@ -13,9 +13,9 @@ namespace lime { Mutex (); ~Mutex (); - bool Lock (); - bool TryLock (); - bool Unlock (); + bool Lock () const; + bool TryLock () const; + bool Unlock () const; private: diff --git a/project/src/backend/sdl/SDLMutex.cpp b/project/src/backend/sdl/SDLMutex.cpp index e0fc07aefb..83acb2c852 100644 --- a/project/src/backend/sdl/SDLMutex.cpp +++ b/project/src/backend/sdl/SDLMutex.cpp @@ -23,7 +23,7 @@ namespace lime { } - bool Mutex::Lock () { + bool Mutex::Lock () const { if (mutex) { @@ -36,7 +36,7 @@ namespace lime { } - bool Mutex::TryLock () { + bool Mutex::TryLock () const { if (mutex) { @@ -49,7 +49,7 @@ namespace lime { } - bool Mutex::Unlock () { + bool Mutex::Unlock () const { if (mutex) {