mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge pull request #7306 from Marmare314/component-single-member
store only pointer to editor in CEditorComponent
This commit is contained in:
commit
bdcf3e67f7
|
@ -5,18 +5,6 @@
|
|||
void CEditorComponent::Init(CEditor *pEditor)
|
||||
{
|
||||
m_pEditor = pEditor;
|
||||
m_pInput = pEditor->Input();
|
||||
m_pClient = pEditor->Client();
|
||||
m_pConfig = pEditor->Config();
|
||||
m_pConsole = pEditor->Console();
|
||||
m_pEngine = pEditor->Engine();
|
||||
m_pGraphics = pEditor->Graphics();
|
||||
m_pSound = pEditor->Sound();
|
||||
m_pTextRender = pEditor->TextRender();
|
||||
m_pStorage = pEditor->Storage();
|
||||
m_pUI = pEditor->UI();
|
||||
m_pRenderTools = pEditor->RenderTools();
|
||||
|
||||
OnReset();
|
||||
}
|
||||
|
||||
|
@ -96,14 +84,14 @@ void CEditorComponent::RegisterSubComponent(CEditorComponent &Component)
|
|||
|
||||
CEditor *CEditorComponent::Editor() { return m_pEditor; }
|
||||
const CEditor *CEditorComponent::Editor() const { return m_pEditor; }
|
||||
IInput *CEditorComponent::Input() { return m_pInput; }
|
||||
IClient *CEditorComponent::Client() { return m_pClient; }
|
||||
CConfig *CEditorComponent::Config() { return m_pConfig; }
|
||||
IConsole *CEditorComponent::Console() { return m_pConsole; }
|
||||
IEngine *CEditorComponent::Engine() { return m_pEngine; }
|
||||
IGraphics *CEditorComponent::Graphics() { return m_pGraphics; }
|
||||
ISound *CEditorComponent::Sound() { return m_pSound; }
|
||||
ITextRender *CEditorComponent::TextRender() { return m_pTextRender; }
|
||||
IStorage *CEditorComponent::Storage() { return m_pStorage; }
|
||||
CUI *CEditorComponent::UI() { return m_pUI; }
|
||||
CRenderTools *CEditorComponent::RenderTools() { return m_pRenderTools; }
|
||||
IInput *CEditorComponent::Input() { return m_pEditor->Input(); }
|
||||
IClient *CEditorComponent::Client() { return m_pEditor->Client(); }
|
||||
CConfig *CEditorComponent::Config() { return m_pEditor->Config(); }
|
||||
IConsole *CEditorComponent::Console() { return m_pEditor->Console(); }
|
||||
IEngine *CEditorComponent::Engine() { return m_pEditor->Engine(); }
|
||||
IGraphics *CEditorComponent::Graphics() { return m_pEditor->Graphics(); }
|
||||
ISound *CEditorComponent::Sound() { return m_pEditor->Sound(); }
|
||||
ITextRender *CEditorComponent::TextRender() { return m_pEditor->TextRender(); }
|
||||
IStorage *CEditorComponent::Storage() { return m_pEditor->Storage(); }
|
||||
CUI *CEditorComponent::UI() { return m_pEditor->UI(); }
|
||||
CRenderTools *CEditorComponent::RenderTools() { return m_pEditor->RenderTools(); }
|
||||
|
|
|
@ -85,17 +85,6 @@ public:
|
|||
|
||||
private:
|
||||
CEditor *m_pEditor;
|
||||
IInput *m_pInput;
|
||||
IClient *m_pClient;
|
||||
CConfig *m_pConfig;
|
||||
IConsole *m_pConsole;
|
||||
IEngine *m_pEngine;
|
||||
IGraphics *m_pGraphics;
|
||||
ISound *m_pSound;
|
||||
ITextRender *m_pTextRender;
|
||||
IStorage *m_pStorage;
|
||||
CUI *m_pUI;
|
||||
CRenderTools *m_pRenderTools;
|
||||
|
||||
std::vector<std::reference_wrapper<CEditorComponent>> m_vSubComponents = {};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue