Add clang-tidy readability-redundant-inline-specifier (#1060)

* Add clang-tidy readability-redundant-inline-specifier

* fix

* Update CONTRIBUTING.md

* format

* fix
This commit is contained in:
Christian Semmler
2024-07-04 16:06:32 -07:00
committed by GitHub
parent 0873b782c5
commit bee101b1f4
186 changed files with 872 additions and 886 deletions

View File

@@ -26,7 +26,7 @@ public:
return *this;
}
inline void Intersect(const MxRect32& p_rect)
void Intersect(const MxRect32& p_rect)
{
m_left = Max(p_rect.m_left, m_left);
m_top = Max(p_rect.m_top, m_top);
@@ -34,13 +34,13 @@ public:
m_bottom = Min(p_rect.m_bottom, m_bottom);
}
inline void SetPoint(const MxPoint32& p_point)
void SetPoint(const MxPoint32& p_point)
{
this->m_left = p_point.GetX();
this->m_top = p_point.GetY();
}
inline void AddPoint(const MxPoint32& p_point)
void AddPoint(const MxPoint32& p_point)
{
this->m_left += p_point.GetX();
this->m_top += p_point.GetY();
@@ -48,7 +48,7 @@ public:
this->m_bottom += p_point.GetY();
}
inline void SubtractPoint(const MxPoint32& p_point)
void SubtractPoint(const MxPoint32& p_point)
{
this->m_left -= p_point.GetX();
this->m_top -= p_point.GetY();
@@ -56,7 +56,7 @@ public:
this->m_bottom -= p_point.GetY();
}
inline void UpdateBounds(const MxRect32& p_rect)
void UpdateBounds(const MxRect32& p_rect)
{
m_left = Min(m_left, p_rect.m_left);
m_top = Min(m_top, p_rect.m_top);
@@ -64,31 +64,31 @@ public:
m_bottom = Max(m_bottom, p_rect.m_bottom);
}
inline MxBool IsValid() const { return m_left < m_right && m_top < m_bottom; }
MxBool IsValid() const { return m_left < m_right && m_top < m_bottom; }
inline MxBool IntersectsWith(const MxRect32& p_rect) const
MxBool IntersectsWith(const MxRect32& p_rect) const
{
return m_left < p_rect.m_right && p_rect.m_left < m_right && m_top < p_rect.m_bottom && p_rect.m_top < m_bottom;
}
inline MxS32 GetWidth() const { return (m_right - m_left) + 1; }
inline MxS32 GetHeight() const { return (m_bottom - m_top) + 1; }
MxS32 GetWidth() const { return (m_right - m_left) + 1; }
MxS32 GetHeight() const { return (m_bottom - m_top) + 1; }
inline MxPoint32 GetPoint() const { return MxPoint32(this->m_left, this->m_top); }
inline MxSize32 GetSize() const { return MxSize32(this->m_right, this->m_bottom); }
MxPoint32 GetPoint() const { return MxPoint32(this->m_left, this->m_top); }
MxSize32 GetSize() const { return MxSize32(this->m_right, this->m_bottom); }
inline MxS32 GetLeft() const { return m_left; }
inline MxS32 GetTop() const { return m_top; }
inline MxS32 GetRight() const { return m_right; }
inline MxS32 GetBottom() const { return m_bottom; }
MxS32 GetLeft() const { return m_left; }
MxS32 GetTop() const { return m_top; }
MxS32 GetRight() const { return m_right; }
MxS32 GetBottom() const { return m_bottom; }
inline void SetLeft(MxS32 p_left) { m_left = p_left; }
inline void SetTop(MxS32 p_top) { m_top = p_top; }
inline void SetRight(MxS32 p_right) { m_right = p_right; }
inline void SetBottom(MxS32 p_bottom) { m_bottom = p_bottom; }
void SetLeft(MxS32 p_left) { m_left = p_left; }
void SetTop(MxS32 p_top) { m_top = p_top; }
void SetRight(MxS32 p_right) { m_right = p_right; }
void SetBottom(MxS32 p_bottom) { m_bottom = p_bottom; }
private:
inline void CopyFrom(MxS32 p_left, MxS32 p_top, MxS32 p_right, MxS32 p_bottom)
void CopyFrom(MxS32 p_left, MxS32 p_top, MxS32 p_right, MxS32 p_bottom)
{
this->m_left = p_left;
this->m_top = p_top;
@@ -96,7 +96,7 @@ private:
this->m_bottom = p_bottom;
}
inline void CopyFrom(const MxRect32& p_rect)
void CopyFrom(const MxRect32& p_rect)
{
this->m_left = p_rect.m_left;
this->m_top = p_rect.m_top;
@@ -106,7 +106,7 @@ private:
// The address might also be the constructor that calls CopyFrom
// FUNCTION: LEGO1 0x100b6fc0
inline MxRect32* CopyFrom(const MxPoint32& p_point, const MxSize32& p_size)
MxRect32* CopyFrom(const MxPoint32& p_point, const MxSize32& p_size)
{
this->m_left = p_point.GetX();
this->m_top = p_point.GetY();
@@ -115,8 +115,8 @@ private:
return this;
}
inline static MxS32 Min(MxS32 p_a, MxS32 p_b) { return p_a <= p_b ? p_a : p_b; }
inline static MxS32 Max(MxS32 p_a, MxS32 p_b) { return p_a <= p_b ? p_b : p_a; }
static MxS32 Min(MxS32 p_a, MxS32 p_b) { return p_a <= p_b ? p_a : p_b; }
static MxS32 Max(MxS32 p_a, MxS32 p_b) { return p_a <= p_b ? p_b : p_a; }
MxS32 m_left; // 0x00
MxS32 m_top; // 0x04