summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorTimo Schwarzer <me@timoschwarzer.com>2020-05-25 21:55:03 +0200
committerTimo Schwarzer <me@timoschwarzer.com>2020-05-25 21:55:03 +0200
commit05b32fc01d7b74c530104682d286e561eb79092d (patch)
treeb3da8e0ceed2844c0dc75d24b4587cf19f91d8a7 /core
parent34d7e30798b4b4fc96dff729cbc2df3410e95e73 (diff)
Add static_assert checks where code assumes VARIANT_ARG_MAX == 5
Diffstat (limited to 'core')
-rw-r--r--core/undo_redo.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/undo_redo.cpp b/core/undo_redo.cpp
index 90750f2c6e..1dcbb0cd6b 100644
--- a/core/undo_redo.cpp
+++ b/core/undo_redo.cpp
@@ -435,6 +435,7 @@ Variant UndoRedo::_add_do_method(const Variant **p_args, int p_argcount, Callabl
v[i] = *p_args[i + 2];
}
+ static_assert(VARIANT_ARG_MAX == 5, "This code needs to be updated if VARIANT_ARG_MAX != 5");
add_do_method(object, method, v[0], v[1], v[2], v[3], v[4]);
return Variant();
}
@@ -471,6 +472,7 @@ Variant UndoRedo::_add_undo_method(const Variant **p_args, int p_argcount, Calla
v[i] = *p_args[i + 2];
}
+ static_assert(VARIANT_ARG_MAX == 5, "This code needs to be updated if VARIANT_ARG_MAX != 5");
add_undo_method(object, method, v[0], v[1], v[2], v[3], v[4]);
return Variant();
}