summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-02-28 11:51:27 +0100
committerGitHub <noreply@github.com>2020-02-28 11:51:27 +0100
commit5beccaf86fc89166d0b7d28cfcf719cad8fb30ee (patch)
tree6bd984ee2fc3c4f4cedd3737ab269ecb1e39f02b /core
parent42ffcaa4f756115d26f7f1d9fd1ba5b13b7bf1e8 (diff)
parent0115d88072dd59122a54688ff1d4c01d6387ac3a (diff)
Merge pull request #36635 from RandomShaper/fix_build_error
Fix shadowed variable build error
Diffstat (limited to 'core')
-rw-r--r--core/string_name.cpp18
-rw-r--r--core/string_name.h2
2 files changed, 10 insertions, 10 deletions
diff --git a/core/string_name.cpp b/core/string_name.cpp
index dd6868f6d2..4ec9af008e 100644
--- a/core/string_name.cpp
+++ b/core/string_name.cpp
@@ -47,7 +47,7 @@ StringName _scs_create(const char *p_chr) {
}
bool StringName::configured = false;
-Mutex StringName::lock;
+Mutex StringName::mutex;
void StringName::setup() {
@@ -61,7 +61,7 @@ void StringName::setup() {
void StringName::cleanup() {
- MutexLock lock(StringName::lock);
+ MutexLock lock(mutex);
int lost_strings = 0;
for (int i = 0; i < STRING_TABLE_LEN; i++) {
@@ -93,7 +93,7 @@ void StringName::unref() {
if (_data && _data->refcount.unref()) {
- MutexLock lock(StringName::lock);
+ MutexLock lock(mutex);
if (_data->prev) {
_data->prev->next = _data->next;
@@ -178,7 +178,7 @@ StringName::StringName(const char *p_name) {
if (!p_name || p_name[0] == 0)
return; //empty, ignore
- MutexLock lock(StringName::lock);
+ MutexLock lock(mutex);
uint32_t hash = String::hash(p_name);
@@ -222,7 +222,7 @@ StringName::StringName(const StaticCString &p_static_string) {
ERR_FAIL_COND(!p_static_string.ptr || !p_static_string.ptr[0]);
- MutexLock lock(StringName::lock);
+ MutexLock lock(mutex);
uint32_t hash = String::hash(p_static_string.ptr);
@@ -267,7 +267,7 @@ StringName::StringName(const String &p_name) {
if (p_name == String())
return;
- MutexLock lock(StringName::lock);
+ MutexLock lock(mutex);
uint32_t hash = p_name.hash();
uint32_t idx = hash & STRING_TABLE_MASK;
@@ -309,7 +309,7 @@ StringName StringName::search(const char *p_name) {
if (!p_name[0])
return StringName();
- MutexLock lock(StringName::lock);
+ MutexLock lock(mutex);
uint32_t hash = String::hash(p_name);
uint32_t idx = hash & STRING_TABLE_MASK;
@@ -339,7 +339,7 @@ StringName StringName::search(const CharType *p_name) {
if (!p_name[0])
return StringName();
- MutexLock lock(StringName::lock);
+ MutexLock lock(mutex);
uint32_t hash = String::hash(p_name);
@@ -365,7 +365,7 @@ StringName StringName::search(const String &p_name) {
ERR_FAIL_COND_V(p_name == "", StringName());
- MutexLock lock(StringName::lock);
+ MutexLock lock(mutex);
uint32_t hash = p_name.hash();
diff --git a/core/string_name.h b/core/string_name.h
index 0cf2f126aa..e68ab8bfa3 100644
--- a/core/string_name.h
+++ b/core/string_name.h
@@ -82,7 +82,7 @@ class StringName {
friend void register_core_types();
friend void unregister_core_types();
- static Mutex lock;
+ static Mutex mutex;
static void setup();
static void cleanup();
static bool configured;