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:
parent
e7c9d81876
commit
1f6f364a56
325 changed files with 1689 additions and 3480 deletions
|
|
@ -29,6 +29,7 @@
|
|||
/*************************************************************************/
|
||||
|
||||
#include "callable.h"
|
||||
|
||||
#include "core/script_language.h"
|
||||
#include "message_queue.h"
|
||||
#include "object.h"
|
||||
|
|
@ -255,12 +256,7 @@ Callable::~Callable() {
|
|||
}
|
||||
}
|
||||
|
||||
Callable::Callable() {
|
||||
object = 0;
|
||||
}
|
||||
|
||||
CallableCustom::CallableCustom() {
|
||||
referenced = false;
|
||||
ref_count.init();
|
||||
}
|
||||
|
||||
|
|
@ -349,6 +345,7 @@ Array Signal::get_connections() const {
|
|||
}
|
||||
return arr;
|
||||
}
|
||||
|
||||
Signal::Signal(const Object *p_object, const StringName &p_name) {
|
||||
|
||||
ERR_FAIL_COND_MSG(p_object == nullptr, "Object argument to Signal constructor must be non-null");
|
||||
|
|
@ -356,10 +353,9 @@ Signal::Signal(const Object *p_object, const StringName &p_name) {
|
|||
object = p_object->get_instance_id();
|
||||
name = p_name;
|
||||
}
|
||||
|
||||
Signal::Signal(ObjectID p_object, const StringName &p_name) {
|
||||
|
||||
object = p_object;
|
||||
name = p_name;
|
||||
}
|
||||
Signal::Signal() {
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue