Remove unnecessary deconstructors
This commit is contained in:
parent
3982dfe5cc
commit
809e66cdb1
@ -274,9 +274,4 @@ namespace Components
|
||||
Bans::LoadBans(&list);
|
||||
});
|
||||
}
|
||||
|
||||
Bans::~Bans()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,6 @@ namespace Components
|
||||
typedef std::pair<SteamID, Game::netIP_t> Entry;
|
||||
|
||||
Bans();
|
||||
~Bans();
|
||||
|
||||
static void BanClientNum(int num, const std::string& reason);
|
||||
static void UnbanClient(SteamID id);
|
||||
|
@ -227,12 +227,4 @@ namespace Components
|
||||
AntiCheat::CheckStartupTime();
|
||||
#endif
|
||||
}
|
||||
|
||||
CardTitles::~CardTitles()
|
||||
{
|
||||
for (int i = 0; i < ARRAYSIZE(CardTitles::CustomTitles); ++i)
|
||||
{
|
||||
CardTitles::CustomTitles[i].clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -60,7 +60,6 @@ namespace Components
|
||||
static void ParseCustomTitles(const char * msg);
|
||||
|
||||
CardTitles();
|
||||
~CardTitles();
|
||||
|
||||
private:
|
||||
static CClient * GetClientByIndex(std::uint32_t index);
|
||||
|
@ -60,12 +60,4 @@ namespace Components
|
||||
Scheduler::OnFrameAsync(AntiCheat::QuickCodeScanner1);
|
||||
#endif
|
||||
}
|
||||
|
||||
Changelog::~Changelog()
|
||||
{
|
||||
{
|
||||
std::lock_guard<std::mutex> _(Changelog::Mutex);
|
||||
Changelog::Lines.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ namespace Components
|
||||
{
|
||||
public:
|
||||
Changelog();
|
||||
~Changelog();
|
||||
|
||||
static void LoadChangelog();
|
||||
|
||||
|
@ -328,9 +328,4 @@ namespace Components
|
||||
// Change logic that does word splitting with new lines for chat messages to support fonticons
|
||||
Utils::Hook(0x592E10, CG_AddToTeamChat_Stub, HOOK_JUMP).install()->quick();
|
||||
}
|
||||
|
||||
Chat::~Chat()
|
||||
{
|
||||
Chat::MuteList.clear();
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,6 @@ namespace Components
|
||||
static constexpr auto FONT_ICON_CHAT_WIDTH_CALCULATION_MULTIPLIER = 2.0f;
|
||||
public:
|
||||
Chat();
|
||||
~Chat();
|
||||
|
||||
private:
|
||||
static Game::dvar_t** cg_chatHeight;
|
||||
|
@ -101,12 +101,4 @@ namespace Components
|
||||
// Draw clantag before playername
|
||||
Utils::Hook(0x591242, ClanTags::DrawPlayerNameOnScoreboard).install()->quick();
|
||||
}
|
||||
|
||||
ClanTags::~ClanTags()
|
||||
{
|
||||
for (int i = 0; i < ARRAYSIZE(ClanTags::Tags); ++i)
|
||||
{
|
||||
ClanTags::Tags[i].clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,6 @@ namespace Components
|
||||
static const char* GetUserClantag(std::uint32_t clientnum, const char * playername);
|
||||
|
||||
ClanTags();
|
||||
~ClanTags();
|
||||
|
||||
private:
|
||||
static std::string Tags[18];
|
||||
|
@ -309,9 +309,4 @@ namespace Components
|
||||
ClientCommand::AddCheatCommands();
|
||||
ClientCommand::AddScriptFunctions();
|
||||
}
|
||||
|
||||
ClientCommand::~ClientCommand()
|
||||
{
|
||||
ClientCommand::FunctionMap.clear();
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ namespace Components
|
||||
typedef void(Callback)(Game::gentity_s* entity);
|
||||
|
||||
ClientCommand();
|
||||
~ClientCommand();
|
||||
|
||||
static void Add(const char* name, Utils::Slot<Callback> callback);
|
||||
static bool CheatsOk(const Game::gentity_s* ent);
|
||||
|
||||
|
@ -168,10 +168,4 @@ namespace Components
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Command::~Command()
|
||||
{
|
||||
Command::FunctionMap.clear();
|
||||
Command::FunctionMapSV.clear();
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ namespace Components
|
||||
public:
|
||||
Params() {};
|
||||
virtual ~Params() {};
|
||||
|
||||
virtual const char* get(size_t index) = 0;
|
||||
virtual size_t length() = 0;
|
||||
|
||||
@ -48,7 +49,6 @@ namespace Components
|
||||
typedef void(Callback)(Command::Params* params);
|
||||
|
||||
Command();
|
||||
~Command();
|
||||
|
||||
static Game::cmd_function_t* Allocate();
|
||||
|
||||
|
@ -519,9 +519,4 @@ namespace Components
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Dedicated::~Dedicated()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ namespace Components
|
||||
{
|
||||
public:
|
||||
Dedicated();
|
||||
~Dedicated();
|
||||
|
||||
static SteamID PlayerGuids[18][2];
|
||||
|
||||
|
@ -95,11 +95,6 @@ namespace Components
|
||||
#endif
|
||||
}
|
||||
|
||||
Discovery::~Discovery()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Discovery::preDestroy()
|
||||
{
|
||||
Discovery::IsPerforming = false;
|
||||
|
@ -6,7 +6,6 @@ namespace Components
|
||||
{
|
||||
public:
|
||||
Discovery();
|
||||
~Discovery();
|
||||
|
||||
void preDestroy() override;
|
||||
|
||||
|
@ -120,8 +120,4 @@ namespace Components
|
||||
Utils::Hook(0x570E0B, Elevators::PM_Trace_Hk, HOOK_CALL).install()->quick();
|
||||
Utils::Hook(0x570D70, Elevators::PM_Trace_Hk, HOOK_CALL).install()->quick();
|
||||
}
|
||||
|
||||
Elevators::~Elevators()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ namespace Components
|
||||
{
|
||||
public:
|
||||
Elevators();
|
||||
~Elevators();
|
||||
|
||||
private:
|
||||
enum ElevatorSettings { DISABLED, ENABLED, EASY };
|
||||
|
@ -622,9 +622,4 @@ namespace Components
|
||||
}, HOOK_CALL).install()/*->quick()*/;
|
||||
#endif
|
||||
}
|
||||
|
||||
FastFiles::~FastFiles()
|
||||
{
|
||||
FastFiles::ZonePaths.clear();
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ namespace Components
|
||||
{
|
||||
public:
|
||||
FastFiles();
|
||||
~FastFiles();
|
||||
|
||||
static void AddZonePath(const std::string& path);
|
||||
static std::string Current();
|
||||
|
@ -53,8 +53,4 @@ namespace Components
|
||||
Flags::EnabledFlags.push_back("stdout");
|
||||
}
|
||||
}
|
||||
|
||||
Flags::Flags()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ namespace Components
|
||||
class Flags : public Component
|
||||
{
|
||||
public:
|
||||
Flags();
|
||||
Flags() = default;
|
||||
|
||||
static bool HasFlag(const std::string& flag);
|
||||
|
||||
|
@ -913,7 +913,6 @@ namespace Components
|
||||
|
||||
Menus::~Menus()
|
||||
{
|
||||
Menus::CustomMenus.clear();
|
||||
Menus::FreeEverything();
|
||||
}
|
||||
}
|
||||
|
@ -101,9 +101,4 @@ namespace Components
|
||||
|
||||
UIFeeder::Add(9.0f, ModList::GetItemCount, ModList::GetItemText, ModList::Select);
|
||||
}
|
||||
|
||||
ModList::~ModList()
|
||||
{
|
||||
ModList::Mods.clear();
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ namespace Components
|
||||
{
|
||||
public:
|
||||
ModList();
|
||||
~ModList();
|
||||
|
||||
static void RunMod(const std::string& mod);
|
||||
|
||||
|
@ -39,9 +39,4 @@ namespace Components
|
||||
|
||||
MusicalTalent::Replace("music_mainmenu_mp", "hz_t_menumusic.mp3");
|
||||
}
|
||||
|
||||
MusicalTalent::~MusicalTalent()
|
||||
{
|
||||
MusicalTalent::SoundAliasList.clear();
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ namespace Components
|
||||
{
|
||||
public:
|
||||
MusicalTalent();
|
||||
~MusicalTalent();
|
||||
|
||||
static void Replace(const std::string& sound, const char* file);
|
||||
|
||||
|
@ -403,11 +403,4 @@ namespace Components
|
||||
Network::SendRaw(address, address.getString());
|
||||
});
|
||||
}
|
||||
|
||||
Network::~Network()
|
||||
{
|
||||
Network::SelectedPacket.clear();
|
||||
Network::PacketHandlers.clear();
|
||||
Network::StartupSignal.clear();
|
||||
}
|
||||
}
|
||||
|
@ -52,7 +52,6 @@ namespace Components
|
||||
typedef void(CallbackRaw)();
|
||||
|
||||
Network();
|
||||
~Network();
|
||||
|
||||
static unsigned short GetPort();
|
||||
|
||||
|
@ -513,9 +513,4 @@ namespace Components
|
||||
Friends::UpdateServer(address, info.get("hostname"), info.get("mapname"));
|
||||
});
|
||||
}
|
||||
|
||||
Party::~Party()
|
||||
{
|
||||
Party::LobbyMap.clear();
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ namespace Components
|
||||
{
|
||||
public:
|
||||
Party();
|
||||
~Party();
|
||||
|
||||
static Network::Address Target();
|
||||
static void Connect(Network::Address target);
|
||||
|
@ -190,11 +190,4 @@ namespace Components
|
||||
Network::Handle("playlistResponse", PlaylistReponse);
|
||||
Network::Handle("playlistInvalidPassword", PlaylistInvalidPassword);
|
||||
}
|
||||
|
||||
Playlist::~Playlist()
|
||||
{
|
||||
Playlist::MapRelocation.clear();
|
||||
Playlist::CurrentPlaylistBuffer.clear();
|
||||
Playlist::ReceivedPlaylistBuffer.clear();
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,6 @@ namespace Components
|
||||
typedef void(*Callback)();
|
||||
|
||||
Playlist();
|
||||
~Playlist();
|
||||
|
||||
static void LoadPlaylist();
|
||||
|
||||
|
@ -173,9 +173,4 @@ namespace Components
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
RCon::~RCon()
|
||||
{
|
||||
RCon::Password.clear();
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ namespace Components
|
||||
{
|
||||
public:
|
||||
RCon();
|
||||
~RCon();
|
||||
|
||||
private:
|
||||
class Container
|
||||
|
@ -705,14 +705,6 @@ namespace Components
|
||||
|
||||
Script::~Script()
|
||||
{
|
||||
Script::ScriptName.clear();
|
||||
Script::ScriptHandles.clear();
|
||||
Script::ScriptNameStack.clear();
|
||||
Script::ScriptFunctions.clear();
|
||||
Script::ReplacedFunctions.clear();
|
||||
Script::VMShutdownSignal.clear();
|
||||
|
||||
Script::ScriptStorage.clear();
|
||||
Script::ScriptBaseProgramNum.clear();
|
||||
}
|
||||
}
|
||||
|
@ -65,9 +65,4 @@ namespace Components
|
||||
// Server command receive hook
|
||||
Utils::Hook(0x59449F, ServerCommands::OnServerCommandStub).install()->quick();
|
||||
}
|
||||
|
||||
ServerCommands::~ServerCommands()
|
||||
{
|
||||
ServerCommands::Commands.clear();
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ namespace Components
|
||||
{
|
||||
public:
|
||||
ServerCommands();
|
||||
~ServerCommands();
|
||||
|
||||
static void OnCommand(std::int32_t cmd, Utils::Slot<bool(Command::Params*)> cb);
|
||||
|
||||
|
@ -880,15 +880,8 @@ namespace Components
|
||||
|
||||
ServerList::~ServerList()
|
||||
{
|
||||
ServerList::OnlineList.clear();
|
||||
ServerList::OfflineList.clear();
|
||||
ServerList::FavouriteList.clear();
|
||||
ServerList::VisibleList.clear();
|
||||
|
||||
{
|
||||
std::lock_guard<std::recursive_mutex> _(ServerList::RefreshContainer.mutex);
|
||||
ServerList::RefreshContainer.awatingList = false;
|
||||
ServerList::RefreshContainer.servers.clear();
|
||||
}
|
||||
std::lock_guard<std::recursive_mutex> _(ServerList::RefreshContainer.mutex);
|
||||
ServerList::RefreshContainer.awatingList = false;
|
||||
ServerList::RefreshContainer.servers.clear();
|
||||
}
|
||||
}
|
||||
|
@ -34,11 +34,6 @@ namespace Components
|
||||
});
|
||||
}
|
||||
|
||||
StartupMessages::~StartupMessages()
|
||||
{
|
||||
StartupMessages::MessageList.clear();
|
||||
}
|
||||
|
||||
void StartupMessages::AddMessage(const std::string& message)
|
||||
{
|
||||
StartupMessages::MessageList.push_back(message);
|
||||
|
@ -6,7 +6,6 @@ namespace Components
|
||||
{
|
||||
public:
|
||||
StartupMessages();
|
||||
~StartupMessages();
|
||||
|
||||
static void AddMessage(const std::string& message);
|
||||
|
||||
|
@ -107,9 +107,4 @@ namespace Components
|
||||
// Write stats to mod folder if a mod is loaded
|
||||
Utils::Hook(0x682F7B, Stats::SaveStats, HOOK_CALL).install()->quick();
|
||||
}
|
||||
|
||||
Stats::~Stats()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ namespace Components
|
||||
{
|
||||
public:
|
||||
Stats();
|
||||
~Stats();
|
||||
|
||||
static bool IsMaxLevel();
|
||||
|
||||
|
@ -76,9 +76,4 @@ namespace Components
|
||||
return header;
|
||||
});
|
||||
}
|
||||
|
||||
StringTable::~StringTable()
|
||||
{
|
||||
StringTable::StringTableMap.clear();
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ namespace Components
|
||||
{
|
||||
public:
|
||||
StringTable();
|
||||
~StringTable();
|
||||
|
||||
private:
|
||||
static std::unordered_map<std::string, Game::StringTable*> StringTableMap;
|
||||
|
@ -311,9 +311,4 @@ namespace Components
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
StructuredData::~StructuredData()
|
||||
{
|
||||
StructuredData::MemAllocator.clear();
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,6 @@ namespace Components
|
||||
};
|
||||
|
||||
StructuredData();
|
||||
~StructuredData();
|
||||
|
||||
private:
|
||||
static bool UpdateVersionOffsets(Game::StructuredDataDefSet *set, Game::StructuredDataBuffer *buffer, Game::StructuredDataDef *oldDef);
|
||||
|
@ -3696,10 +3696,5 @@ namespace Components
|
||||
Utils::Hook::Set<WORD>(0x6B9602,0xCCCC);
|
||||
#endif
|
||||
}
|
||||
|
||||
Zones::~Zones()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
#pragma optimize( "", on )
|
@ -18,7 +18,6 @@ namespace Components
|
||||
};
|
||||
|
||||
Zones();
|
||||
~Zones();
|
||||
|
||||
static void SetVersion(int version);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user