summaryrefslogtreecommitdiff
path: root/core/variant.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/variant.cpp')
-rw-r--r--core/variant.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/variant.cpp b/core/variant.cpp
index 52bdd4e22d..f70e4a5218 100644
--- a/core/variant.cpp
+++ b/core/variant.cpp
@@ -2469,10 +2469,10 @@ Variant::Variant(const Vector<Color> &p_array) {
void Variant::operator=(const Variant &p_variant) {
- if (this == &p_variant)
+ if (unlikely(this == &p_variant))
return;
- if (type != p_variant.type) {
+ if (unlikely(type != p_variant.type)) {
reference(p_variant);
return;
}