Skip to content

Commit

Permalink
Make C++ mutex methods constant.
Browse files Browse the repository at this point in the history
Closes #1729.

Co-authored-by: Diego Fonseca <[email protected]>
  • Loading branch information
player-03 and Just-Feeshy committed Feb 5, 2024
1 parent f52b59b commit 4819ff3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions project/include/system/Mutex.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ namespace lime {
Mutex ();
~Mutex ();

bool Lock ();
bool TryLock ();
bool Unlock ();
bool Lock () const;
bool TryLock () const;
bool Unlock () const;

private:

Expand Down
6 changes: 3 additions & 3 deletions project/src/backend/sdl/SDLMutex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace lime {
}


bool Mutex::Lock () {
bool Mutex::Lock () const {

if (mutex) {

Expand All @@ -36,7 +36,7 @@ namespace lime {
}


bool Mutex::TryLock () {
bool Mutex::TryLock () const {

if (mutex) {

Expand All @@ -49,7 +49,7 @@ namespace lime {
}


bool Mutex::Unlock () {
bool Mutex::Unlock () const {

if (mutex) {

Expand Down

0 comments on commit 4819ff3

Please sign in to comment.