Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
0115d880
Commit
0115d880
authored
Feb 28, 2020
by
Pedro J. Estébanez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix shadowed variable build error
parent
4ff84cbf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
string_name.cpp
core/string_name.cpp
+9
-9
string_name.h
core/string_name.h
+1
-1
No files found.
core/string_name.cpp
View file @
0115d880
...
...
@@ -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
();
...
...
core/string_name.h
View file @
0115d880
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment