Remove default dtors of IGUIObject derived classes

This commit is contained in:
Itms 2025-08-10 22:25:06 +02:00 committed by Nicolas Auvray
parent 6a8366b99a
commit 74bbdca25f
28 changed files with 19 additions and 87 deletions

View file

@ -48,10 +48,6 @@ CButton::CButton(CGUI& pGUI)
AddText();
}
CButton::~CButton()
{
}
void CButton::SetupText()
{
ENSURE(m_GeneratedTexts.size() == 1);

View file

@ -37,7 +37,6 @@ class CButton : public IGUIObject, public IGUITextOwner, public IGUIButtonBehavi
GUI_OBJECT(CButton)
public:
CButton(CGUI& pGUI);
virtual ~CButton();
/**
* @see IGUIObject#ResetStates()

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2024 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -53,10 +53,6 @@ CChart::CChart(CGUI& pGUI)
{
}
CChart::~CChart()
{
}
void CChart::UpdateCachedSize()
{
IGUIObject::UpdateCachedSize();

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2021 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -55,7 +55,6 @@ class CChart : public IGUIObject, public IGUITextOwner
public:
CChart(CGUI& pGUI);
virtual ~CChart();
protected:
/**

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2024 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -38,10 +38,6 @@ CCheckBox::CCheckBox(CGUI& pGUI)
{
}
CCheckBox::~CCheckBox()
{
}
void CCheckBox::ResetStates()
{
IGUIObject::ResetStates();

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2021 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -31,7 +31,6 @@ class CCheckBox : public IGUIObject, public IGUIButtonBehavior
public:
CCheckBox(CGUI& pGUI);
virtual ~CCheckBox();
/**
* @see IGUIObject#ResetStates()

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2024 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -65,10 +65,6 @@ CDropDown::CDropDown(CGUI& pGUI)
m_ScrollBar.Set(true, true);
}
CDropDown::~CDropDown()
{
}
void CDropDown::SetupText()
{
SetupListRect();

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2021 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -58,7 +58,6 @@ class CDropDown : public CList
public:
CDropDown(CGUI& pGUI);
virtual ~CDropDown();
/**
* @see IGUIObject#HandleMessage()

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2021 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -63,10 +63,6 @@ CHotkeyPicker::CHotkeyPicker(CGUI& pGUI) : IGUIObject(pGUI), m_TimeToCombination
m_KeysPressed.reserve(8);
}
CHotkeyPicker::~CHotkeyPicker()
{
}
void CHotkeyPicker::FireEvent(const CStr& event)
{
ScriptRequest rq(*m_pGUI.GetScriptInterface());

View file

@ -41,7 +41,6 @@ class CHotkeyPicker : public IGUIObject
public:
CHotkeyPicker(CGUI& pGUI);
virtual ~CHotkeyPicker();
// Do nothing.
virtual void Draw(CCanvas2D&) {};

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2024 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -28,10 +28,6 @@ CImage::CImage(CGUI& pGUI)
{
}
CImage::~CImage()
{
}
void CImage::Draw(CCanvas2D& canvas)
{
m_pGUI.DrawSprite(m_Sprite, canvas, m_CachedActualSize, m_VisibleArea);

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2021 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -40,7 +40,6 @@ class CImage : public IGUIObject
public:
CImage(CGUI& pGUI);
virtual ~CImage();
protected:
/**

View file

@ -101,10 +101,6 @@ CInput::CInput(CGUI& pGUI)
AddScrollBar(std::move(bar));
}
CInput::~CInput()
{
}
void CInput::UpdateBufferPositionSetting()
{
m_BufferPosition.Set(m_iBufferPos, false);

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2022 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -54,7 +54,6 @@ protected: // forwards
public:
CInput(CGUI& pGUI);
virtual ~CInput();
/**
* @see IGUIObject#ResetStates()

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2024 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -81,10 +81,6 @@ CList::CList(CGUI& pGUI)
AddScrollBar(std::move(bar));
}
CList::~CList()
{
}
void CList::SetupText()
{
SetupText(false);

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2021 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -50,7 +50,6 @@ class CList : public IGUIObject, public IGUIScrollBarOwner, public IGUITextOwner
GUI_OBJECT(CList)
public:
CList(CGUI& pGUI);
virtual ~CList();
/**
* @see IGUIObject#ResetStates()

View file

@ -119,8 +119,6 @@ CMiniMap::CMiniMap(CGUI& pGUI) :
m_MouseHovering = false;
}
CMiniMap::~CMiniMap() = default;
void CMiniMap::HandleMessage(SGUIMessage& Message)
{
IGUIObject::HandleMessage(Message);

View file

@ -41,7 +41,6 @@ class CMiniMap : public IGUIObject
public:
CMiniMap(CGUI& pGUI);
virtual ~CMiniMap();
bool Flare(const CVector2D& pos, const CStr& colorStr);

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2024 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -34,10 +34,6 @@ CProgressBar::CProgressBar(CGUI& pGUI)
{
}
CProgressBar::~CProgressBar()
{
}
void CProgressBar::HandleMessage(SGUIMessage& Message)
{
IGUIObject::HandleMessage(Message);

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2021 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -33,7 +33,6 @@ class CProgressBar : public IGUIObject
public:
CProgressBar(CGUI& pGUI);
virtual ~CProgressBar();
protected:
/**

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2024 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -50,10 +50,6 @@ CScrollPanel::CScrollPanel(CGUI& pGUI)
AddScrollBar(std::move(hbar));
}
CScrollPanel::~CScrollPanel()
{
}
void CScrollPanel::ResetStates()
{
IGUIPanel::ResetStates();

View file

@ -1,4 +1,4 @@
/* Copyright (C) 20244 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -35,7 +35,6 @@ class CScrollPanel : public IGUIPanel, public IGUIScrollBarOwner
mutable std::vector<IGUIObject*> m_ModifiedChildren; // To store the modified vector
public:
CScrollPanel(CGUI& pGUI);
virtual ~CScrollPanel();
virtual void UpdateCachedSize();
virtual void ResetStates();

View file

@ -41,10 +41,6 @@ CSlider::CSlider(CGUI& pGUI)
m_Value.Set(Clamp<float>(m_Value, m_MinValue, m_MaxValue), false);
}
CSlider::~CSlider()
{
}
void CSlider::ResetStates()
{
IGUIObject::ResetStates();

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2021 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -34,7 +34,6 @@ class CSlider : public IGUIObject, public IGUIButtonBehavior
public:
CSlider(CGUI& pGUI);
virtual ~CSlider();
protected:
static const CStr EventNameValueChange;

View file

@ -58,10 +58,6 @@ CText::CText(CGUI& pGUI)
AddText();
}
CText::~CText()
{
}
void CText::SetupText()
{
if (m_GeneratedTexts.empty())

View file

@ -39,7 +39,6 @@ class CText : public IGUIObject, public IGUIScrollBarOwner, public IGUITextOwner
GUI_OBJECT(CText)
public:
CText(CGUI& pGUI);
virtual ~CText();
/**
* @see IGUIObject#ResetStates()

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2024 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -57,10 +57,6 @@ CTooltip::CTooltip(CGUI& pGUI)
AddText();
}
CTooltip::~CTooltip()
{
}
void CTooltip::SetupText()
{
ENSURE(m_GeneratedTexts.size() == 1);

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2021 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -40,7 +40,6 @@ class CTooltip : public IGUIObject, public IGUITextOwner
public:
CTooltip(CGUI& pGUI);
virtual ~CTooltip();
const CStr& GetUsedObject() const { return m_UseObject; }
i32 GetTooltipDelay() const { return m_Delay; }