From 0a74133419bed4966a5cf8d62d38ad325c9204e4 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 5 Oct 2023 18:10:19 +1000 Subject: [PATCH] feat: add initial clang format and tidy --- .clang-format | 4 ++ .clang-tidy | 111 ++++++++++++++++++++++++++++++++++++ libraries/.clang-tidy | 2 + src/sample_mm.cpp | 128 ++++++++++++++++++++++++------------------ src/sample_mm.h | 67 ++++++++++++---------- 5 files changed, 226 insertions(+), 86 deletions(-) create mode 100644 .clang-format create mode 100644 .clang-tidy create mode 100644 libraries/.clang-tidy diff --git a/.clang-format b/.clang-format new file mode 100644 index 000000000..98ba18a19 --- /dev/null +++ b/.clang-format @@ -0,0 +1,4 @@ +--- +Language: Cpp +BasedOnStyle: Microsoft +ColumnLimit: 120 \ No newline at end of file diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 000000000..079f1a403 --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,111 @@ +--- +# Configure clang-tidy for this project. + +# Here is an explanation for why some of the checks are disabled: +# +# -google-readability-namespace-comments: the *_CLIENT_NS is a macro, and +# clang-tidy fails to match it against the initial value. +# +# -modernize-use-trailing-return-type: clang-tidy recommends using +# `auto Foo() -> std::string { return ...; }`, we think the code is less +# readable in this form. +# +# --modernize-concat-nested-namespaces: clang-tidy recommends +# `namespace google::cloud {}` over `namespace google { namespace cloud { } }` +# We need to support C++14, which does not supported nested namespaces. +# +# --modernize-use-nodiscard: clang-tidy recommends adding a nodiscard annotation +# to functions where the return value should not be ignored. +# We need to support C++14, which does not supported the annotation. +# +# -modernize-return-braced-init-list: We think removing typenames and using +# only braced-init can hurt readability. +# +# -modernize-avoid-c-arrays: We only use C arrays when they seem to be the +# right tool for the job, such as `char foo[] = "hello"`. In these cases, +# avoiding C arrays often makes the code less readable, and std::array is +# not a drop-in replacement because it doesn't deduce the size. +# +# -performance-move-const-arg: This warning requires the developer to +# know/care more about the implementation details of types/functions than +# should be necessary. For example, `A a; F(std::move(a));` will trigger a +# warning IFF `A` is a trivial type (and therefore the move is +# meaningless). It would also warn if `F` accepts by `const&`, which is +# another detail that the caller need not care about. +# +# -readability-redundant-declaration: A friend declaration inside a class +# counts as a declaration, so if we also declare that friend outside the +# class in order to document it as part of the public API, that will +# trigger a redundant declaration warning from this check. +# +# -readability-function-cognitive-complexity: too many false positives with +# clang-tidy-12. We need to disable this check in macros, and that setting +# only appears in clang-tidy-13. +# +# -bugprone-narrowing-conversions: too many false positives around +# `std::size_t` vs. `*::difference_type`. +# +# -bugprone-easily-swappable-parameters: too many false positives. +# +# -bugprone-implicit-widening-of-multiplication-result: too many false positives. +# Almost any expression of the form `2 * variable` or `long x = a_int * b_int;` +# generates an error. +# +# -bugprone-unchecked-optional-access: too many false positives in tests. +# Despite what the documentation says, this warning appears after +# `ASSERT_TRUE(variable)` or `ASSERT_TRUE(variable.has_value())`. +# +Checks: > + -*, + abseil-*, + bugprone-*,GetGame + google-*, + misc-*, + modernize-*, + performance-*, + portability-*, + readability-*, + -google-readability-braces-around-statements, + -google-readability-namespace-comments, + -google-runtime-references, + -misc-non-private-member-variables-in-classes, + -misc-const-correctness, + -modernize-return-braced-init-list, + -modernize-use-trailing-return-type, + -modernize-concat-nested-namespaces, + -modernize-use-nodiscard, + -modernize-avoid-c-arrays, + -performance-move-const-arg, + -readability-braces-around-statements, + -readability-identifier-length, + -readability-magic-numbers, + -readability-named-parameter, + -readability-redundant-declaration, + -readability-function-cognitive-complexity, + -readability-convert-member-functions-to-static, + -bugprone-narrowing-conversions, + -bugprone-easily-swappable-parameters, + -bugprone-implicit-widening-of-multiplication-result, + -bugprone-unchecked-optional-access + +# Turn all the warnings from the checks above into errors. +WarningsAsErrors: "*" + +HeaderFilterRegex: "(google/cloud/|generator/).*\\.h$" + +CheckOptions: + - key: readability-identifier-naming.ClassCase + value: CamelCase + - key: readability-identifier-naming.EnumCase + value: CamelCase + - key: readability-identifier-naming.FunctionCase + value: camelBack + - key: readability-identifier-naming.MemberCase + value: CamelCase + - key: readability-identifier-naming.ParameterCase + value: camelBack + - key: readability-identifier-naming.UnionCase + value: CamelCase + - key: readability-identifier-naming.VariableCase + value: CamelCase +... diff --git a/libraries/.clang-tidy b/libraries/.clang-tidy new file mode 100644 index 000000000..a928ddfc3 --- /dev/null +++ b/libraries/.clang-tidy @@ -0,0 +1,2 @@ +# Disable all checks in this folder. +Checks: '-*' \ No newline at end of file diff --git a/src/sample_mm.cpp b/src/sample_mm.cpp index b7307c37e..4c1ec85d7 100644 --- a/src/sample_mm.cpp +++ b/src/sample_mm.cpp @@ -1,3 +1,4 @@ +#pragma ide diagnostic ignored "readability-identifier-naming" /** * vim: set ts=4 sw=4 tw=99 noet : * ====================================================== @@ -12,35 +13,40 @@ * This sample plugin is public domain. */ -#include #include "sample_mm.h" + +#include + #include "iserver.h" SH_DECL_HOOK3_void(IServerGameDLL, GameFrame, SH_NOATTRIB, 0, bool, bool, bool); SH_DECL_HOOK4_void(IServerGameClients, ClientActive, SH_NOATTRIB, 0, CPlayerSlot, bool, const char *, uint64); -SH_DECL_HOOK5_void(IServerGameClients, ClientDisconnect, SH_NOATTRIB, 0, CPlayerSlot, int, const char *, uint64, const char *); +SH_DECL_HOOK5_void(IServerGameClients, ClientDisconnect, SH_NOATTRIB, 0, CPlayerSlot, int, const char *, uint64, + const char *); SH_DECL_HOOK4_void(IServerGameClients, ClientPutInServer, SH_NOATTRIB, 0, CPlayerSlot, char const *, int, uint64); -SH_DECL_HOOK1_void(IServerGameClients, ClientSettingsChanged, SH_NOATTRIB, 0, CPlayerSlot ); -SH_DECL_HOOK6_void(IServerGameClients, OnClientConnected, SH_NOATTRIB, 0, CPlayerSlot, const char*, uint64, const char *, const char *, bool); -SH_DECL_HOOK6(IServerGameClients, ClientConnect, SH_NOATTRIB, 0, bool, CPlayerSlot, const char*, uint64, const char *, bool, CBufferString *); +SH_DECL_HOOK1_void(IServerGameClients, ClientSettingsChanged, SH_NOATTRIB, 0, CPlayerSlot); +SH_DECL_HOOK6_void(IServerGameClients, OnClientConnected, SH_NOATTRIB, 0, CPlayerSlot, const char *, uint64, + const char *, const char *, bool); +SH_DECL_HOOK6(IServerGameClients, ClientConnect, SH_NOATTRIB, 0, bool, CPlayerSlot, const char *, uint64, const char *, + bool, CBufferString *); SH_DECL_HOOK2(IGameEventManager2, FireEvent, SH_NOATTRIB, 0, bool, IGameEvent *, bool); -SH_DECL_HOOK2_void( IServerGameClients, ClientCommand, SH_NOATTRIB, 0, CPlayerSlot, const CCommand & ); +SH_DECL_HOOK2_void(IServerGameClients, ClientCommand, SH_NOATTRIB, 0, CPlayerSlot, const CCommand &); SamplePlugin g_SamplePlugin; -IServerGameDLL *server = NULL; -IServerGameClients *gameclients = NULL; -IVEngineServer *engine = NULL; -IGameEventManager2 *gameevents = NULL; -ICvar *icvar = NULL; +IServerGameDLL *server = nullptr; +IServerGameClients *gameclients = nullptr; +IVEngineServer *engine = nullptr; +IGameEventManager2 *gameevents = nullptr; +ICvar *icvar = nullptr; -// Should only be called within the active game loop (i e map should be loaded and active) -// otherwise that'll be nullptr! -CGlobalVars *GetGameGlobals() +// Should only be called within the active game loop (i e map should be loaded +// and active) otherwise that'll be nullptr! +CGlobalVars *getGameGlobals() { INetworkGameServer *server = g_pNetworkServerService->GetIGameServer(); - if(!server) + if (!server) return nullptr; return g_pNetworkServerService->GetIGameServer()->GetGlobals(); @@ -53,7 +59,7 @@ ConVar sample_cvar("sample_cvar", "42", 0); CON_COMMAND_F(sample_command, "Sample command", FCVAR_NONE) { - META_CONPRINTF( "Sample command called by %d. Command: %s\n", context.GetPlayerSlot(), args.GetCommandString() ); + META_CONPRINTF("Sample command called by %d. Command: %s\n", context.GetPlayerSlot(), args.GetCommandString()); } PLUGIN_EXPOSE(SamplePlugin, g_SamplePlugin); @@ -65,26 +71,31 @@ bool SamplePlugin::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, GET_V_IFACE_CURRENT(GetEngineFactory, icvar, ICvar, CVAR_INTERFACE_VERSION); GET_V_IFACE_ANY(GetServerFactory, server, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL); GET_V_IFACE_ANY(GetServerFactory, gameclients, IServerGameClients, INTERFACEVERSION_SERVERGAMECLIENTS); - GET_V_IFACE_ANY(GetEngineFactory, g_pNetworkServerService, INetworkServerService, NETWORKSERVERSERVICE_INTERFACE_VERSION); + GET_V_IFACE_ANY(GetEngineFactory, g_pNetworkServerService, INetworkServerService, + NETWORKSERVERSERVICE_INTERFACE_VERSION); - // Currently doesn't work from within mm side, use GetGameGlobals() in the mean time instead - // gpGlobals = ismm->GetCGlobals(); + // Currently doesn't work from within mm side, use GetGameGlobals() in the + // mean time instead gpGlobals = ismm->GetCGlobals(); - META_CONPRINTF( "Starting plugin.\n" ); + META_CONPRINTF("Starting plugin.\n"); SH_ADD_HOOK_MEMFUNC(IServerGameDLL, GameFrame, server, this, &SamplePlugin::Hook_GameFrame, true); SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientActive, gameclients, this, &SamplePlugin::Hook_ClientActive, true); - SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientDisconnect, gameclients, this, &SamplePlugin::Hook_ClientDisconnect, true); - SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientPutInServer, gameclients, this, &SamplePlugin::Hook_ClientPutInServer, true); - SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientSettingsChanged, gameclients, this, &SamplePlugin::Hook_ClientSettingsChanged, false); - SH_ADD_HOOK_MEMFUNC(IServerGameClients, OnClientConnected, gameclients, this, &SamplePlugin::Hook_OnClientConnected, false); - SH_ADD_HOOK_MEMFUNC( IServerGameClients, ClientConnect, gameclients, this, &SamplePlugin::Hook_ClientConnect, false ); + SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientDisconnect, gameclients, this, &SamplePlugin::Hook_ClientDisconnect, + true); + SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientPutInServer, gameclients, this, &SamplePlugin::Hook_ClientPutInServer, + true); + SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientSettingsChanged, gameclients, this, + &SamplePlugin::Hook_ClientSettingsChanged, false); + SH_ADD_HOOK_MEMFUNC(IServerGameClients, OnClientConnected, gameclients, this, &SamplePlugin::Hook_OnClientConnected, + false); + SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientConnect, gameclients, this, &SamplePlugin::Hook_ClientConnect, false); SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientCommand, gameclients, this, &SamplePlugin::Hook_ClientCommand, false); - META_CONPRINTF( "All hooks started!\n" ); + META_CONPRINTF("All hooks started!\n"); g_pCVar = icvar; - ConVar_Register( FCVAR_RELEASE | FCVAR_CLIENT_CAN_EXECUTE | FCVAR_GAMEDLL ); + ConVar_Register(FCVAR_RELEASE | FCVAR_CLIENT_CAN_EXECUTE | FCVAR_GAMEDLL); return true; } @@ -93,12 +104,18 @@ bool SamplePlugin::Unload(char *error, size_t maxlen) { SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, GameFrame, server, this, &SamplePlugin::Hook_GameFrame, true); SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientActive, gameclients, this, &SamplePlugin::Hook_ClientActive, true); - SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientDisconnect, gameclients, this, &SamplePlugin::Hook_ClientDisconnect, true); - SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientPutInServer, gameclients, this, &SamplePlugin::Hook_ClientPutInServer, true); - SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientSettingsChanged, gameclients, this, &SamplePlugin::Hook_ClientSettingsChanged, false); - SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, OnClientConnected, gameclients, this, &SamplePlugin::Hook_OnClientConnected, false); - SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientConnect, gameclients, this, &SamplePlugin::Hook_ClientConnect, false); - SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientCommand, gameclients, this, &SamplePlugin::Hook_ClientCommand, false); + SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientDisconnect, gameclients, this, + &SamplePlugin::Hook_ClientDisconnect, true); + SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientPutInServer, gameclients, this, + &SamplePlugin::Hook_ClientPutInServer, true); + SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientSettingsChanged, gameclients, this, + &SamplePlugin::Hook_ClientSettingsChanged, false); + SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, OnClientConnected, gameclients, this, + &SamplePlugin::Hook_OnClientConnected, false); + SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientConnect, gameclients, this, &SamplePlugin::Hook_ClientConnect, + false); + SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientCommand, gameclients, this, &SamplePlugin::Hook_ClientCommand, + false); return true; } @@ -110,44 +127,49 @@ void SamplePlugin::AllPluginsLoaded() */ } -void SamplePlugin::Hook_ClientActive( CPlayerSlot slot, bool bLoadGame, const char *pszName, uint64 xuid ) +void SamplePlugin::Hook_ClientActive(CPlayerSlot slot, bool bLoadGame, const char *pszName, uint64 xuid) { - META_CONPRINTF( "Hook_ClientActive(%d, %d, \"%s\", %d)\n", slot, bLoadGame, pszName, xuid ); + META_CONPRINTF("Hook_ClientActive(%d, %d, \"%s\", %d)\n", slot, bLoadGame, pszName, xuid); } -void SamplePlugin::Hook_ClientCommand( CPlayerSlot slot, const CCommand &args ) +void SamplePlugin::Hook_ClientCommand(CPlayerSlot slot, const CCommand &args) { - META_CONPRINTF( "Hook_ClientCommand(%d, \"%s\")\n", slot, args.GetCommandString() ); + META_CONPRINTF("Hook_ClientCommand(%d, \"%s\")\n", slot, args.GetCommandString()); } -void SamplePlugin::Hook_ClientSettingsChanged( CPlayerSlot slot ) +void SamplePlugin::Hook_ClientSettingsChanged(CPlayerSlot slot) { - META_CONPRINTF( "Hook_ClientSettingsChanged(%d)\n", slot ); + META_CONPRINTF("Hook_ClientSettingsChanged(%d)\n", slot); } -void SamplePlugin::Hook_OnClientConnected( CPlayerSlot slot, const char *pszName, uint64 xuid, const char *pszNetworkID, const char *pszAddress, bool bFakePlayer ) +void SamplePlugin::Hook_OnClientConnected(CPlayerSlot slot, const char *pszName, uint64 xuid, const char *pszNetworkID, + const char *pszAddress, bool bFakePlayer) { - META_CONPRINTF( "Hook_OnClientConnected(%d, \"%s\", %d, \"%s\", \"%s\", %d)\n", slot, pszName, xuid, pszNetworkID, pszAddress, bFakePlayer ); + META_CONPRINTF("Hook_OnClientConnected(%d, \"%s\", %d, \"%s\", \"%s\", %d)\n", slot, pszName, xuid, pszNetworkID, + pszAddress, bFakePlayer); } -bool SamplePlugin::Hook_ClientConnect( CPlayerSlot slot, const char *pszName, uint64 xuid, const char *pszNetworkID, bool unk1, CBufferString *pRejectReason ) +bool SamplePlugin::Hook_ClientConnect(CPlayerSlot slot, const char *pszName, uint64 xuid, const char *pszNetworkID, + bool unk1, CBufferString *pRejectReason) { - META_CONPRINTF( "Hook_ClientConnect(%d, \"%s\", %d, \"%s\", %d, \"%s\")\n", slot, pszName, xuid, pszNetworkID, unk1, pRejectReason->ToGrowable()->Get() ); + META_CONPRINTF("Hook_ClientConnect(%d, \"%s\", %d, \"%s\", %d, \"%s\")\n", slot, pszName, xuid, pszNetworkID, unk1, + pRejectReason->ToGrowable()->Get()); RETURN_META_VALUE(MRES_IGNORED, true); } -void SamplePlugin::Hook_ClientPutInServer( CPlayerSlot slot, char const *pszName, int type, uint64 xuid ) +void SamplePlugin::Hook_ClientPutInServer(CPlayerSlot slot, char const *pszName, int type, uint64 xuid) { - META_CONPRINTF( "Hook_ClientPutInServer(%d, \"%s\", %d, %d, %d)\n", slot, pszName, type, xuid ); + META_CONPRINTF("Hook_ClientPutInServer(%d, \"%s\", %d, %d, %d)\n", slot, pszName, type, xuid); } -void SamplePlugin::Hook_ClientDisconnect( CPlayerSlot slot, int reason, const char *pszName, uint64 xuid, const char *pszNetworkID ) +void SamplePlugin::Hook_ClientDisconnect(CPlayerSlot slot, int reason, const char *pszName, uint64 xuid, + const char *pszNetworkID) { - META_CONPRINTF( "Hook_ClientDisconnect(%d, %d, \"%s\", %d, \"%s\")\n", slot, reason, pszName, xuid, pszNetworkID ); + META_CONPRINTF("Hook_ClientDisconnect(%d, %d, \"%s\", %d, \"%s\")\n", slot, reason, pszName, xuid, pszNetworkID); } -void SamplePlugin::Hook_GameFrame( bool simulating, bool bFirstTick, bool bLastTick ) +void SamplePlugin::Hook_GameFrame(bool simulating, bool bFirstTick, bool bLastTick) { /** * simulating: @@ -158,12 +180,8 @@ void SamplePlugin::Hook_GameFrame( bool simulating, bool bFirstTick, bool bLastT } // Potentially might not work -void SamplePlugin::OnLevelInit( char const *pMapName, - char const *pMapEntities, - char const *pOldLevel, - char const *pLandmarkName, - bool loadGame, - bool background ) +void SamplePlugin::OnLevelInit(char const *pMapName, char const *pMapEntities, char const *pOldLevel, + char const *pLandmarkName, bool loadGame, bool background) { META_CONPRINTF("OnLevelInit(%s)\n", pMapName); } @@ -222,4 +240,4 @@ const char *SamplePlugin::GetName() const char *SamplePlugin::GetURL() { return "http://www.sourcemm.net/"; -} +} \ No newline at end of file diff --git a/src/sample_mm.h b/src/sample_mm.h index 1567043f9..f3753a6bb 100644 --- a/src/sample_mm.h +++ b/src/sample_mm.h @@ -1,3 +1,5 @@ +#pragma clang diagnostic push +#pragma ide diagnostic ignored "readability-identifier-naming" /** * vim: set ts=4 sw=4 tw=99 noet : * ====================================================== @@ -22,37 +24,38 @@ class SamplePlugin : public ISmmPlugin, public IMetamodListener { -public: - bool Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, bool late); - bool Unload(char *error, size_t maxlen); - bool Pause(char *error, size_t maxlen); - bool Unpause(char *error, size_t maxlen); - void AllPluginsLoaded(); -public: //hooks - void OnLevelInit( char const *pMapName, - char const *pMapEntities, - char const *pOldLevel, - char const *pLandmarkName, - bool loadGame, - bool background ); - void OnLevelShutdown(); - void Hook_GameFrame( bool simulating, bool bFirstTick, bool bLastTick ); - void Hook_ClientActive( CPlayerSlot slot, bool bLoadGame, const char *pszName, uint64 xuid ); - void Hook_ClientDisconnect( CPlayerSlot slot, int reason, const char *pszName, uint64 xuid, const char *pszNetworkID ); - void Hook_ClientPutInServer( CPlayerSlot slot, char const *pszName, int type, uint64 xuid ); - void Hook_ClientSettingsChanged( CPlayerSlot slot ); - void Hook_OnClientConnected( CPlayerSlot slot, const char *pszName, uint64 xuid, const char *pszNetworkID, const char *pszAddress, bool bFakePlayer ); - bool Hook_ClientConnect( CPlayerSlot slot, const char *pszName, uint64 xuid, const char *pszNetworkID, bool unk1, CBufferString *pRejectReason ); - void Hook_ClientCommand( CPlayerSlot nSlot, const CCommand &_cmd ); -public: - const char *GetAuthor(); - const char *GetName(); - const char *GetDescription(); - const char *GetURL(); - const char *GetLicense(); - const char *GetVersion(); - const char *GetDate(); - const char *GetLogTag(); + public: + bool Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, bool late) override; + bool Unload(char *error, size_t maxlen) override; + bool Pause(char *error, size_t maxlen) override; + bool Unpause(char *error, size_t maxlen) override; + void AllPluginsLoaded() override; + + public: // hooks + void OnLevelInit(char const *pMapName, char const *pMapEntities, char const *pOldLevel, char const *pLandmarkName, + bool loadGame, bool background) override; + void OnLevelShutdown() override; + void Hook_GameFrame(bool simulating, bool bFirstTick, bool bLastTick); + void Hook_ClientActive(CPlayerSlot slot, bool bLoadGame, const char *pszName, uint64 xuid); + void Hook_ClientDisconnect(CPlayerSlot slot, int reason, const char *pszName, uint64 xuid, + const char *pszNetworkID); + void Hook_ClientPutInServer(CPlayerSlot slot, char const *pszName, int type, uint64 xuid); + void Hook_ClientSettingsChanged(CPlayerSlot slot); + void Hook_OnClientConnected(CPlayerSlot slot, const char *pszName, uint64 xuid, const char *pszNetworkID, + const char *pszAddress, bool bFakePlayer); + bool Hook_ClientConnect(CPlayerSlot slot, const char *pszName, uint64 xuid, const char *pszNetworkID, bool unk1, + CBufferString *pRejectReason); + void Hook_ClientCommand(CPlayerSlot nSlot, const CCommand &_cmd); + + public: + const char *GetAuthor() override; + const char *GetName() override; + const char *GetDescription() override; + const char *GetURL() override; + const char *GetLicense() override; + const char *GetVersion() override; + const char *GetDate() override; + const char *GetLogTag() override; }; extern SamplePlugin g_SamplePlugin; @@ -60,3 +63,5 @@ extern SamplePlugin g_SamplePlugin; PLUGIN_GLOBALVARS(); #endif //_INCLUDE_METAMOD_SOURCE_STUB_PLUGIN_H_ + +#pragma clang diagnostic pop \ No newline at end of file