summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/class_db.cpp4
-rw-r--r--core/io/file_access_pack.cpp4
-rw-r--r--core/math/bsp_tree.cpp5
3 files changed, 6 insertions, 7 deletions
diff --git a/core/class_db.cpp b/core/class_db.cpp
index dcc07f8f41..71809d5454 100644
--- a/core/class_db.cpp
+++ b/core/class_db.cpp
@@ -809,10 +809,10 @@ void ClassDB::add_signal(StringName p_class, const MethodInfo &p_signal) {
ClassInfo *type = classes.getptr(p_class);
ERR_FAIL_COND(!type);
- ClassInfo *check = type;
StringName sname = p_signal.name;
-#ifdef DEBUG_METHODS_ENABLED
+#ifdef DEBUG_METHODS_ENABLED
+ ClassInfo *check = type;
while (check) {
if (check->signal_map.has(sname)) {
ERR_EXPLAIN("Type " + String(p_class) + " already has signal: " + String(sname));
diff --git a/core/io/file_access_pack.cpp b/core/io/file_access_pack.cpp
index e3c8fb9eb8..40f756ba9a 100644
--- a/core/io/file_access_pack.cpp
+++ b/core/io/file_access_pack.cpp
@@ -169,11 +169,11 @@ bool PackedSourcePCK::try_open_pack(const String &p_path) {
uint32_t version = f->get_32();
uint32_t ver_major = f->get_32();
uint32_t ver_minor = f->get_32();
- uint32_t ver_rev = f->get_32();
+ f->get_32(); // ver_rev
ERR_EXPLAIN("Pack version unsupported: " + itos(version));
ERR_FAIL_COND_V(version != PACK_VERSION, false);
- ERR_EXPLAIN("Pack created with a newer version of the engine: " + itos(ver_major) + "." + itos(ver_minor) + "." + itos(ver_rev));
+ ERR_EXPLAIN("Pack created with a newer version of the engine: " + itos(ver_major) + "." + itos(ver_minor));
ERR_FAIL_COND_V(ver_major > VERSION_MAJOR || (ver_major == VERSION_MAJOR && ver_minor > VERSION_MINOR), false);
for (int i = 0; i < 16; i++) {
diff --git a/core/math/bsp_tree.cpp b/core/math/bsp_tree.cpp
index 6e51c56357..6ffc963783 100644
--- a/core/math/bsp_tree.cpp
+++ b/core/math/bsp_tree.cpp
@@ -165,7 +165,6 @@ int BSP_Tree::get_points_inside(const Vector3 *p_points, int p_point_count) cons
int pass_count = 0;
const Node *nodesptr = &nodes[0];
const Plane *planesptr = &planes[0];
- int plane_count = planes.size();
int node_count = nodes.size();
if (node_count == 0) // no nodes!
@@ -192,9 +191,9 @@ int BSP_Tree::get_points_inside(const Vector3 *p_points, int p_point_count) cons
break;
}
- uint16_t plane = nodesptr[idx].plane;
#ifdef DEBUG_ENABLED
-
+ int plane_count = planes.size();
+ uint16_t plane = nodesptr[idx].plane;
ERR_FAIL_INDEX_V(plane, plane_count, false);
#endif