Skip to content

Commit

Permalink
[fix] default empty destructors
Browse files Browse the repository at this point in the history
  • Loading branch information
raxyte committed Aug 7, 2023
1 parent ffa90f3 commit 47a163e
Show file tree
Hide file tree
Showing 12 changed files with 8 additions and 36 deletions.
2 changes: 1 addition & 1 deletion include/dpp/appcommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@ class DPP_EXPORT slashcommand : public managed, public json_interface<slashcomma
/**
* @brief Destroy the slashcommand object
*/
virtual ~slashcommand();
virtual ~slashcommand() = default;

/**
* @brief Add a localisation for this slash command
Expand Down
4 changes: 2 additions & 2 deletions include/dpp/channel.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ struct DPP_EXPORT forum_tag : public managed {
forum_tag(const std::string& name);

/** Destructor */
virtual ~forum_tag();
virtual ~forum_tag() = default;

/**
* @brief Read struct values from a json object
Expand Down Expand Up @@ -795,7 +795,7 @@ class DPP_EXPORT thread : public channel {
/**
* @brief Destroy the thread object
*/
virtual ~thread();
virtual ~thread() = default;

/**
* @brief Build json for this thread object
Expand Down
2 changes: 1 addition & 1 deletion include/dpp/httpsclient.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ class DPP_EXPORT https_client : public ssl_client
/**
* @brief Destroy the https client object
*/
virtual ~https_client();
virtual ~https_client() = default;

/**
* @brief Build a multipart content from a set of files and some json
Expand Down
2 changes: 1 addition & 1 deletion include/dpp/integration.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class DPP_EXPORT integration : public managed, public json_interface<integration
integration();

/** Default destructor */
~integration();
~integration() = default;

/** Read class values from json object
* @param j A json object to read from
Expand Down
4 changes: 2 additions & 2 deletions include/dpp/user.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class DPP_EXPORT user : public managed, public json_interface<user> {
/**
* @brief Destroy the user object
*/
virtual ~user();
virtual ~user() = default;

/**
* @brief Create a mentionable user.
Expand Down Expand Up @@ -359,7 +359,7 @@ class DPP_EXPORT user_identified : public user, public json_interface<user_ident
/**
* @brief Destroy the user identified object
*/
virtual ~user_identified();
virtual ~user_identified() = default;

/**
* @brief Return true if user has an animated banner
Expand Down
2 changes: 1 addition & 1 deletion include/dpp/wsclient.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class DPP_EXPORT websocket_client : public ssl_client
/**
* @brief Destroy the websocket client object
*/
virtual ~websocket_client();
virtual ~websocket_client() = default;

/**
* @brief Write to websocket. Encapsulates data in frames if the status is CONNECTED.
Expand Down
7 changes: 0 additions & 7 deletions src/dpp/channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ forum_tag::forum_tag(const std::string& name) : forum_tag() {
this->set_name(name);
}

forum_tag::~forum_tag()
{
}

forum_tag& forum_tag::fill_from_json(nlohmann::json *j) {
set_snowflake_not_null(j, "id", this->id);
set_string_not_null(j, "name", this->name);
Expand Down Expand Up @@ -365,9 +361,6 @@ thread& thread::fill_from_json(json* j) {
thread::thread() : channel(), total_messages_sent(0), message_count(0), member_count(0) {
}

thread::~thread() {
}

channel& channel::fill_from_json(json* j) {
this->id = snowflake_not_null(j, "id");
set_snowflake_not_null(j, "guild_id", this->guild_id);
Expand Down
3 changes: 0 additions & 3 deletions src/dpp/httpsclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,6 @@ const std::multimap<std::string, std::string> https_client::get_headers() const
return response_headers;
}

https_client::~https_client() {
}

bool https_client::handle_buffer(std::string &buffer)
{
bool state_changed = false;
Expand Down
4 changes: 0 additions & 4 deletions src/dpp/integration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ integration::integration() :
app.bot = nullptr;
}

integration::~integration()
{
}

integration& integration::fill_from_json(nlohmann::json* j)
{
std::map<std::string, integration_type> type_map = {
Expand Down
3 changes: 0 additions & 3 deletions src/dpp/slashcommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ slashcommand::slashcommand(const std::string &_name, const std::string &_descrip
set_application_id(_application_id);
}

slashcommand::~slashcommand() {
}

slashcommand& slashcommand::set_dm_permission(bool dm) {
dm_permission = dm;
return *this;
Expand Down
7 changes: 0 additions & 7 deletions src/dpp/user.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ user::user() :
{
}

user::~user()
{
}

std::string user::get_mention(const snowflake& id) {
return utility::user_mention(id);
}
Expand Down Expand Up @@ -97,9 +93,6 @@ user_identified::user_identified() : user(), accent_color(0), verified(false) {
user_identified::user_identified(const user& u): user(u), accent_color(0), verified(false) {
}

user_identified::~user_identified() {
}

std::string user::get_avatar_url(uint16_t size, const image_type format, bool prefer_animated) const {
if (this->avatar.to_string().empty()) {
return get_default_avatar_url();
Expand Down
4 changes: 0 additions & 4 deletions src/dpp/wsclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ void websocket_client::connect()
);
}

websocket_client::~websocket_client()
{
}

bool websocket_client::handle_frame(const std::string &buffer)
{
/* This is a stub for classes that derive the websocket client */
Expand Down

0 comments on commit 47a163e

Please sign in to comment.