mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 20:56:23 +00:00
refactor(Core): apply clang-tidy modernize-use-default-member-init (#3827)
This commit is contained in:
@@ -14,12 +14,12 @@ namespace Movement
|
||||
{
|
||||
struct Location : public Vector3
|
||||
{
|
||||
Location() : orientation(0) {}
|
||||
Location() {}
|
||||
Location(float x, float y, float z, float o) : Vector3(x, y, z), orientation(o) {}
|
||||
Location(const Vector3& v) : Vector3(v), orientation(0) {}
|
||||
Location(const Vector3& v, float o) : Vector3(v), orientation(o) {}
|
||||
|
||||
float orientation;
|
||||
float orientation{0};
|
||||
};
|
||||
|
||||
// MoveSpline represents smooth catmullrom or linear curve and point that moves belong it
|
||||
|
||||
@@ -32,9 +32,7 @@ namespace Movement
|
||||
|
||||
struct MoveSplineInitArgs
|
||||
{
|
||||
MoveSplineInitArgs(size_t path_capacity = 16) : path_Idx_offset(0), velocity(0.f),
|
||||
parabolic_amplitude(0.f), time_perc(0.f), splineId(0), initialOrientation(0.f),
|
||||
HasVelocity(false), TransformForTransport(true)
|
||||
MoveSplineInitArgs(size_t path_capacity = 16)
|
||||
{
|
||||
path.reserve(path_capacity);
|
||||
}
|
||||
@@ -42,14 +40,14 @@ namespace Movement
|
||||
PointsArray path;
|
||||
FacingInfo facing;
|
||||
MoveSplineFlag flags;
|
||||
int32 path_Idx_offset;
|
||||
float velocity;
|
||||
float parabolic_amplitude;
|
||||
float time_perc;
|
||||
uint32 splineId;
|
||||
float initialOrientation;
|
||||
bool HasVelocity;
|
||||
bool TransformForTransport;
|
||||
int32 path_Idx_offset{0};
|
||||
float velocity{0.f};
|
||||
float parabolic_amplitude{0.f};
|
||||
float time_perc{0.f};
|
||||
uint32 splineId{0};
|
||||
float initialOrientation{0.f};
|
||||
bool HasVelocity{false};
|
||||
bool TransformForTransport{true};
|
||||
|
||||
/** Returns true to show that the arguments were configured correctly and MoveSpline initialization will succeed. */
|
||||
bool Validate(Unit* unit) const;
|
||||
|
||||
@@ -33,11 +33,11 @@ namespace Movement
|
||||
ControlArray points;
|
||||
ControlArray pointsVisual;
|
||||
|
||||
index_type index_lo;
|
||||
index_type index_hi;
|
||||
index_type index_lo{0};
|
||||
index_type index_hi{0};
|
||||
|
||||
uint8 m_mode;
|
||||
bool cyclic;
|
||||
uint8 m_mode{UninitializedMode};
|
||||
bool cyclic{false};
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -79,7 +79,7 @@ namespace Movement
|
||||
|
||||
public:
|
||||
|
||||
explicit SplineBase() : index_lo(0), index_hi(0), m_mode(UninitializedMode), cyclic(false) {}
|
||||
explicit SplineBase() {}
|
||||
|
||||
/** Caclulates the position for given segment Idx, and percent of segment length t
|
||||
@param t - percent of segment length, assumes that t in range [0, 1]
|
||||
|
||||
Reference in New Issue
Block a user