summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/io/file_access_buffered.h10
-rw-r--r--core/undo_redo.cpp2
2 files changed, 7 insertions, 5 deletions
diff --git a/core/io/file_access_buffered.h b/core/io/file_access_buffered.h
index 61c0fa7489..99d5ce903d 100644
--- a/core/io/file_access_buffered.h
+++ b/core/io/file_access_buffered.h
@@ -51,16 +51,16 @@ protected:
Error set_error(Error p_error) const;
mutable struct File {
- bool open;
- int size;
- int offset;
+ bool open = false;
+ int size = 0;
+ int offset = 0;
String name;
- int access_flags;
+ int access_flags = 0;
} file;
mutable struct Cache {
Vector<uint8_t> buffer;
- int offset;
+ int offset = 0;
} cache;
virtual int read_data_block(int p_offset, int p_size, uint8_t *p_dest = nullptr) const = 0;
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();
}