Skip to content

Commit

Permalink
Add default destructors to various VGUI control classes for proper cl…
Browse files Browse the repository at this point in the history
…eanup
  • Loading branch information
andrewmcwatters committed Dec 15, 2024
1 parent 9f1520b commit bdae57c
Show file tree
Hide file tree
Showing 79 changed files with 176 additions and 2 deletions.
1 change: 1 addition & 0 deletions mp/src/game/client/achievement_notification_panel.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class CAchievementNotificationPanel : public CHudElement, public EditablePanel

public:
CAchievementNotificationPanel( const char *pElementName );
virtual ~CAchievementNotificationPanel() {}

virtual void Init();
virtual void ApplySchemeSettings( IScheme *scheme );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/c_point_commentary_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class CHudCommentary : public CHudElement, public vgui::Panel
DECLARE_CLASS_SIMPLE( CHudCommentary, vgui::Panel );
public:
CHudCommentary( const char *name );
virtual ~CHudCommentary() {}

virtual void Init( void );
virtual void VidInit( void );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/c_vguiscreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class CVGuiScreenPanel : public vgui::EditablePanel
public:
CVGuiScreenPanel( vgui::Panel *parent, const char *panelName );
CVGuiScreenPanel( vgui::Panel *parent, const char *panelName, vgui::HScheme hScheme );
virtual ~CVGuiScreenPanel() {}
virtual bool Init( KeyValues* pKeyValues, VGuiScreenInitData_t* pInitData );
vgui::Panel *CreateControlByName(const char *controlName);
virtual void OnCommand( const char *command );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/commentary_modelviewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class CCommentaryModelPanel : public CModelPanel
DECLARE_CLASS_SIMPLE( CCommentaryModelPanel, CModelPanel );

CCommentaryModelPanel( vgui::Panel *parent, const char *name );
virtual ~CCommentaryModelPanel() {}
};

//-----------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/game_controls/IconPanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class CIconPanel : public vgui::Panel

public:
CIconPanel( vgui::Panel *parent, const char *name );
virtual ~CIconPanel() {}

void Init( void );
virtual void Paint();
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/game_controls/SpectatorGUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ class CSpecButton : public Button
{
public:
CSpecButton(Panel *parent, const char *panelName): Button(parent, panelName, "") {}
virtual ~CSpecButton() {}

private:
void ApplySchemeSettings(vgui::IScheme *pScheme)
Expand Down
4 changes: 4 additions & 0 deletions mp/src/game/client/game_controls/baseviewport.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ class CBaseViewport : public vgui::EditablePanel, public IViewPort, public IGame
SetSizeable(false);
SetProportional(true);
}

virtual ~CBackGroundPanel()
{
}
private:

virtual void ApplySchemeSettings(IScheme *pScheme)
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/game_controls/vguitextwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ class CTextWindow : public vgui::Frame, public IViewPortPanel

public:
CMOTDHTML( Panel *parent, const char *pchName ) : vgui::HTML( parent, pchName ) {}
virtual ~CMOTDHTML() {}
virtual bool OnStartRequest( const char *url, const char *target, const char *pchPostData, bool bIsRedirect ) OVERRIDE;
};
CMOTDHTML *m_pHTMLMessage;
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/geiger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class CHudGeiger: public CHudElement, public vgui::Panel
DECLARE_CLASS_SIMPLE( CHudGeiger, vgui::Panel );
public:
CHudGeiger( const char *pElementName );
virtual ~CHudGeiger() {}
void Init( void );
void VidInit( void );
bool ShouldDraw( void );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/history_resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class CHudHistoryResource : public CHudElement, public vgui::Panel
public:

CHudHistoryResource( const char *pElementName );
virtual ~CHudHistoryResource() {}

// CHudElement overrides
virtual void Init( void );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2/c_info_teleporter_countdown.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ class CTeleportCountdownScreen : public CVGuiScreenPanel

public:
CTeleportCountdownScreen( vgui::Panel *parent, const char *panelName );
virtual ~CTeleportCountdownScreen() {}

virtual bool Init( KeyValues* pKeyValues, VGuiScreenInitData_t* pInitData );
virtual void OnTick();
Expand Down
5 changes: 5 additions & 0 deletions mp/src/game/client/hl2/hud_ammo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class CHudAmmo : public CHudNumericDisplay, public CHudElement

public:
CHudAmmo( const char *pElementName );
virtual ~CHudAmmo() {}
void Init( void );
void VidInit( void );
void Reset();
Expand Down Expand Up @@ -366,6 +367,10 @@ class CHudSecondaryAmmo : public CHudNumericDisplay, public CHudElement
SetHiddenBits( HIDEHUD_HEALTH | HIDEHUD_WEAPONSELECTION | HIDEHUD_PLAYERDEAD | HIDEHUD_NEEDSUIT );
}

virtual ~CHudSecondaryAmmo()
{
}

void Init( void )
{
#ifndef HL2MP
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2/hud_battery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class CHudBattery : public CHudNumericDisplay, public CHudElement

public:
CHudBattery( const char *pElementName );
virtual ~CHudBattery() {}
void Init( void );
void Reset( void );
void VidInit( void );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2/hud_credits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class CHudCredits : public CHudElement, public vgui::Panel

public:
CHudCredits( const char *pElementName );
virtual ~CHudCredits() {}
virtual void Init( void );
virtual void LevelShutdown( void );

Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2/hud_damageindicator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class CHudDamageIndicator : public CHudElement, public vgui::Panel

public:
CHudDamageIndicator( const char *pElementName );
virtual ~CHudDamageIndicator() {}
void Init( void );
void Reset( void );
virtual bool ShouldDraw( void );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2/hud_filmdemo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class CHudFilmDemo : public CHudElement, public vgui::Panel
DECLARE_CLASS_SIMPLE( CHudFilmDemo, vgui::Panel );
public:
CHudFilmDemo( const char *name );
virtual ~CHudFilmDemo() {}

// vgui overrides
virtual void ApplySchemeSettings(vgui::IScheme *pScheme );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2/hud_flashlight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class CHudFlashlight : public CHudElement, public vgui::Panel

public:
CHudFlashlight( const char *pElementName );
virtual ~CHudFlashlight() {}
virtual void ApplySchemeSettings( vgui::IScheme *pScheme );

protected:
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2/hud_hdrdemo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class CHudHDRDemo : public CHudElement, public vgui::Panel
DECLARE_CLASS_SIMPLE( CHudHDRDemo, vgui::Panel );
public:
CHudHDRDemo( const char *name );
virtual ~CHudHDRDemo() {}

// vgui overrides
virtual void ApplySchemeSettings(vgui::IScheme *pScheme );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2/hud_health.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class CHudHealth : public CHudElement, public CHudNumericDisplay

public:
CHudHealth( const char *pElementName );
virtual ~CHudHealth() {}
virtual void Init( void );
virtual void VidInit( void );
virtual void Reset( void );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2/hud_poisondamageindicator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class CHudPoisonDamageIndicator : public CHudElement, public vgui::Panel

public:
CHudPoisonDamageIndicator( const char *pElementName );
virtual ~CHudPoisonDamageIndicator() {}
void Reset( void );
virtual bool ShouldDraw( void );

Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2/hud_quickinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class CHUDQuickInfo : public CHudElement, public vgui::Panel
DECLARE_CLASS_SIMPLE( CHUDQuickInfo, vgui::Panel );
public:
CHUDQuickInfo( const char *pElementName );
virtual ~CHUDQuickInfo() {}
void Init( void );
void VidInit( void );
bool ShouldDraw( void );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2/hud_suitpower.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class CHudSuitPower : public CHudElement, public vgui::Panel

public:
CHudSuitPower( const char *pElementName );
virtual ~CHudSuitPower() {}
virtual void Init( void );
virtual void Reset( void );
virtual void OnThink( void );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2/hud_weaponselection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class CHudWeaponSelection : public CBaseHudWeaponSelection, public vgui::Panel

public:
CHudWeaponSelection(const char *pElementName );
virtual ~CHudWeaponSelection() {}

virtual bool ShouldDraw();
virtual void OnWeaponPickup( C_BaseCombatWeapon *pWeapon );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2/hud_zoom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class CHudZoom : public vgui::Panel, public CHudElement

public:
CHudZoom( const char *pElementName );
virtual ~CHudZoom() {}

bool ShouldDraw( void );
void Init( void );
Expand Down
3 changes: 3 additions & 0 deletions mp/src/game/client/hl2mp/clientmode_hl2mpnormal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ ClientModeHL2MPNormal* GetClientModeHL2MPNormal()
//-----------------------------------------------------------------------------
class CHudViewport : public CBaseViewport
{
public:
CHudViewport() {}
virtual ~CHudViewport() {}
private:
DECLARE_CLASS_SIMPLE( CHudViewport, CBaseViewport );

Expand Down
3 changes: 3 additions & 0 deletions mp/src/game/client/hl2mp/hl2mp_hud_chat.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class CHudChatLine : public CBaseHudChatLine

public:
CHudChatLine( vgui::Panel *parent, const char *panelName ) : CBaseHudChatLine( parent, panelName ) {}
virtual ~CHudChatLine() {}

virtual void ApplySchemeSettings(vgui::IScheme *pScheme);

Expand All @@ -39,6 +40,7 @@ class CHudChatInputLine : public CBaseHudChatInputLine

public:
CHudChatInputLine( CBaseHudChat *parent, char const *panelName ) : CBaseHudChatInputLine( parent, panelName ) {}
virtual ~CHudChatInputLine() {}

virtual void ApplySchemeSettings(vgui::IScheme *pScheme);
};
Expand All @@ -49,6 +51,7 @@ class CHudChat : public CBaseHudChat

public:
CHudChat( const char *pElementName );
virtual ~CHudChat() {}

virtual void CreateChatInputLine( void );
virtual void CreateChatLines( void );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2mp/hl2mp_hud_target_id.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class CTargetID : public CHudElement, public vgui::Panel

public:
CTargetID( const char *pElementName );
virtual ~CTargetID() {}
void Init( void );
virtual void ApplySchemeSettings( vgui::IScheme *scheme );
virtual void Paint( void );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2mp/hl2mp_hud_team.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class CTeamPlayHud : public vgui::Panel, public CHudElement

public:
CTeamPlayHud( const char *pElementName );
virtual ~CTeamPlayHud() {}
void Reset();

virtual void PerformLayout();
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2mp/hud_deathnotice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class CHudDeathNotice : public CHudElement, public vgui::Panel
DECLARE_CLASS_SIMPLE( CHudDeathNotice, vgui::Panel );
public:
CHudDeathNotice( const char *pElementName );
virtual ~CHudDeathNotice() {}

void Init( void );
void VidInit( void );
Expand Down
4 changes: 4 additions & 0 deletions mp/src/game/client/hl2mp/ui/backgroundpanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ class CaptionLabel : public Label
{
}

virtual ~CaptionLabel()
{
}

virtual void ApplySchemeSettings( vgui::IScheme *pScheme )
{
Label::ApplySchemeSettings( pScheme );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hl2mp/ui/hl2mptextwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class CHL2MPSpectatorGUI : public CSpectatorGUI

public:
CHL2MPSpectatorGUI( IViewPort *pViewPort );
virtual ~CHL2MPSpectatorGUI() {}

virtual void Update( void );
virtual bool NeedsUpdate( void );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hud_animationinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class CHudAnimationInfo : public CHudElement, public vgui::Panel
public:

CHudAnimationInfo( const char *pElementName );
virtual ~CHudAnimationInfo() {}

virtual bool ShouldDraw();

Expand Down
10 changes: 10 additions & 0 deletions mp/src/game/client/hud_basechat.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ class CHudChatHistory : public vgui::RichText
public:

CHudChatHistory( vgui::Panel *pParent, const char *panelName );
virtual ~CHudChatHistory() {}

virtual void ApplySchemeSettings(vgui::IScheme *pScheme);
};
Expand All @@ -193,6 +194,7 @@ class CHudChatFilterButton : public vgui::Button
public:

CHudChatFilterButton( vgui::Panel *pParent, const char *pName, const char *pText );
virtual ~CHudChatFilterButton() {}

virtual void DoClick( void );
};
Expand All @@ -204,6 +206,7 @@ class CHudChatFilterCheckButton : public vgui::CheckButton
public:

