From c2adfc562890ccbca03f8038b7a0befcedb3d36d Mon Sep 17 00:00:00 2001 From: marmare314 <49279081+Marmare314@users.noreply.github.com> Date: Fri, 6 Oct 2023 11:34:40 +0200 Subject: [PATCH] make CEnvelope::m_PointsAccess private --- src/game/editor/mapitems/envelope.cpp | 2 +- src/game/editor/mapitems/envelope.h | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/game/editor/mapitems/envelope.cpp b/src/game/editor/mapitems/envelope.cpp index 172e4e84b..5f0524eb2 100644 --- a/src/game/editor/mapitems/envelope.cpp +++ b/src/game/editor/mapitems/envelope.cpp @@ -31,7 +31,7 @@ const CEnvPointBezier *CEnvelope::CEnvelopePointAccess::GetBezier(int Index) con } CEnvelope::CEnvelope(EType Type) : - m_PointsAccess(&m_vPoints), m_Type(Type) {} + m_Type(Type), m_PointsAccess(&m_vPoints) {} CEnvelope::CEnvelope(int NumChannels) : m_PointsAccess(&m_vPoints) diff --git a/src/game/editor/mapitems/envelope.h b/src/game/editor/mapitems/envelope.h index b4fcd8aa6..0d167e459 100644 --- a/src/game/editor/mapitems/envelope.h +++ b/src/game/editor/mapitems/envelope.h @@ -6,21 +6,8 @@ class CEnvelope { - class CEnvelopePointAccess : public IEnvelopePointAccess - { - std::vector *m_pvPoints; - - public: - CEnvelopePointAccess(std::vector *pvPoints); - - int NumPoints() const override; - const CEnvPoint *GetPoint(int Index) const override; - const CEnvPointBezier *GetBezier(int Index) const override; - }; - public: std::vector m_vPoints; - CEnvelopePointAccess m_PointsAccess; char m_aName[32] = ""; bool m_Synchronized = false; @@ -43,6 +30,19 @@ private: void Resort(); EType m_Type; + + class CEnvelopePointAccess : public IEnvelopePointAccess + { + std::vector *m_pvPoints; + + public: + CEnvelopePointAccess(std::vector *pvPoints); + + int NumPoints() const override; + const CEnvPoint *GetPoint(int Index) const override; + const CEnvPointBezier *GetBezier(int Index) const override; + }; + CEnvelopePointAccess m_PointsAccess; }; #endif