mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
Port member initialization from constructor to declaration (C++11)
Using `clang-tidy`'s `modernize-use-default-member-init` check and manual review of the changes, and some extra manual changes that `clang-tidy` failed to do. Also went manually through all of `core` to find occurrences that `clang-tidy` couldn't handle, especially all initializations done in a constructor without using initializer lists.
This commit is contained in:
@@ -37,16 +37,16 @@
|
||||
|
||||
class ResourceLoaderBinary {
|
||||
|
||||
bool translation_remapped;
|
||||
bool translation_remapped = false;
|
||||
String local_path;
|
||||
String res_path;
|
||||
String type;
|
||||
Ref<Resource> resource;
|
||||
uint32_t ver_format;
|
||||
uint32_t ver_format = 0;
|
||||
|
||||
FileAccess *f;
|
||||
FileAccess *f = nullptr;
|
||||
|
||||
uint64_t importmd_ofs;
|
||||
uint64_t importmd_ofs = 0;
|
||||
|
||||
Vector<char> str_buf;
|
||||
List<RES> resource_cache;
|
||||
@@ -61,8 +61,8 @@ class ResourceLoaderBinary {
|
||||
RES cache;
|
||||
};
|
||||
|
||||
bool use_sub_threads;
|
||||
float *progress;
|
||||
bool use_sub_threads = false;
|
||||
float *progress = nullptr;
|
||||
Vector<ExtResource> external_resources;
|
||||
|
||||
struct IntResource {
|
||||
@@ -77,9 +77,9 @@ class ResourceLoaderBinary {
|
||||
void _advance_padding(uint32_t p_len);
|
||||
|
||||
Map<String, String> remaps;
|
||||
Error error;
|
||||
Error error = OK;
|
||||
|
||||
bool use_nocache;
|
||||
bool use_nocache = false;
|
||||
|
||||
friend class ResourceFormatLoaderBinary;
|
||||
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
String recognize(FileAccess *p_f);
|
||||
void get_dependencies(FileAccess *p_f, List<String> *p_dependencies, bool p_add_types);
|
||||
|
||||
ResourceLoaderBinary();
|
||||
ResourceLoaderBinary() {}
|
||||
~ResourceLoaderBinary();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user