Skip to content

Commit e8e424a

Browse files
Daylily-Zeleendsnopek
authored andcommitted
mark return value of get_class_static and get_parent_class_static as const
(cherry picked from commit 3db8549)
1 parent 18354f9 commit e8e424a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

include/godot_cpp/classes/wrapped.hpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ class Wrapped {
9494
virtual ~Wrapped() {}
9595

9696
public:
97-
static StringName &get_class_static() {
98-
static StringName string_name = StringName("Wrapped");
97+
static const StringName &get_class_static() {
98+
static const StringName string_name = StringName("Wrapped");
9999
return string_name;
100100
}
101101

@@ -208,12 +208,12 @@ public:
208208
initialized = true; \
209209
} \
210210
\
211-
static ::godot::StringName &get_class_static() { \
212-
static ::godot::StringName string_name = ::godot::StringName(#m_class); \
211+
static const ::godot::StringName &get_class_static() { \
212+
static const ::godot::StringName string_name = ::godot::StringName(#m_class); \
213213
return string_name; \
214214
} \
215215
\
216-
static ::godot::StringName &get_parent_class_static() { \
216+
static const ::godot::StringName &get_parent_class_static() { \
217217
return m_inherits::get_class_static(); \
218218
} \
219219
\
@@ -418,12 +418,12 @@ public:
418418
\
419419
static void initialize_class() {} \
420420
\
421-
static ::godot::StringName &get_class_static() { \
422-
static ::godot::StringName string_name = ::godot::StringName(#m_alias_for); \
421+
static const ::godot::StringName &get_class_static() { \
422+
static const ::godot::StringName string_name = ::godot::StringName(#m_alias_for); \
423423
return string_name; \
424424
} \
425425
\
426-
static ::godot::StringName &get_parent_class_static() { \
426+
static const ::godot::StringName &get_parent_class_static() { \
427427
return m_inherits::get_class_static(); \
428428
} \
429429
\

0 commit comments

Comments
 (0)