summaryrefslogtreecommitdiffstats
path: root/scene
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-01-29 13:18:09 +0100
committerRémi Verschelde <rverschelde@gmail.com>2024-01-29 13:18:09 +0100
commitfa48a51183567934984b381ad8ec281cb24d66ba (patch)
treef4737d9d29666e6e531a0fd163c49420383484f5 /scene
parente59e58a68afd60d0fa63e61751bd6d30575f3bb3 (diff)
parent15369fdb1d692e1515dd888dfbae275074be63be (diff)
downloadredot-engine-fa48a51183567934984b381ad8ec281cb24d66ba.tar.gz
Merge pull request #87688 from AThousandShips/what_is_this
Remove unnecessary `this->` expressions
Diffstat (limited to 'scene')
-rw-r--r--scene/2d/remote_transform_2d.cpp2
-rw-r--r--scene/3d/audio_stream_player_3d.cpp14
-rw-r--r--scene/3d/remote_transform_3d.cpp2
-rw-r--r--scene/animation/animation_blend_space_1d.cpp4
-rw-r--r--scene/animation/animation_blend_space_2d.cpp4
-rw-r--r--scene/gui/control.cpp24
-rw-r--r--scene/gui/item_list.cpp2
-rw-r--r--scene/gui/popup_menu.cpp2
-rw-r--r--scene/gui/tree.cpp10
-rw-r--r--scene/main/window.cpp26
10 files changed, 45 insertions, 45 deletions
diff --git a/scene/2d/remote_transform_2d.cpp b/scene/2d/remote_transform_2d.cpp
index f7de4f3376..5ea5098475 100644
--- a/scene/2d/remote_transform_2d.cpp
+++ b/scene/2d/remote_transform_2d.cpp
@@ -34,7 +34,7 @@ void RemoteTransform2D::_update_cache() {
cache = ObjectID();
if (has_node(remote_node)) {
Node *node = get_node(remote_node);
- if (!node || this == node || node->is_ancestor_of(this) || this->is_ancestor_of(node)) {
+ if (!node || this == node || node->is_ancestor_of(this) || is_ancestor_of(node)) {
return;
}
diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp
index b01be4dffb..49bcb77ea7 100644
--- a/scene/3d/audio_stream_player_3d.cpp
+++ b/scene/3d/audio_stream_player_3d.cpp
@@ -53,8 +53,8 @@ private:
public:
Spcap(unsigned int speaker_count, const Vector3 *speaker_directions) {
- this->speakers.resize(speaker_count);
- Speaker *w = this->speakers.ptrw();
+ speakers.resize(speaker_count);
+ Speaker *w = speakers.ptrw();
for (unsigned int speaker_num = 0; speaker_num < speaker_count; speaker_num++) {
w[speaker_num].direction = speaker_directions[speaker_num];
w[speaker_num].squared_gain = 0.0;
@@ -66,23 +66,23 @@ public:
}
unsigned int get_speaker_count() const {
- return (unsigned int)this->speakers.size();
+ return (unsigned int)speakers.size();
}
Vector3 get_speaker_direction(unsigned int index) const {
- return this->speakers.ptr()[index].direction;
+ return speakers.ptr()[index].direction;
}
void calculate(const Vector3 &source_direction, real_t tightness, unsigned int volume_count, real_t *volumes) const {
- const Speaker *r = this->speakers.ptr();
+ const Speaker *r = speakers.ptr();
real_t sum_squared_gains = 0.0;
- for (unsigned int speaker_num = 0; speaker_num < (unsigned int)this->speakers.size(); speaker_num++) {
+ for (unsigned int speaker_num = 0; speaker_num < (unsigned int)speakers.size(); speaker_num++) {
real_t initial_gain = 0.5 * powf(1.0 + r[speaker_num].direction.dot(source_direction), tightness) / r[speaker_num].effective_number_of_speakers;
r[speaker_num].squared_gain = initial_gain * initial_gain;
sum_squared_gains += r[speaker_num].squared_gain;
}
- for (unsigned int speaker_num = 0; speaker_num < MIN(volume_count, (unsigned int)this->speakers.size()); speaker_num++) {
+ for (unsigned int speaker_num = 0; speaker_num < MIN(volume_count, (unsigned int)speakers.size()); speaker_num++) {
volumes[speaker_num] = sqrtf(r[speaker_num].squared_gain / sum_squared_gains);
}
}
diff --git a/scene/3d/remote_transform_3d.cpp b/scene/3d/remote_transform_3d.cpp
index add58da4ba..8d6e717132 100644
--- a/scene/3d/remote_transform_3d.cpp
+++ b/scene/3d/remote_transform_3d.cpp
@@ -34,7 +34,7 @@ void RemoteTransform3D::_update_cache() {
cache = ObjectID();
if (has_node(remote_node)) {
Node *node = get_node(remote_node);
- if (!node || this == node || node->is_ancestor_of(this) || this->is_ancestor_of(node)) {
+ if (!node || this == node || node->is_ancestor_of(this) || is_ancestor_of(node)) {
return;
}
diff --git a/scene/animation/animation_blend_space_1d.cpp b/scene/animation/animation_blend_space_1d.cpp
index 981bb88bc4..4cbd9b1d76 100644
--- a/scene/animation/animation_blend_space_1d.cpp
+++ b/scene/animation/animation_blend_space_1d.cpp
@@ -401,8 +401,8 @@ double AnimationNodeBlendSpace1D::_process(const AnimationMixer::PlaybackInfo p_
}
}
- set_parameter(this->closest, cur_closest);
- set_parameter(this->length_internal, cur_length_internal);
+ set_parameter(closest, cur_closest);
+ set_parameter(length_internal, cur_length_internal);
return max_time_remaining;
}
diff --git a/scene/animation/animation_blend_space_2d.cpp b/scene/animation/animation_blend_space_2d.cpp
index dbec2be0ba..d5c6253e9d 100644
--- a/scene/animation/animation_blend_space_2d.cpp
+++ b/scene/animation/animation_blend_space_2d.cpp
@@ -579,8 +579,8 @@ double AnimationNodeBlendSpace2D::_process(const AnimationMixer::PlaybackInfo p_
}
}
- set_parameter(this->closest, cur_closest);
- set_parameter(this->length_internal, cur_length_internal);
+ set_parameter(closest, cur_closest);
+ set_parameter(length_internal, cur_length_internal);
return mind;
}
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index a7be5c9af0..3f48f04d4b 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -2550,7 +2550,7 @@ StringName Control::get_theme_type_variation() const {
Ref<Texture2D> Control::get_theme_icon(const StringName &p_name, const StringName &p_theme_type) const {
ERR_READ_THREAD_GUARD_V(Ref<Texture2D>());
if (!data.initialized) {
- WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", this->get_description()));
+ WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", get_description()));
}
if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
@@ -2574,7 +2574,7 @@ Ref<Texture2D> Control::get_theme_icon(const StringName &p_name, const StringNam
Ref<StyleBox> Control::get_theme_stylebox(const StringName &p_name, const StringName &p_theme_type) const {
ERR_READ_THREAD_GUARD_V(Ref<StyleBox>());
if (!data.initialized) {
- WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", this->get_description()));
+ WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", get_description()));
}
if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
@@ -2598,7 +2598,7 @@ Ref<StyleBox> Control::get_theme_stylebox(const StringName &p_name, const String
Ref<Font> Control::get_theme_font(const StringName &p_name, const StringName &p_theme_type) const {
ERR_READ_THREAD_GUARD_V(Ref<Font>());
if (!data.initialized) {
- WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", this->get_description()));
+ WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", get_description()));
}
if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
@@ -2622,7 +2622,7 @@ Ref<Font> Control::get_theme_font(const StringName &p_name, const StringName &p_
int Control::get_theme_font_size(const StringName &p_name, const StringName &p_theme_type) const {
ERR_READ_THREAD_GUARD_V(0);
if (!data.initialized) {
- WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", this->get_description()));
+ WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", get_description()));
}
if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
@@ -2646,7 +2646,7 @@ int Control::get_theme_font_size(const StringName &p_name, const StringName &p_t
Color Control::get_theme_color(const StringName &p_name, const StringName &p_theme_type) const {
ERR_READ_THREAD_GUARD_V(Color());
if (!data.initialized) {
- WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", this->get_description()));
+ WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", get_description()));
}
if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
@@ -2670,7 +2670,7 @@ Color Control::get_theme_color(const StringName &p_name, const StringName &p_the
int Control::get_theme_constant(const StringName &p_name, const StringName &p_theme_type) const {
ERR_READ_THREAD_GUARD_V(0);
if (!data.initialized) {
- WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", this->get_description()));
+ WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", get_description()));
}
if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
@@ -2721,7 +2721,7 @@ Ref<Texture2D> Control::get_editor_theme_icon(const StringName &p_name) const {
bool Control::has_theme_icon(const StringName &p_name, const StringName &p_theme_type) const {
ERR_READ_THREAD_GUARD_V(false);
if (!data.initialized) {
- WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", this->get_description()));
+ WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", get_description()));
}
if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
@@ -2738,7 +2738,7 @@ bool Control::has_theme_icon(const StringName &p_name, const StringName &p_theme
bool Control::has_theme_stylebox(const StringName &p_name, const StringName &p_theme_type) const {
ERR_READ_THREAD_GUARD_V(false);
if (!data.initialized) {
- WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", this->get_description()));
+ WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", get_description()));
}
if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
@@ -2755,7 +2755,7 @@ bool Control::has_theme_stylebox(const StringName &p_name, const StringName &p_t
bool Control::has_theme_font(const StringName &p_name, const StringName &p_theme_type) const {
ERR_READ_THREAD_GUARD_V(false);
if (!data.initialized) {
- WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", this->get_description()));
+ WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", get_description()));
}
if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
@@ -2772,7 +2772,7 @@ bool Control::has_theme_font(const StringName &p_name, const StringName &p_theme
bool Control::has_theme_font_size(const StringName &p_name, const StringName &p_theme_type) const {
ERR_READ_THREAD_GUARD_V(false);
if (!data.initialized) {
- WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", this->get_description()));
+ WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", get_description()));
}
if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
@@ -2789,7 +2789,7 @@ bool Control::has_theme_font_size(const StringName &p_name, const StringName &p_
bool Control::has_theme_color(const StringName &p_name, const StringName &p_theme_type) const {
ERR_READ_THREAD_GUARD_V(false);
if (!data.initialized) {
- WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", this->get_description()));
+ WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", get_description()));
}
if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
@@ -2806,7 +2806,7 @@ bool Control::has_theme_color(const StringName &p_name, const StringName &p_them
bool Control::has_theme_constant(const StringName &p_name, const StringName &p_theme_type) const {
ERR_READ_THREAD_GUARD_V(false);
if (!data.initialized) {
- WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", this->get_description()));
+ WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", get_description()));
}
if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == data.theme_type_variation) {
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index e9d34fae3b..6518472757 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -1619,7 +1619,7 @@ Vector<int> ItemList::get_selected_items() {
for (int i = 0; i < items.size(); i++) {
if (items[i].selected) {
selected.push_back(i);
- if (this->select_mode == SELECT_SINGLE) {
+ if (select_mode == SELECT_SINGLE) {
break;
}
}
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp
index dc586e86c9..38c326773d 100644
--- a/scene/gui/popup_menu.cpp
+++ b/scene/gui/popup_menu.cpp
@@ -74,7 +74,7 @@ String PopupMenu::bind_global_menu() {
global_menu_name = "__PopupMenu#" + itos(get_instance_id());
if (system_menu_name.length() > 0) {
if (system_menus.has(system_menu_name)) {
- WARN_PRINT(vformat("Attempting to bind PopupMenu to the special menu %s, but another menu is already bound to it. This menu: %s, current menu: %s", system_menu_name, this->get_description(), system_menus[system_menu_name]->get_description()));
+ WARN_PRINT(vformat("Attempting to bind PopupMenu to the special menu %s, but another menu is already bound to it. This menu: %s, current menu: %s", system_menu_name, get_description(), system_menus[system_menu_name]->get_description()));
} else {
const Dictionary &supported_special_names = DisplayServer::get_singleton()->global_menu_get_system_menu_roots();
if (supported_special_names.has(system_menu_name)) {
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 2d1da7da36..10f4962c48 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -868,7 +868,7 @@ TreeItem *TreeItem::_get_prev_in_tree(bool p_wrap, bool p_include_invisible) {
} else if (!current) {
if (p_wrap) {
current = this;
- TreeItem *temp = this->get_next_visible();
+ TreeItem *temp = get_next_visible();
while (temp) {
current = temp;
temp = temp->get_next_visible();
@@ -894,7 +894,7 @@ TreeItem *TreeItem::_get_prev_in_tree(bool p_wrap, bool p_include_invisible) {
TreeItem *TreeItem::get_prev_visible(bool p_wrap) {
TreeItem *loop = this;
- TreeItem *prev_item = this->_get_prev_in_tree(p_wrap);
+ TreeItem *prev_item = _get_prev_in_tree(p_wrap);
while (prev_item && !prev_item->is_visible()) {
prev_item = prev_item->_get_prev_in_tree(p_wrap);
if (prev_item == loop) {
@@ -935,7 +935,7 @@ TreeItem *TreeItem::_get_next_in_tree(bool p_wrap, bool p_include_invisible) {
TreeItem *TreeItem::get_next_visible(bool p_wrap) {
TreeItem *loop = this;
- TreeItem *next_item = this->_get_next_in_tree(p_wrap);
+ TreeItem *next_item = _get_next_in_tree(p_wrap);
while (next_item && !next_item->is_visible()) {
next_item = next_item->_get_next_in_tree(p_wrap);
if (next_item == loop) {
@@ -948,12 +948,12 @@ TreeItem *TreeItem::get_next_visible(bool p_wrap) {
}
TreeItem *TreeItem::get_prev_in_tree(bool p_wrap) {
- TreeItem *prev_item = this->_get_prev_in_tree(p_wrap, true);
+ TreeItem *prev_item = _get_prev_in_tree(p_wrap, true);
return prev_item;
}
TreeItem *TreeItem::get_next_in_tree(bool p_wrap) {
- TreeItem *next_item = this->_get_next_in_tree(p_wrap, true);
+ TreeItem *next_item = _get_next_in_tree(p_wrap, true);
return next_item;
}
diff --git a/scene/main/window.cpp b/scene/main/window.cpp
index 70b70b8928..99f9e11b1f 100644
--- a/scene/main/window.cpp
+++ b/scene/main/window.cpp
@@ -911,7 +911,7 @@ void Window::_set_transient_exclusive_child(bool p_clear_invalid) {
if (!is_in_edited_scene_root()) {
// Transient parent has another exclusive child.
if (transient_parent->exclusive_child && transient_parent->exclusive_child != this) {
- ERR_PRINT(vformat("Attempting to make child window exclusive, but the parent window already has another exclusive child. This window: %s, parent window: %s, current exclusive child window: %s", this->get_description(), transient_parent->get_description(), transient_parent->exclusive_child->get_description()));
+ ERR_PRINT(vformat("Attempting to make child window exclusive, but the parent window already has another exclusive child. This window: %s, parent window: %s, current exclusive child window: %s", get_description(), transient_parent->get_description(), transient_parent->exclusive_child->get_description()));
}
transient_parent->exclusive_child = this;
}
@@ -2066,7 +2066,7 @@ StringName Window::get_theme_type_variation() const {
Ref<Texture2D> Window::get_theme_icon(const StringName &p_name, const StringName &p_theme_type) const {
ERR_READ_THREAD_GUARD_V(Ref<Texture2D>());
if (!initialized) {
- WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", this->get_description()));
+ WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", get_description()));
}
if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == theme_type_variation) {
@@ -2090,7 +2090,7 @@ Ref<Texture2D> Window::get_theme_icon(const StringName &p_name, const StringName
Ref<StyleBox> Window::get_theme_stylebox(const StringName &p_name, const StringName &p_theme_type) const {
ERR_READ_THREAD_GUARD_V(Ref<StyleBox>());
if (!initialized) {
- WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", this->get_description()));
+ WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", get_description()));
}
if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == theme_type_variation) {
@@ -2114,7 +2114,7 @@ Ref<StyleBox> Window::get_theme_stylebox(const StringName &p_name, const StringN
Ref<Font> Window::get_theme_font(const StringName &p_name, const StringName &p_theme_type) const {
ERR_READ_THREAD_GUARD_V(Ref<Font>());
if (!initialized) {
- WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", this->get_description()));
+ WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", get_description()));
}
if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == theme_type_variation) {
@@ -2138,7 +2138,7 @@ Ref<Font> Window::get_theme_font(const StringName &p_name, const StringName &p_t
int Window::get_theme_font_size(const StringName &p_name, const StringName &p_theme_type) const {
ERR_READ_THREAD_GUARD_V(0);
if (!initialized) {
- WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", this->get_description()));
+ WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", get_description()));
}
if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == theme_type_variation) {
@@ -2162,7 +2162,7 @@ int Window::get_theme_font_size(const StringName &p_name, const StringName &p_th
Color Window::get_theme_color(const StringName &p_name, const StringName &p_theme_type) const {
ERR_READ_THREAD_GUARD_V(Color());
if (!initialized) {
- WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", this->get_description()));
+ WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", get_description()));
}
if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == theme_type_variation) {
@@ -2186,7 +2186,7 @@ Color Window::get_theme_color(const StringName &p_name, const StringName &p_them
int Window::get_theme_constant(const StringName &p_name, const StringName &p_theme_type) const {
ERR_READ_THREAD_GUARD_V(0);
if (!initialized) {
- WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", this->get_description()));
+ WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", get_description()));
}
if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == theme_type_variation) {
@@ -2237,7 +2237,7 @@ Ref<Texture2D> Window::get_editor_theme_icon(const StringName &p_name) const {
bool Window::has_theme_icon(const StringName &p_name, const StringName &p_theme_type) const {
ERR_READ_THREAD_GUARD_V(false);
if (!initialized) {
- WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", this->get_description()));
+ WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", get_description()));
}
if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == theme_type_variation) {
@@ -2254,7 +2254,7 @@ bool Window::has_theme_icon(const StringName &p_name, const StringName &p_theme_
bool Window::has_theme_stylebox(const StringName &p_name, const StringName &p_theme_type) const {
ERR_READ_THREAD_GUARD_V(false);
if (!initialized) {
- WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", this->get_description()));
+ WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", get_description()));
}
if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == theme_type_variation) {
@@ -2271,7 +2271,7 @@ bool Window::has_theme_stylebox(const StringName &p_name, const StringName &p_th
bool Window::has_theme_font(const StringName &p_name, const StringName &p_theme_type) const {
ERR_READ_THREAD_GUARD_V(false);
if (!initialized) {
- WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", this->get_description()));
+ WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", get_description()));
}
if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == theme_type_variation) {
@@ -2288,7 +2288,7 @@ bool Window::has_theme_font(const StringName &p_name, const StringName &p_theme_
bool Window::has_theme_font_size(const StringName &p_name, const StringName &p_theme_type) const {
ERR_READ_THREAD_GUARD_V(false);
if (!initialized) {
- WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", this->get_description()));
+ WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", get_description()));
}
if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == theme_type_variation) {
@@ -2305,7 +2305,7 @@ bool Window::has_theme_font_size(const StringName &p_name, const StringName &p_t
bool Window::has_theme_color(const StringName &p_name, const StringName &p_theme_type) const {
ERR_READ_THREAD_GUARD_V(false);
if (!initialized) {
- WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", this->get_description()));
+ WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", get_description()));
}
if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == theme_type_variation) {
@@ -2322,7 +2322,7 @@ bool Window::has_theme_color(const StringName &p_name, const StringName &p_theme
bool Window::has_theme_constant(const StringName &p_name, const StringName &p_theme_type) const {
ERR_READ_THREAD_GUARD_V(false);
if (!initialized) {
- WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", this->get_description()));
+ WARN_PRINT_ONCE(vformat("Attempting to access theme items too early in %s; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED", get_description()));
}
if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == theme_type_variation) {