From 97e4547192c6e656cc10c350a29d4b17bf0b4564 Mon Sep 17 00:00:00 2001 From: Alex King <89047260+Kinglykrab@users.noreply.github.com> Date: Fri, 17 Mar 2023 19:20:41 -0400 Subject: [PATCH] [Cleanup] Remove DBInitVars(), HandleMysqlError(), and IsChatChannelInDB() in ucs/database.h (#3113) # Notes - These are unused. --- ucs/database.cpp | 12 ------------ ucs/database.h | 7 ------- 2 files changed, 19 deletions(-) diff --git a/ucs/database.cpp b/ucs/database.cpp index b33efe205..f214486fd 100644 --- a/ucs/database.cpp +++ b/ucs/database.cpp @@ -283,18 +283,6 @@ void UCSDatabase::LoadFilteredNamesFromDB() LogInfo("Loaded [{}] filtered channel name(s)", names.size()); } -bool UCSDatabase::IsChatChannelInDB(const std::string& channel_name) -{ - auto r = ChatchannelsRepository::Count( - *this, - fmt::format( - "name = {}", Strings::Escape(channel_name) - ) - ); - - return r > 0; -} - void UCSDatabase::SaveChatChannel( const std::string& channel_name, const std::string& channel_owner, diff --git a/ucs/database.h b/ucs/database.h index 0299a6887..68955c35a 100644 --- a/ucs/database.h +++ b/ucs/database.h @@ -45,7 +45,6 @@ public: bool LoadChatChannels(); void LoadReservedNamesFromDB(); void LoadFilteredNamesFromDB(); - bool IsChatChannelInDB(const std::string& channel_name); bool CheckChannelNameFilter(const std::string& channel_name); void SaveChatChannel(const std::string& channel_name, const std::string& channel_owner, const std::string& channel_password, const uint16& min_status); void DeleteChatChannel(const std::string& channel_name); @@ -62,12 +61,6 @@ public: void AddFriendOrIgnore(const int& char_id, const int& type, const std::string& name); void RemoveFriendOrIgnore(const int& char_id, const int& type, const std::string& name); void GetFriendsAndIgnore(const int& char_id, std::vector &Friends, std::vector &Ignorees); - -protected: - void HandleMysqlError(uint32 errnum); -private: - void DBInitVars(); - }; #endif