CHudChatFilterCheckButton( vgui::Panel *pParent, const char *pName, const char *pText, int iFlag );
virtual ~CHudChatFilterCheckButton() {}

int GetFilterFlag( void ) { return m_iFlag; }

Expand All @@ -229,6 +232,7 @@ class CBaseHudChat : public CHudElement, public vgui::EditablePanel
};

CBaseHudChat( const char *pElementName );
virtual ~CBaseHudChat() {}

virtual void CreateChatInputLine( void );
virtual void CreateChatLines( void );
Expand Down Expand Up @@ -343,6 +347,10 @@ class CBaseHudChatEntry : public vgui::TextEntry
m_pHudChat = pChat;
}

virtual ~CBaseHudChatEntry()
{
}

virtual void ApplySchemeSettings( vgui::IScheme *pScheme )
{
BaseClass::ApplySchemeSettings(pScheme);
Expand Down Expand Up @@ -392,6 +400,7 @@ class CBaseHudChatInputLine : public vgui::Panel

public:
CBaseHudChatInputLine( vgui::Panel *parent, char const *panelName );
virtual ~CBaseHudChatInputLine() {}

void SetPrompt( const wchar_t *prompt );
void ClearEntry( void );
Expand Down Expand Up @@ -424,6 +433,7 @@ class CHudChatFilterPanel : public vgui::EditablePanel
public:

CHudChatFilterPanel( vgui::Panel *pParent, const char *pName );
virtual ~CHudChatFilterPanel() {}

virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
MESSAGE_FUNC_PTR( OnFilterButtonChecked, "CheckButtonChecked", panel );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hud_basetimer.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class CHudBaseTimer : public CHudNumericDisplay

public:
CHudBaseTimer(vgui::Panel *parent, const char *name);
virtual ~CHudBaseTimer() {}

void SetMinutes( int minutes );
void SetSeconds( int seconds );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hud_bitmapnumericdisplay.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class CHudBitmapNumericDisplay : public vgui::Panel

public:
CHudBitmapNumericDisplay(vgui::Panel *parent, const char *name);
virtual ~CHudBitmapNumericDisplay() {}

void SetDisplayValue(int value);
void SetShouldDisplayValue(bool state);
Expand Down
2 changes: 2 additions & 0 deletions mp/src/game/client/hud_hintdisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class CHudHintDisplay : public vgui::Panel, public CHudElement

public:
CHudHintDisplay( const char *pElementName );
virtual ~CHudHintDisplay() {}

void Init();
void Reset();
Expand Down Expand Up @@ -351,6 +352,7 @@ class CHudHintKeyDisplay : public vgui::Panel, public CHudElement

public:
CHudHintKeyDisplay( const char *pElementName );
virtual ~CHudHintKeyDisplay() {}
void Init();
void Reset();
void MsgFunc_KeyHintText( bf_read &msg );
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hud_numericdisplay.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class CHudNumericDisplay : public vgui::Panel

public:
CHudNumericDisplay(vgui::Panel *parent, const char *name);
virtual ~CHudNumericDisplay() {}

void SetDisplayValue(int value);
void SetSecondaryValue(int value);
Expand Down
1 change: 1 addition & 0 deletions mp/src/game/client/hud_squadstatus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class CHudSquadStatus : public CHudElement, public vgui::Panel

public:
CHudSquadStatus( const char *pElementName );
virtual ~CHudSquadStatus() {}
virtual void Init( void );
virtual void Reset( void );
virtual void OnThink( void );
Expand Down
Loading

0 comments on commit bdae57c

Please sign in to comment.