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:
@@ -393,11 +393,12 @@ struct Rect2i {
|
||||
operator String() const { return String(position) + ", " + String(size); }
|
||||
|
||||
operator Rect2() const { return Rect2(position, size); }
|
||||
|
||||
Rect2i() {}
|
||||
Rect2i(const Rect2 &p_r2) :
|
||||
position(p_r2.position),
|
||||
size(p_r2.size) {
|
||||
}
|
||||
Rect2i() {}
|
||||
Rect2i(int p_x, int p_y, int p_width, int p_height) :
|
||||
position(Point2(p_x, p_y)),
|
||||
size(Size2(p_width, p_height)) {
|
||||
|
||||
Reference in New Issue
Block a user