Skip to content

Commit

Permalink
mark return value of get_class_static and get_parent_class_static
Browse files Browse the repository at this point in the history
… as const

(cherry picked from commit 3db8549)
  • Loading branch information
Daylily-Zeleen authored and dsnopek committed May 17, 2024
1 parent 6328728 commit 1ab42ec
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions include/godot_cpp/classes/wrapped.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ class Wrapped {
virtual ~Wrapped() {}

public:
static StringName &get_class_static() {
static StringName string_name = StringName("Wrapped");
static const StringName &get_class_static() {
static const StringName string_name = StringName("Wrapped");
return string_name;
}

Expand Down Expand Up @@ -186,12 +186,12 @@ public:
initialized = true; \
} \
\
static ::godot::StringName &get_class_static() { \
static ::godot::StringName string_name = ::godot::StringName(#m_class); \
static const ::godot::StringName &get_class_static() { \
static const ::godot::StringName string_name = ::godot::StringName(#m_class); \
return string_name; \
} \
\
static ::godot::StringName &get_parent_class_static() { \
static const ::godot::StringName &get_parent_class_static() { \
return m_inherits::get_class_static(); \
} \
\
Expand Down Expand Up @@ -393,12 +393,12 @@ public:
\
static void initialize_class() {} \
\
static ::godot::StringName &get_class_static() { \
static ::godot::StringName string_name = ::godot::StringName(#m_alias_for); \
static const ::godot::StringName &get_class_static() { \
static const ::godot::StringName string_name = ::godot::StringName(#m_alias_for); \
return string_name; \
} \
\
static ::godot::StringName &get_parent_class_static() { \
static const ::godot::StringName &get_parent_class_static() { \
return m_inherits::get_class_static(); \
} \
\
Expand Down

0 comments on commit 1ab42ec

Please sign in to comment.