From 788bcd05e78b386efc324647c7ab011b7a70456a Mon Sep 17 00:00:00 2001 From: Raghav Narang Date: Sat, 5 Aug 2023 15:27:19 +0530 Subject: [PATCH] [misc] clang-tidy namespace comment autofix --- include/dpp/appcommand.h | 2 +- include/dpp/application.h | 2 +- include/dpp/auditlog.h | 2 +- include/dpp/automod.h | 2 +- include/dpp/ban.h | 2 +- include/dpp/cache.h | 2 +- include/dpp/channel.h | 2 +- include/dpp/cluster.h | 2 +- include/dpp/collector.h | 2 +- include/dpp/colors.h | 4 ++-- include/dpp/commandhandler.h | 2 +- include/dpp/coro.h | 6 +++--- include/dpp/discordclient.h | 2 +- include/dpp/discordevents.h | 2 +- include/dpp/discordvoiceclient.h | 2 +- include/dpp/dispatcher.h | 4 ++-- include/dpp/dns.h | 2 +- include/dpp/dtemplate.h | 2 +- include/dpp/emoji.h | 2 +- include/dpp/etf.h | 2 +- include/dpp/event.h | 3 ++- include/dpp/event_router.h | 2 +- include/dpp/exception.h | 2 +- include/dpp/guild.h | 2 +- include/dpp/httpsclient.h | 2 +- include/dpp/integration.h | 2 +- include/dpp/intents.h | 2 +- include/dpp/invite.h | 2 +- include/dpp/isa_detection.h | 2 +- include/dpp/json_interface.h | 2 +- include/dpp/managed.h | 2 +- include/dpp/message.h | 4 ++-- include/dpp/misc-enum.h | 2 +- include/dpp/once.h | 2 +- include/dpp/permissions.h | 2 +- include/dpp/presence.h | 2 +- include/dpp/prune.h | 2 +- include/dpp/queues.h | 2 +- include/dpp/restrequest.h | 2 +- include/dpp/restresults.h | 2 +- include/dpp/role.h | 2 +- include/dpp/scheduled_event.h | 2 +- include/dpp/snowflake.h | 2 +- include/dpp/socket.h | 4 ++-- include/dpp/sslclient.h | 2 +- include/dpp/stage_instance.h | 2 +- include/dpp/stringops.h | 2 +- include/dpp/sync.h | 2 +- include/dpp/timed_listener.h | 2 +- include/dpp/timer.h | 2 +- include/dpp/user.h | 2 +- include/dpp/utility.h | 4 ++-- include/dpp/voiceregion.h | 2 +- include/dpp/voicestate.h | 2 +- include/dpp/webhook.h | 2 +- include/dpp/wsclient.h | 2 +- src/dpp/application.cpp | 2 +- src/dpp/auditlog.cpp | 2 +- src/dpp/automod.cpp | 2 +- src/dpp/ban.cpp | 2 +- src/dpp/cache.cpp | 2 +- src/dpp/channel.cpp | 2 +- src/dpp/cluster/appcommand.cpp | 2 +- src/dpp/cluster/automod.cpp | 2 +- src/dpp/cluster/channel.cpp | 4 +++- src/dpp/cluster/confirmation.cpp | 2 +- src/dpp/cluster/dm.cpp | 2 +- src/dpp/cluster/emoji.cpp | 2 +- src/dpp/cluster/gateway.cpp | 2 +- src/dpp/cluster/guild.cpp | 2 +- src/dpp/cluster/guild_member.cpp | 2 +- src/dpp/cluster/invite.cpp | 2 +- src/dpp/cluster/json_interface.cpp | 2 +- src/dpp/cluster/message.cpp | 2 +- src/dpp/cluster/role.cpp | 2 +- src/dpp/cluster/scheduled_event.cpp | 2 +- src/dpp/cluster/stage_instance.cpp | 2 +- src/dpp/cluster/sticker.cpp | 4 ++-- src/dpp/cluster/template.cpp | 2 +- src/dpp/cluster/thread.cpp | 2 +- src/dpp/cluster/timer.cpp | 2 +- src/dpp/cluster/user.cpp | 2 +- src/dpp/cluster/voice.cpp | 2 +- src/dpp/cluster/webhook.cpp | 2 +- src/dpp/cluster_coro_calls.cpp | 2 +- src/dpp/cluster_sync_calls.cpp | 2 +- src/dpp/commandhandler.cpp | 5 +++-- src/dpp/discordclient.cpp | 2 +- src/dpp/discordevents.cpp | 2 +- src/dpp/discordvoiceclient.cpp | 2 +- src/dpp/dispatcher.cpp | 2 +- src/dpp/dns.cpp | 2 +- src/dpp/dtemplate.cpp | 2 +- src/dpp/emoji.cpp | 2 +- src/dpp/etf.cpp | 2 +- src/dpp/guild.cpp | 2 +- src/dpp/httpsclient.cpp | 2 +- src/dpp/integration.cpp | 2 +- src/dpp/invite.cpp | 2 +- src/dpp/managed.cpp | 2 +- src/dpp/message.cpp | 2 +- src/dpp/permissions.cpp | 2 +- src/dpp/presence.cpp | 2 +- src/dpp/prune.cpp | 2 +- src/dpp/queues.cpp | 2 +- src/dpp/role.cpp | 2 +- src/dpp/scheduled_event.cpp | 2 +- src/dpp/slashcommand.cpp | 2 +- src/dpp/snowflake.cpp | 2 +- src/dpp/sslclient.cpp | 2 +- src/dpp/stage_instance.cpp | 2 +- src/dpp/user.cpp | 2 +- src/dpp/utility.cpp | 4 ++-- src/dpp/voiceregion.cpp | 2 +- src/dpp/voicestate.cpp | 2 +- src/dpp/webhook.cpp | 2 +- src/dpp/wsclient.cpp | 2 +- src/unittest/test.cpp | 2 +- src/unittest/unittest.cpp | 2 +- 119 files changed, 133 insertions(+), 129 deletions(-) diff --git a/include/dpp/appcommand.h b/include/dpp/appcommand.h index f50499ad3a..39dcca4198 100644 --- a/include/dpp/appcommand.h +++ b/include/dpp/appcommand.h @@ -1222,4 +1222,4 @@ typedef std::unordered_map slashcommand_map; */ typedef std::unordered_map guild_command_permissions_map; -}; +} // namespace dpp diff --git a/include/dpp/application.h b/include/dpp/application.h index e4346a4f87..cfcdb0d72e 100644 --- a/include/dpp/application.h +++ b/include/dpp/application.h @@ -165,4 +165,4 @@ class DPP_EXPORT application : public managed, public json_interface application_map; -}; +} // namespace dpp diff --git a/include/dpp/auditlog.h b/include/dpp/auditlog.h index 8b83c16820..96ec038f4c 100644 --- a/include/dpp/auditlog.h +++ b/include/dpp/auditlog.h @@ -227,4 +227,4 @@ class DPP_EXPORT auditlog : public json_interface { auditlog& fill_from_json(nlohmann::json* j); }; -}; +} // namespace dpp diff --git a/include/dpp/automod.h b/include/dpp/automod.h index 817db6419f..705fdbc28a 100644 --- a/include/dpp/automod.h +++ b/include/dpp/automod.h @@ -371,4 +371,4 @@ class DPP_EXPORT automod_rule : public managed, public json_interface automod_rule_map; -}; +} // namespace dpp diff --git a/include/dpp/ban.h b/include/dpp/ban.h index 6a7e1fe591..c780f1cd58 100644 --- a/include/dpp/ban.h +++ b/include/dpp/ban.h @@ -65,4 +65,4 @@ class DPP_EXPORT ban : public json_interface { */ typedef std::unordered_map ban_map; -}; +} // namespace dpp diff --git a/include/dpp/cache.h b/include/dpp/cache.h index 795186ec14..d8b9a9b0ef 100644 --- a/include/dpp/cache.h +++ b/include/dpp/cache.h @@ -268,5 +268,5 @@ cache_decl(role, find_role, get_role_cache, get_role_count); cache_decl(channel, find_channel, get_channel_cache, get_channel_count); cache_decl(emoji, find_emoji, get_emoji_cache, get_emoji_count); -}; +} // namespace dpp diff --git a/include/dpp/channel.h b/include/dpp/channel.h index df47429828..2f3852e3bd 100644 --- a/include/dpp/channel.h +++ b/include/dpp/channel.h @@ -854,5 +854,5 @@ struct active_thread_info { */ using active_threads = std::map; -}; +} // namespace dpp diff --git a/include/dpp/cluster.h b/include/dpp/cluster.h index 5389f9434d..67cc3b8319 100644 --- a/include/dpp/cluster.h +++ b/include/dpp/cluster.h @@ -3523,4 +3523,4 @@ class DPP_EXPORT cluster { }; -}; +} // namespace dpp diff --git a/include/dpp/collector.h b/include/dpp/collector.h index a512287a5f..dbc8caf823 100644 --- a/include/dpp/collector.h +++ b/include/dpp/collector.h @@ -436,4 +436,4 @@ class scheduled_event_collector : public scheduled_event_collector_t { virtual ~scheduled_event_collector() = default; }; -}; \ No newline at end of file +} // namespace dpp diff --git a/include/dpp/colors.h b/include/dpp/colors.h index bf70b6049e..d5f642402a 100644 --- a/include/dpp/colors.h +++ b/include/dpp/colors.h @@ -735,10 +735,10 @@ namespace dpp { snow = 0xFFFAFA, milk_white = 0xFEFCFF, half_white = 0xFFFEFA; - }; + } // namespace colors /** * @brief predefined color constants, same as colors */ namespace colours = colors; -}; +} // namespace dpp diff --git a/include/dpp/commandhandler.h b/include/dpp/commandhandler.h index f9db425ddd..304ba9318e 100644 --- a/include/dpp/commandhandler.h +++ b/include/dpp/commandhandler.h @@ -389,4 +389,4 @@ class DPP_EXPORT commandhandler { }; -}; +} // namespace dpp diff --git a/include/dpp/coro.h b/include/dpp/coro.h index 4f912d823d..818369d8b8 100644 --- a/include/dpp/coro.h +++ b/include/dpp/coro.h @@ -72,7 +72,7 @@ namespace dpp { */ template using task_handle = detail::std_coroutine::coroutine_handle>; - } + } // namespace detail /** * @brief A coroutine task. It can be co_awaited to make nested coroutines. @@ -404,7 +404,7 @@ namespace dpp { if (parent) parent.resume(); } - } + } // namespace detail template #ifndef _DOXYGEN_ @@ -695,7 +695,7 @@ namespace dpp { return std::move(*api_callback.get_result()); } }; -}; +} // namespace dpp /** * @brief Specialization of std::coroutine_traits, helps the standard library figure out a promise type from a coroutine function. diff --git a/include/dpp/discordclient.h b/include/dpp/discordclient.h index 74648a24d8..8ce849ae7d 100644 --- a/include/dpp/discordclient.h +++ b/include/dpp/discordclient.h @@ -524,4 +524,4 @@ class DPP_EXPORT discord_client : public websocket_client voiceconn* get_voice(snowflake guild_id); }; -}; +} // namespace dpp diff --git a/include/dpp/discordevents.h b/include/dpp/discordevents.h index 24de681cba..eb9ccf6af5 100644 --- a/include/dpp/discordevents.h +++ b/include/dpp/discordevents.h @@ -168,4 +168,4 @@ std::string DPP_EXPORT base64_encode(unsigned char const* buf, unsigned int buff */ std::string DPP_EXPORT ts_to_string(time_t ts); -}; +} // namespace dpp diff --git a/include/dpp/discordvoiceclient.h b/include/dpp/discordvoiceclient.h index f54ca8f46d..754e0737d1 100644 --- a/include/dpp/discordvoiceclient.h +++ b/include/dpp/discordvoiceclient.h @@ -910,5 +910,5 @@ class DPP_EXPORT discord_voice_client : public websocket_client std::string discover_ip(); }; -}; +} // namespace dpp diff --git a/include/dpp/dispatcher.h b/include/dpp/dispatcher.h index 58c0643393..4790334a93 100644 --- a/include/dpp/dispatcher.h +++ b/include/dpp/dispatcher.h @@ -141,7 +141,7 @@ namespace utility { * @return A lambda for attaching to an API callback */ std::function DPP_EXPORT log_error(); -}; +} // namespace utility /** @brief Add user to scheduled event */ struct DPP_EXPORT guild_scheduled_event_user_add_t : public event_dispatch_t { @@ -1905,5 +1905,5 @@ struct DPP_EXPORT voice_client_disconnect_t : public event_dispatch_t { snowflake user_id; }; -}; +} // namespace dpp diff --git a/include/dpp/dns.h b/include/dpp/dns.h index 23d5b1ba99..5a3a566d45 100644 --- a/include/dpp/dns.h +++ b/include/dpp/dns.h @@ -73,4 +73,4 @@ namespace dpp { * @throw dpp::connection_exception On failure to resolve hostname */ const dns_cache_entry* resolve_hostname(const std::string& hostname, const std::string& port); -}; +} // namespace dpp diff --git a/include/dpp/dtemplate.h b/include/dpp/dtemplate.h index ceb9ee0ee2..3f591517cf 100644 --- a/include/dpp/dtemplate.h +++ b/include/dpp/dtemplate.h @@ -100,4 +100,4 @@ class DPP_EXPORT dtemplate : public json_interface { typedef std::unordered_map dtemplate_map; -}; +} // namespace dpp diff --git a/include/dpp/emoji.h b/include/dpp/emoji.h index d8c0f48da9..8d24435db7 100644 --- a/include/dpp/emoji.h +++ b/include/dpp/emoji.h @@ -187,4 +187,4 @@ class DPP_EXPORT emoji : public managed, public json_interface { */ typedef std::unordered_map emoji_map; -}; +} // namespace dpp diff --git a/include/dpp/etf.h b/include/dpp/etf.h index 4856bcd7ff..450782d632 100644 --- a/include/dpp/etf.h +++ b/include/dpp/etf.h @@ -639,4 +639,4 @@ class DPP_EXPORT etf_parser { std::string build(const nlohmann::json& j); }; -}; +} // namespace dpp diff --git a/include/dpp/event.h b/include/dpp/event.h index cf1695fde6..42bd68a589 100644 --- a/include/dpp/event.h +++ b/include/dpp/event.h @@ -151,4 +151,5 @@ event_decl(automod_rule_execute, AUTO_MODERATION_ACTION_EXECUTION); /* Audit log */ event_decl(guild_audit_log_entry_create, GUILD_AUDIT_LOG_ENTRY_CREATE); -}}; +} // namespace events +} // namespace dpp diff --git a/include/dpp/event_router.h b/include/dpp/event_router.h index 39576dd9bc..7642065655 100644 --- a/include/dpp/event_router.h +++ b/include/dpp/event_router.h @@ -276,4 +276,4 @@ template class event_router_t { } }; -}; +} // namespace dpp diff --git a/include/dpp/exception.h b/include/dpp/exception.h index 576e67a812..70768742fc 100644 --- a/include/dpp/exception.h +++ b/include/dpp/exception.h @@ -197,5 +197,5 @@ class exception : public std::exception derived_exception(cache_exception, exception); #endif -}; +} // namespace dpp diff --git a/include/dpp/guild.h b/include/dpp/guild.h index 3209e3ec26..db6353e10a 100644 --- a/include/dpp/guild.h +++ b/include/dpp/guild.h @@ -1371,4 +1371,4 @@ typedef std::unordered_map guild_member_map; */ guild_member DPP_EXPORT find_guild_member(const snowflake guild_id, const snowflake user_id); -}; +} // namespace dpp diff --git a/include/dpp/httpsclient.h b/include/dpp/httpsclient.h index 971c9d0024..886006b8cb 100644 --- a/include/dpp/httpsclient.h +++ b/include/dpp/httpsclient.h @@ -335,4 +335,4 @@ class DPP_EXPORT https_client : public ssl_client }; -}; +} // namespace dpp diff --git a/include/dpp/integration.h b/include/dpp/integration.h index 5c45b78314..b02367be51 100644 --- a/include/dpp/integration.h +++ b/include/dpp/integration.h @@ -169,5 +169,5 @@ typedef std::unordered_map integration_map; /** A group of connections */ typedef std::unordered_map connection_map; -}; +} // namespace dpp diff --git a/include/dpp/intents.h b/include/dpp/intents.h index 1e5932198d..2ecfe5ff71 100644 --- a/include/dpp/intents.h +++ b/include/dpp/intents.h @@ -83,4 +83,4 @@ enum intents { i_unverified_default_intents = dpp::i_default_intents | dpp::i_message_content }; -}; +} // namespace dpp diff --git a/include/dpp/invite.h b/include/dpp/invite.h index fea11a7eab..c0a45e4ce8 100644 --- a/include/dpp/invite.h +++ b/include/dpp/invite.h @@ -181,4 +181,4 @@ class DPP_EXPORT invite : public json_interface { /** A container of invites */ typedef std::unordered_map invite_map; -}; +} // namespace dpp diff --git a/include/dpp/isa_detection.h b/include/dpp/isa_detection.h index b771f11b4a..5c898bea4e 100644 --- a/include/dpp/isa_detection.h +++ b/include/dpp/isa_detection.h @@ -396,4 +396,4 @@ class audio_mixer { #endif -} +} // namespace dpp diff --git a/include/dpp/json_interface.h b/include/dpp/json_interface.h index 99b8ea7032..56d1c3e64a 100644 --- a/include/dpp/json_interface.h +++ b/include/dpp/json_interface.h @@ -58,4 +58,4 @@ namespace dpp { throw dpp::logic_exception("JSON interface doesn't implement build_json"); } }; -}; +} // namespace dpp diff --git a/include/dpp/managed.h b/include/dpp/managed.h index 3939b8994d..b61c39a640 100644 --- a/include/dpp/managed.h +++ b/include/dpp/managed.h @@ -73,4 +73,4 @@ namespace dpp { bool operator!=(const managed& other) const noexcept; }; -}; +} // namespace dpp diff --git a/include/dpp/message.h b/include/dpp/message.h index 22fb5c7146..2df2c9db68 100644 --- a/include/dpp/message.h +++ b/include/dpp/message.h @@ -1046,7 +1046,7 @@ namespace embed_type { * @brief Auto moderation filter */ const std::string emt_automod = "auto_moderation_message"; -}; +} // namespace embed_type /** * @brief Message types for dpp::message::type @@ -1558,4 +1558,4 @@ typedef std::unordered_map sticker_map; /** A group of sticker packs */ typedef std::unordered_map sticker_pack_map; -}; +} // namespace dpp diff --git a/include/dpp/misc-enum.h b/include/dpp/misc-enum.h index 246445342c..ac50f294d2 100644 --- a/include/dpp/misc-enum.h +++ b/include/dpp/misc-enum.h @@ -52,4 +52,4 @@ namespace dpp { ll_critical }; -}; +} // namespace dpp diff --git a/include/dpp/once.h b/include/dpp/once.h index 0c1a8ce670..4ca494e9af 100644 --- a/include/dpp/once.h +++ b/include/dpp/once.h @@ -43,4 +43,4 @@ namespace dpp { return !std::exchange(called, true); }; -}; +} // namespace dpp diff --git a/include/dpp/permissions.h b/include/dpp/permissions.h index f1d1865cdd..b57af3d9f3 100644 --- a/include/dpp/permissions.h +++ b/include/dpp/permissions.h @@ -228,4 +228,4 @@ class DPP_EXPORT permission { } }; -} +} // namespace dpp diff --git a/include/dpp/presence.h b/include/dpp/presence.h index f969db5eb3..ebcf0c07dc 100644 --- a/include/dpp/presence.h +++ b/include/dpp/presence.h @@ -391,4 +391,4 @@ class DPP_EXPORT presence : public json_interface { /** A container of presences */ typedef std::unordered_map presence_map; -}; +} // namespace dpp diff --git a/include/dpp/prune.h b/include/dpp/prune.h index b299ce3f69..699f078b44 100644 --- a/include/dpp/prune.h +++ b/include/dpp/prune.h @@ -60,4 +60,4 @@ struct DPP_EXPORT prune : public json_interface { }; -}; +} // namespace dpp diff --git a/include/dpp/queues.h b/include/dpp/queues.h index a98044fa35..637396d9e3 100644 --- a/include/dpp/queues.h +++ b/include/dpp/queues.h @@ -458,4 +458,4 @@ class DPP_EXPORT request_queue { bool is_globally_ratelimited() const; }; -}; +} // namespace dpp diff --git a/include/dpp/restrequest.h b/include/dpp/restrequest.h index b80ab11a74..9e330f6800 100644 --- a/include/dpp/restrequest.h +++ b/include/dpp/restrequest.h @@ -231,4 +231,4 @@ template inline void rest_request_vector(dpp::cluster* c, const char* b } -}; \ No newline at end of file +} // namespace dpp diff --git a/include/dpp/restresults.h b/include/dpp/restresults.h index 1d2d88beff..0691b41869 100644 --- a/include/dpp/restresults.h +++ b/include/dpp/restresults.h @@ -316,4 +316,4 @@ typedef std::function command_completion_e * @brief Automatically JSON encoded HTTP result */ typedef std::function json_encode_t; -}; +} // namespace dpp diff --git a/include/dpp/role.h b/include/dpp/role.h index 3a313ccc62..09e04703f8 100644 --- a/include/dpp/role.h +++ b/include/dpp/role.h @@ -699,5 +699,5 @@ typedef std::unordered_map role_map; /** A group of application_role_connection_metadata objects */ typedef std::vector application_role_connection_metadata_list; -}; +} // namespace dpp diff --git a/include/dpp/scheduled_event.h b/include/dpp/scheduled_event.h index 1731eceea8..bed5c7d66c 100644 --- a/include/dpp/scheduled_event.h +++ b/include/dpp/scheduled_event.h @@ -221,4 +221,4 @@ typedef std::unordered_map scheduled_event_map; typedef std::unordered_map event_member_map; -}; +} // namespace dpp diff --git a/include/dpp/snowflake.h b/include/dpp/snowflake.h index 8f7cbad7b3..babf25aacb 100644 --- a/include/dpp/snowflake.h +++ b/include/dpp/snowflake.h @@ -188,7 +188,7 @@ class DPP_EXPORT snowflake final { uint16_t get_increment() const; }; -}; +} // namespace dpp template<> struct std::hash diff --git a/include/dpp/socket.h b/include/dpp/socket.h index 7f1ccc3fc1..04d1080035 100644 --- a/include/dpp/socket.h +++ b/include/dpp/socket.h @@ -13,7 +13,7 @@ namespace dpp * This is used to ensure parity between windows and unix-like systems. */ typedef SOCKET socket; -} +} // namespace dpp #ifndef SOCKET_ERROR /** @@ -27,4 +27,4 @@ namespace dpp * @brief Represents a socket which is not yet assigned */ #define INVALID_SOCKET ~0 -#endif \ No newline at end of file +#endif diff --git a/include/dpp/sslclient.h b/include/dpp/sslclient.h index 02a724cbca..0251cb0332 100644 --- a/include/dpp/sslclient.h +++ b/include/dpp/sslclient.h @@ -255,4 +255,4 @@ class DPP_EXPORT ssl_client virtual void log(dpp::loglevel severity, const std::string &msg) const; }; -}; +} // namespace dpp diff --git a/include/dpp/stage_instance.h b/include/dpp/stage_instance.h index a510178151..719bf8d6ce 100644 --- a/include/dpp/stage_instance.h +++ b/include/dpp/stage_instance.h @@ -83,4 +83,4 @@ struct DPP_EXPORT stage_instance : public managed, public json_interface stage_instance_map; -}; +} // namespace dpp diff --git a/include/dpp/stringops.h b/include/dpp/stringops.h index 2d9f23d2b8..77de2e1718 100644 --- a/include/dpp/stringops.h +++ b/include/dpp/stringops.h @@ -211,4 +211,4 @@ template std::string leading_zeroes(T i, size_t width) return stream.str(); } -}; +} // namespace dpp diff --git a/include/dpp/sync.h b/include/dpp/sync.h index a837103782..035a205778 100644 --- a/include/dpp/sync.h +++ b/include/dpp/sync.h @@ -77,4 +77,4 @@ namespace dpp { return _f.get(); } -}; +} // namespace dpp diff --git a/include/dpp/timed_listener.h b/include/dpp/timed_listener.h index 467f0046e0..0ec9a4d7ea 100644 --- a/include/dpp/timed_listener.h +++ b/include/dpp/timed_listener.h @@ -92,4 +92,4 @@ template class timed_listene } }; -}; \ No newline at end of file +} // namespace dpp diff --git a/include/dpp/timer.h b/include/dpp/timer.h index 92c5a05db1..eb11898cce 100644 --- a/include/dpp/timer.h +++ b/include/dpp/timer.h @@ -121,4 +121,4 @@ class DPP_EXPORT oneshot_timer -}; +} // namespace dpp diff --git a/include/dpp/user.h b/include/dpp/user.h index 0f84ac4c35..c3cdb21fbe 100644 --- a/include/dpp/user.h +++ b/include/dpp/user.h @@ -406,4 +406,4 @@ void from_json(const nlohmann::json& j, user_identified& u); /** A group of users */ typedef std::unordered_map user_map; -}; +} // namespace dpp diff --git a/include/dpp/utility.h b/include/dpp/utility.h index 45eeb5d89d..7c9ba11e24 100644 --- a/include/dpp/utility.h +++ b/include/dpp/utility.h @@ -540,5 +540,5 @@ namespace dpp { */ void DPP_EXPORT set_thread_name(const std::string& name); - }; -}; + } // namespace utility +} // namespace dpp diff --git a/include/dpp/voiceregion.h b/include/dpp/voiceregion.h index fa44adca6a..f0791f1f81 100644 --- a/include/dpp/voiceregion.h +++ b/include/dpp/voiceregion.h @@ -116,4 +116,4 @@ class DPP_EXPORT voiceregion : public json_interface { */ typedef std::unordered_map voiceregion_map; -}; +} // namespace dpp diff --git a/include/dpp/voicestate.h b/include/dpp/voicestate.h index e9807f8612..df8f2c7f9d 100644 --- a/include/dpp/voicestate.h +++ b/include/dpp/voicestate.h @@ -107,4 +107,4 @@ class DPP_EXPORT voicestate : public json_interface { /** A container of voicestates */ typedef std::unordered_map voicestate_map; -}; +} // namespace dpp diff --git a/include/dpp/webhook.h b/include/dpp/webhook.h index cd9d905b02..d8952de1f3 100644 --- a/include/dpp/webhook.h +++ b/include/dpp/webhook.h @@ -111,4 +111,4 @@ class DPP_EXPORT webhook : public managed, public json_interface { */ typedef std::unordered_map webhook_map; -}; +} // namespace dpp diff --git a/include/dpp/wsclient.h b/include/dpp/wsclient.h index 6f05840f5c..519cad9bce 100644 --- a/include/dpp/wsclient.h +++ b/include/dpp/wsclient.h @@ -209,4 +209,4 @@ class DPP_EXPORT websocket_client : public ssl_client void send_close_packet(); }; -}; \ No newline at end of file +} // namespace dpp diff --git a/src/dpp/application.cpp b/src/dpp/application.cpp index 5361f0330c..0f1f1bf976 100644 --- a/src/dpp/application.cpp +++ b/src/dpp/application.cpp @@ -113,5 +113,5 @@ std::string application::get_icon_url(uint16_t size, const image_type format) co } } -}; +} // namespace dpp diff --git a/src/dpp/auditlog.cpp b/src/dpp/auditlog.cpp index 3fd65d596c..16ff49df9e 100644 --- a/src/dpp/auditlog.cpp +++ b/src/dpp/auditlog.cpp @@ -75,5 +75,5 @@ auditlog& auditlog::fill_from_json(nlohmann::json* j) { return *this; } -}; +} // namespace dpp diff --git a/src/dpp/automod.cpp b/src/dpp/automod.cpp index 02fca1803e..d51aacfa10 100644 --- a/src/dpp/automod.cpp +++ b/src/dpp/automod.cpp @@ -193,5 +193,5 @@ std::string automod_rule::build_json(bool with_id) const { return j.dump(); } -}; +} // namespace dpp diff --git a/src/dpp/ban.cpp b/src/dpp/ban.cpp index 77459396cb..33a34b2f75 100644 --- a/src/dpp/ban.cpp +++ b/src/dpp/ban.cpp @@ -44,5 +44,5 @@ std::string ban::build_json(bool with_id) const { return "{}"; } -}; +} // namespace dpp diff --git a/src/dpp/cache.cpp b/src/dpp/cache.cpp index 07d3ede3fa..7638e3f9ee 100644 --- a/src/dpp/cache.cpp +++ b/src/dpp/cache.cpp @@ -84,4 +84,4 @@ cache_helper(role, role_cache, find_role, get_role_cache, get_role_count); cache_helper(guild, guild_cache, find_guild, get_guild_cache, get_guild_count); cache_helper(emoji, emoji_cache, find_emoji, get_emoji_cache, get_emoji_count); -}; +} // namespace dpp diff --git a/src/dpp/channel.cpp b/src/dpp/channel.cpp index e22db2d7e5..f61b7268f3 100644 --- a/src/dpp/channel.cpp +++ b/src/dpp/channel.cpp @@ -637,4 +637,4 @@ forum_layout_type channel::get_default_forum_layout() const { } -}; +} // namespace dpp diff --git a/src/dpp/cluster/appcommand.cpp b/src/dpp/cluster/appcommand.cpp index 76998dbd0d..93f06bb323 100644 --- a/src/dpp/cluster/appcommand.cpp +++ b/src/dpp/cluster/appcommand.cpp @@ -183,4 +183,4 @@ void cluster::interaction_followup_get_original(const std::string &token, comman rest_request(this, API_PATH "/webhooks",std::to_string(me.id), utility::url_encode(token) + "/messages/@original", m_get, "", callback); } -}; +} // namespace dpp diff --git a/src/dpp/cluster/automod.cpp b/src/dpp/cluster/automod.cpp index 9cf7c627b3..f4584baab7 100644 --- a/src/dpp/cluster/automod.cpp +++ b/src/dpp/cluster/automod.cpp @@ -43,4 +43,4 @@ void cluster::automod_rule_delete(snowflake guild_id, snowflake rule_id, command rest_request(this, API_PATH "/guilds", std::to_string(guild_id), "/auto-moderation/rules/" + std::to_string(rule_id), m_delete, "", callback); } -}; +} // namespace dpp diff --git a/src/dpp/cluster/channel.cpp b/src/dpp/cluster/channel.cpp index 7faf3cba9c..5b51448faf 100644 --- a/src/dpp/cluster/channel.cpp +++ b/src/dpp/cluster/channel.cpp @@ -21,6 +21,8 @@ #include #include +#include + namespace dpp { void cluster::channel_create(const class channel &c, command_completion_event_t callback) { @@ -96,4 +98,4 @@ void cluster::channels_get(snowflake guild_id, command_completion_event_t callba rest_request_list(this, API_PATH "/guilds", std::to_string(guild_id), "channels", m_get, "", callback); } -}; +} // namespace dpp diff --git a/src/dpp/cluster/confirmation.cpp b/src/dpp/cluster/confirmation.cpp index 925f5d72db..b2744f8d8f 100644 --- a/src/dpp/cluster/confirmation.cpp +++ b/src/dpp/cluster/confirmation.cpp @@ -127,4 +127,4 @@ error_info confirmation_callback_t::get_error() const { return error_info(); } -}; +} // namespace dpp diff --git a/src/dpp/cluster/dm.cpp b/src/dpp/cluster/dm.cpp index f128ee7831..48a381c9d6 100644 --- a/src/dpp/cluster/dm.cpp +++ b/src/dpp/cluster/dm.cpp @@ -63,4 +63,4 @@ void cluster::gdm_remove(snowflake channel_id, snowflake user_id, command_comple rest_request(this, API_PATH "/channels", std::to_string(channel_id), "recipients/" + std::to_string(user_id), m_delete, "", callback); } -}; \ No newline at end of file +} // namespace dpp diff --git a/src/dpp/cluster/emoji.cpp b/src/dpp/cluster/emoji.cpp index 5201f1d82f..3e23da45f2 100644 --- a/src/dpp/cluster/emoji.cpp +++ b/src/dpp/cluster/emoji.cpp @@ -42,4 +42,4 @@ void cluster::guild_emojis_get(snowflake guild_id, command_completion_event_t ca rest_request_list(this, API_PATH "/guilds", std::to_string(guild_id), "emojis", m_get, "", callback); } -}; +} // namespace dpp diff --git a/src/dpp/cluster/gateway.cpp b/src/dpp/cluster/gateway.cpp index 2008a9c716..7da7a81dd4 100644 --- a/src/dpp/cluster/gateway.cpp +++ b/src/dpp/cluster/gateway.cpp @@ -26,4 +26,4 @@ void cluster::get_gateway_bot(command_completion_event_t callback) { rest_request(this, API_PATH "/gateway", "bot", "", m_get, "", callback); } -}; \ No newline at end of file +} // namespace dpp diff --git a/src/dpp/cluster/guild.cpp b/src/dpp/cluster/guild.cpp index 6020a96270..8806fe0531 100644 --- a/src/dpp/cluster/guild.cpp +++ b/src/dpp/cluster/guild.cpp @@ -169,4 +169,4 @@ void cluster::guild_edit_welcome_screen(snowflake guild_id, const struct welcome } -}; +} // namespace dpp diff --git a/src/dpp/cluster/guild_member.cpp b/src/dpp/cluster/guild_member.cpp index 47bb37e0c0..cbfe7d5cd5 100644 --- a/src/dpp/cluster/guild_member.cpp +++ b/src/dpp/cluster/guild_member.cpp @@ -146,4 +146,4 @@ void cluster::guild_search_members(snowflake guild_id, const std::string& query, }); } -}; +} // namespace dpp diff --git a/src/dpp/cluster/invite.cpp b/src/dpp/cluster/invite.cpp index 44176c4852..5d73f6aed7 100644 --- a/src/dpp/cluster/invite.cpp +++ b/src/dpp/cluster/invite.cpp @@ -35,4 +35,4 @@ void cluster::invite_get(const std::string &invite_code, command_completion_even rest_request(this, API_PATH "/invites", utility::url_encode(invite_code) + "?with_counts=true&with_expiration=true", "", m_get, "", callback); } -}; \ No newline at end of file +} // namespace dpp diff --git a/src/dpp/cluster/json_interface.cpp b/src/dpp/cluster/json_interface.cpp index 71abecae3e..76863321ce 100644 --- a/src/dpp/cluster/json_interface.cpp +++ b/src/dpp/cluster/json_interface.cpp @@ -25,4 +25,4 @@ namespace dpp { -}; \ No newline at end of file +} // namespace dpp diff --git a/src/dpp/cluster/message.cpp b/src/dpp/cluster/message.cpp index 1d9884d220..36ddaa433b 100644 --- a/src/dpp/cluster/message.cpp +++ b/src/dpp/cluster/message.cpp @@ -166,4 +166,4 @@ void cluster::channel_pins_get(snowflake channel_id, command_completion_event_t rest_request_list(this, API_PATH "/channels", std::to_string(channel_id), "pins", m_get, "", callback); } -}; +} // namespace dpp diff --git a/src/dpp/cluster/role.cpp b/src/dpp/cluster/role.cpp index 4a88debcc1..58f700f191 100644 --- a/src/dpp/cluster/role.cpp +++ b/src/dpp/cluster/role.cpp @@ -70,4 +70,4 @@ void cluster::user_application_role_connection_update(snowflake application_id, rest_request(this, API_PATH "/users/@me/applications", std::to_string(application_id), "role-connection", m_put, connection.build_json(), callback); } -}; +} // namespace dpp diff --git a/src/dpp/cluster/scheduled_event.cpp b/src/dpp/cluster/scheduled_event.cpp index d4685c9e31..ddc7ea16c6 100644 --- a/src/dpp/cluster/scheduled_event.cpp +++ b/src/dpp/cluster/scheduled_event.cpp @@ -68,4 +68,4 @@ void cluster::guild_event_get(snowflake guild_id, snowflake event_id, command_co rest_request(this, API_PATH "/guilds", std::to_string(guild_id), "/scheduled-events/" + std::to_string(event_id) + "?with_user_count=true", m_get, "", callback); } -}; +} // namespace dpp diff --git a/src/dpp/cluster/stage_instance.cpp b/src/dpp/cluster/stage_instance.cpp index 294f35c41d..9257f90a6d 100644 --- a/src/dpp/cluster/stage_instance.cpp +++ b/src/dpp/cluster/stage_instance.cpp @@ -39,4 +39,4 @@ void cluster::stage_instance_delete(const snowflake channel_id, command_completi rest_request(this, API_PATH "/stage-instances", std::to_string(channel_id), "", m_delete, "", callback); } -}; +} // namespace dpp diff --git a/src/dpp/cluster/sticker.cpp b/src/dpp/cluster/sticker.cpp index fe988540ef..dceab66f97 100644 --- a/src/dpp/cluster/sticker.cpp +++ b/src/dpp/cluster/sticker.cpp @@ -34,7 +34,7 @@ namespace { return mime_types.find(s.format_type)->second; } -} +} // namespace void cluster::guild_sticker_create(sticker &s, command_completion_event_t callback) { this->post_rest(API_PATH "/guilds", std::to_string(s.guild_id), "stickers", m_post, s.build_json(false), [this, callback](json &j, const http_request_completion_t& http) { @@ -68,4 +68,4 @@ void cluster::sticker_packs_get(command_completion_event_t callback) { rest_request_list(this, API_PATH "/sticker-packs", "", "", m_get, "", callback); } -}; \ No newline at end of file +} // namespace dpp diff --git a/src/dpp/cluster/template.cpp b/src/dpp/cluster/template.cpp index 8906519fb4..edda3b3536 100644 --- a/src/dpp/cluster/template.cpp +++ b/src/dpp/cluster/template.cpp @@ -60,4 +60,4 @@ void cluster::template_get(const std::string &code, command_completion_event_t c rest_request(this, API_PATH "/guilds", "templates", code, m_get, "", callback); } -}; \ No newline at end of file +} // namespace dpp diff --git a/src/dpp/cluster/thread.cpp b/src/dpp/cluster/thread.cpp index a07fef85ab..54f4a1b79b 100644 --- a/src/dpp/cluster/thread.cpp +++ b/src/dpp/cluster/thread.cpp @@ -160,4 +160,4 @@ void cluster::thread_member_remove(snowflake thread_id, snowflake user_id, comma rest_request(this, API_PATH "/channels", std::to_string(thread_id), "/thread-members/" + std::to_string(user_id), m_delete, "", callback); } -}; +} // namespace dpp diff --git a/src/dpp/cluster/timer.cpp b/src/dpp/cluster/timer.cpp index c843c04ad0..c168f9021c 100644 --- a/src/dpp/cluster/timer.cpp +++ b/src/dpp/cluster/timer.cpp @@ -135,4 +135,4 @@ oneshot_timer::~oneshot_timer() { cancel(); } -}; \ No newline at end of file +} // namespace dpp diff --git a/src/dpp/cluster/user.cpp b/src/dpp/cluster/user.cpp index fba4acbc82..0f1f0d0f25 100644 --- a/src/dpp/cluster/user.cpp +++ b/src/dpp/cluster/user.cpp @@ -108,4 +108,4 @@ void cluster::user_get_cached(snowflake user_id, command_completion_event_t call rest_request(this, API_PATH "/users", std::to_string(user_id), "", m_get, "", callback); } -}; +} // namespace dpp diff --git a/src/dpp/cluster/voice.cpp b/src/dpp/cluster/voice.cpp index 64f1b23a79..ea78a487a4 100644 --- a/src/dpp/cluster/voice.cpp +++ b/src/dpp/cluster/voice.cpp @@ -32,4 +32,4 @@ void cluster::guild_get_voice_regions(snowflake guild_id, command_completion_eve rest_request_list(this, API_PATH "/guilds", std::to_string(guild_id), "regions", m_get, "", callback); } -}; +} // namespace dpp diff --git a/src/dpp/cluster/webhook.cpp b/src/dpp/cluster/webhook.cpp index b3cefc032c..1d87825bfe 100644 --- a/src/dpp/cluster/webhook.cpp +++ b/src/dpp/cluster/webhook.cpp @@ -126,4 +126,4 @@ void cluster::get_webhook_with_token(snowflake webhook_id, const std::string &to rest_request(this, API_PATH "/webhooks", std::to_string(webhook_id), utility::url_encode(token), m_get, "", callback); } -}; \ No newline at end of file +} // namespace dpp diff --git a/src/dpp/cluster_coro_calls.cpp b/src/dpp/cluster_coro_calls.cpp index 9b0d46816a..715e2edc19 100644 --- a/src/dpp/cluster_coro_calls.cpp +++ b/src/dpp/cluster_coro_calls.cpp @@ -788,7 +788,7 @@ awaitable cluster::co_get_webhook_with_token(snowflake } -}; +} // namespace dpp /* End of auto-generated definitions */ dpp::awaitable dpp::cluster::co_request(const std::string &url, http_method method, const std::string &postdata, const std::string &mimetype, const std::multimap &headers) { diff --git a/src/dpp/cluster_sync_calls.cpp b/src/dpp/cluster_sync_calls.cpp index 2b9be8b862..13c7cda1fd 100644 --- a/src/dpp/cluster_sync_calls.cpp +++ b/src/dpp/cluster_sync_calls.cpp @@ -786,6 +786,6 @@ webhook cluster::get_webhook_with_token_sync(snowflake webhook_id, const std::st } -}; +} // namespace dpp /* End of auto-generated definitions */ diff --git a/src/dpp/commandhandler.cpp b/src/dpp/commandhandler.cpp index 4454b3d3a0..ddd379c3bf 100644 --- a/src/dpp/commandhandler.cpp +++ b/src/dpp/commandhandler.cpp @@ -23,6 +23,7 @@ #include #include #include +#include namespace dpp { @@ -83,7 +84,7 @@ commandhandler& commandhandler::add_prefix(const std::string &prefix) commandhandler& commandhandler::add_command(const std::string &command, const parameter_registration_t ¶meters, command_handler handler, const std::string &description, snowflake guild_id) { command_info_t i; - i.func = handler; + i.func = std::move(handler); i.guild_id = guild_id; i.parameters = parameters; commands[lowercase(command)] = i; @@ -436,4 +437,4 @@ void commandhandler::thonk(command_source source, command_completion_event_t cal thinking(source, callback); } -}; +} // namespace dpp diff --git a/src/dpp/discordclient.cpp b/src/dpp/discordclient.cpp index 77399eaf99..7afb867bcf 100644 --- a/src/dpp/discordclient.cpp +++ b/src/dpp/discordclient.cpp @@ -723,4 +723,4 @@ voiceconn& voiceconn::connect(snowflake guild_id) { } -}; +} // namespace dpp diff --git a/src/dpp/discordevents.cpp b/src/dpp/discordevents.cpp index 7f68217fdd..bc9e22d3a3 100644 --- a/src/dpp/discordevents.cpp +++ b/src/dpp/discordevents.cpp @@ -360,4 +360,4 @@ void discord_client::handle_event(const std::string &event, json &j, const std:: } } -}; +} // namespace dpp diff --git a/src/dpp/discordvoiceclient.cpp b/src/dpp/discordvoiceclient.cpp index 3cadb62646..1374e81ade 100644 --- a/src/dpp/discordvoiceclient.cpp +++ b/src/dpp/discordvoiceclient.cpp @@ -1306,4 +1306,4 @@ std::string discord_voice_client::discover_ip() { -}; +} // namespace dpp diff --git a/src/dpp/dispatcher.cpp b/src/dpp/dispatcher.cpp index cecdce02fd..093992f4c7 100644 --- a/src/dpp/dispatcher.cpp +++ b/src/dpp/dispatcher.cpp @@ -381,4 +381,4 @@ event_ctor(automod_rule_create_t, event_dispatch_t); event_ctor(automod_rule_delete_t, event_dispatch_t); event_ctor(automod_rule_update_t, event_dispatch_t); event_ctor(automod_rule_execute_t, event_dispatch_t); -}; +} // namespace dpp diff --git a/src/dpp/dns.cpp b/src/dpp/dns.cpp index 7648dbe708..fa01316e51 100644 --- a/src/dpp/dns.cpp +++ b/src/dpp/dns.cpp @@ -105,4 +105,4 @@ namespace dpp return cache_entry; } } -}; +} // namespace dpp diff --git a/src/dpp/dtemplate.cpp b/src/dpp/dtemplate.cpp index cd339ca501..06126537b9 100644 --- a/src/dpp/dtemplate.cpp +++ b/src/dpp/dtemplate.cpp @@ -60,4 +60,4 @@ std::string dtemplate::build_json(bool with_id) const { return j.dump(); } -}; +} // namespace dpp diff --git a/src/dpp/emoji.cpp b/src/dpp/emoji.cpp index b4a59508b7..45b2b96470 100644 --- a/src/dpp/emoji.cpp +++ b/src/dpp/emoji.cpp @@ -128,5 +128,5 @@ std::string emoji::get_url(uint16_t size, const dpp::image_type format, bool pre } -}; +} // namespace dpp diff --git a/src/dpp/etf.cpp b/src/dpp/etf.cpp index daa2b2ca32..6e1d5d08e5 100644 --- a/src/dpp/etf.cpp +++ b/src/dpp/etf.cpp @@ -723,5 +723,5 @@ etf_buffer::etf_buffer(size_t initial) { etf_buffer::~etf_buffer() = default; -}; +} // namespace dpp diff --git a/src/dpp/guild.cpp b/src/dpp/guild.cpp index 772bb53551..2278c80221 100644 --- a/src/dpp/guild.cpp +++ b/src/dpp/guild.cpp @@ -1120,4 +1120,4 @@ onboarding &onboarding::set_enabled(const bool is_enabled) { } -}; +} // namespace dpp diff --git a/src/dpp/httpsclient.cpp b/src/dpp/httpsclient.cpp index 494230f101..819d9dc5b3 100644 --- a/src/dpp/httpsclient.cpp +++ b/src/dpp/httpsclient.cpp @@ -354,4 +354,4 @@ http_connect_info https_client::get_host_info(std::string url) { return hci; } -}; +} // namespace dpp diff --git a/src/dpp/integration.cpp b/src/dpp/integration.cpp index 674266ba43..a31fbf2ae2 100644 --- a/src/dpp/integration.cpp +++ b/src/dpp/integration.cpp @@ -142,4 +142,4 @@ connection& connection::fill_from_json(nlohmann::json* j) { } -}; +} // namespace dpp diff --git a/src/dpp/invite.cpp b/src/dpp/invite.cpp index bfd23bb04f..c820fb04a4 100644 --- a/src/dpp/invite.cpp +++ b/src/dpp/invite.cpp @@ -112,4 +112,4 @@ invite &invite::set_unique(const bool is_unique) { return *this; } -}; +} // namespace dpp diff --git a/src/dpp/managed.cpp b/src/dpp/managed.cpp index c3a5cad3b1..d6cbc1efa7 100644 --- a/src/dpp/managed.cpp +++ b/src/dpp/managed.cpp @@ -37,4 +37,4 @@ double managed::get_creation_time() const { return this->id.get_creation_time(); } -}; +} // namespace dpp diff --git a/src/dpp/message.cpp b/src/dpp/message.cpp index ec6a36fa1b..968b4ca0a6 100644 --- a/src/dpp/message.cpp +++ b/src/dpp/message.cpp @@ -1238,4 +1238,4 @@ sticker& sticker::set_file_content(const std::string &fc) { } -}; +} // namespace dpp diff --git a/src/dpp/permissions.cpp b/src/dpp/permissions.cpp index 58eefaa3ce..02dd8325d7 100644 --- a/src/dpp/permissions.cpp +++ b/src/dpp/permissions.cpp @@ -27,4 +27,4 @@ permission::operator nlohmann::json() const { return std::to_string(value); } -} +} // namespace dpp diff --git a/src/dpp/presence.cpp b/src/dpp/presence.cpp index a63a355708..d5c0996fc1 100644 --- a/src/dpp/presence.cpp +++ b/src/dpp/presence.cpp @@ -282,4 +282,4 @@ presence_status presence::status() const { return (presence_status)((flags >> PF_SHIFT_MAIN) & PF_STATUS_MASK); } -}; +} // namespace dpp diff --git a/src/dpp/prune.cpp b/src/dpp/prune.cpp index b29a61b7f5..065f6adc07 100644 --- a/src/dpp/prune.cpp +++ b/src/dpp/prune.cpp @@ -50,4 +50,4 @@ std::string prune::build_json(bool with_prune_count) const { return j.dump(); } -}; +} // namespace dpp diff --git a/src/dpp/queues.cpp b/src/dpp/queues.cpp index 9d9d035565..1ead9511cd 100644 --- a/src/dpp/queues.cpp +++ b/src/dpp/queues.cpp @@ -419,4 +419,4 @@ bool request_queue::is_globally_ratelimited() const return this->globally_ratelimited; } -}; +} // namespace dpp diff --git a/src/dpp/role.cpp b/src/dpp/role.cpp index 7739a3ef19..2faf148269 100644 --- a/src/dpp/role.cpp +++ b/src/dpp/role.cpp @@ -495,4 +495,4 @@ std::string application_role_connection::build_json(bool with_id) const { } -}; +} // namespace dpp diff --git a/src/dpp/scheduled_event.cpp b/src/dpp/scheduled_event.cpp index f3a7f4c359..5954058eea 100644 --- a/src/dpp/scheduled_event.cpp +++ b/src/dpp/scheduled_event.cpp @@ -182,4 +182,4 @@ std::string scheduled_event::build_json(bool with_id) const { return j.dump(); } -}; +} // namespace dpp diff --git a/src/dpp/slashcommand.cpp b/src/dpp/slashcommand.cpp index 27a97904fd..096f337463 100644 --- a/src/dpp/slashcommand.cpp +++ b/src/dpp/slashcommand.cpp @@ -949,4 +949,4 @@ std::string command_interaction::get_mention() const { std::string slashcommand::get_mention() const { return dpp::utility::slashcommand_mention(id, name); } -}; +} // namespace dpp diff --git a/src/dpp/snowflake.cpp b/src/dpp/snowflake.cpp index 9974657286..788ee02481 100644 --- a/src/dpp/snowflake.cpp +++ b/src/dpp/snowflake.cpp @@ -89,4 +89,4 @@ uint16_t snowflake::get_increment() const { return (value & 0xFFF); } -} +} // namespace dpp diff --git a/src/dpp/sslclient.cpp b/src/dpp/sslclient.cpp index 95789f0720..6761c509b4 100644 --- a/src/dpp/sslclient.cpp +++ b/src/dpp/sslclient.cpp @@ -650,4 +650,4 @@ ssl_client::~ssl_client() cleanup(); } -}; +} // namespace dpp diff --git a/src/dpp/stage_instance.cpp b/src/dpp/stage_instance.cpp index 58adeb64e5..544ae37f38 100644 --- a/src/dpp/stage_instance.cpp +++ b/src/dpp/stage_instance.cpp @@ -56,4 +56,4 @@ std::string stage_instance::build_json(bool with_id) const { return j.dump(); } -}; +} // namespace dpp diff --git a/src/dpp/user.cpp b/src/dpp/user.cpp index 75f3c24bfa..dc009923ee 100644 --- a/src/dpp/user.cpp +++ b/src/dpp/user.cpp @@ -300,4 +300,4 @@ void from_json(const nlohmann::json& j, user& u) { } } -}; +} // namespace dpp diff --git a/src/dpp/utility.cpp b/src/dpp/utility.cpp index 3ea688099a..52c60abe82 100644 --- a/src/dpp/utility.cpp +++ b/src/dpp/utility.cpp @@ -618,6 +618,6 @@ namespace dpp { #endif #endif } - }; + } // namespace utility -}; +} // namespace dpp diff --git a/src/dpp/voiceregion.cpp b/src/dpp/voiceregion.cpp index bca7639063..ee3faa3061 100644 --- a/src/dpp/voiceregion.cpp +++ b/src/dpp/voiceregion.cpp @@ -72,5 +72,5 @@ bool voiceregion::is_vip() const { } -}; +} // namespace dpp diff --git a/src/dpp/voicestate.cpp b/src/dpp/voicestate.cpp index b1339c2041..92c8c2661f 100644 --- a/src/dpp/voicestate.cpp +++ b/src/dpp/voicestate.cpp @@ -87,4 +87,4 @@ std::string voicestate::build_json(bool with_id) const { return json({}).dump(); } -}; +} // namespace dpp diff --git a/src/dpp/webhook.cpp b/src/dpp/webhook.cpp index 96e3983242..13af118527 100644 --- a/src/dpp/webhook.cpp +++ b/src/dpp/webhook.cpp @@ -114,5 +114,5 @@ webhook& webhook::load_image(const std::string &image_blob, const image_type typ return *this; } -}; +} // namespace dpp diff --git a/src/dpp/wsclient.cpp b/src/dpp/wsclient.cpp index 9e2796ee37..1d819fcc39 100644 --- a/src/dpp/wsclient.cpp +++ b/src/dpp/wsclient.cpp @@ -313,4 +313,4 @@ void websocket_client::close() ssl_client::close(); } -}; +} // namespace dpp diff --git a/src/unittest/test.cpp b/src/unittest/test.cpp index 14bd314ea0..1a3762b533 100644 --- a/src/unittest/test.cpp +++ b/src/unittest/test.cpp @@ -28,7 +28,7 @@ namespace { * @brief Thread emoji - https://www.compart.com/en/unicode/U+1F9F5 */ inline const std::string THREAD_EMOJI = "\xF0\x9F\xA7\xB5"; -} +} // namespace /* Unit tests go here */ int main(int argc, char *argv[]) diff --git a/src/unittest/unittest.cpp b/src/unittest/unittest.cpp index 6c909c9f77..578b8e0e41 100644 --- a/src/unittest/unittest.cpp +++ b/src/unittest/unittest.cpp @@ -243,7 +243,7 @@ namespace { return (env_var ? env_var : "../../testdata/"); } -} +} // namespace std::vector load_test_audio() { std::vector testaudio;