Fix clang-tidy modernize-use-override

This commit is contained in:
Robert Müller 2023-10-06 11:20:25 +02:00
parent 05ddf4a081
commit fb7669ebb0
9 changed files with 10 additions and 11 deletions

View file

@ -8,8 +8,6 @@
# Too annoying to always align for perfect padding
# clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,
# TODO: Requires C11 to fix
# modernize-use-override,
# TODO: modernize-use-override.IgnoreDestructors not supported on ubuntu-latest yet for CI
# misc-unused-parameters
# TODO: Many changes
# readability-static-accessed-through-instance,
@ -71,6 +69,7 @@ Checks: >
modernize-use-emplace,
modernize-use-equals-default,
modernize-use-equals-delete,
modernize-use-override,
modernize-use-transparent-functors,
modernize-use-uncaught-exceptions,
readability-*,

View file

@ -254,7 +254,7 @@ public:
aio_write_newline_unlocked(m_pAio);
aio_unlock(m_pAio);
}
~CLoggerAsync()
~CLoggerAsync() override
{
if(m_Close)
{

View file

@ -789,7 +789,7 @@ public:
str_copy(m_aName, pName);
}
virtual ~CScreenshotSaveJob()
~CScreenshotSaveJob() override
{
free(m_pData);
}

View file

@ -60,7 +60,7 @@ private:
public:
CJob(std::shared_ptr<CData> pData) :
m_pData(std::move(pData)) { m_Lock = lock_create(); }
virtual ~CJob() { lock_destroy(m_Lock); }
~CJob() override { lock_destroy(m_Lock); }
void Abort() REQUIRES(!m_Lock);
};
@ -250,7 +250,7 @@ class CServerBrowserHttp : public IServerBrowserHttp
{
public:
CServerBrowserHttp(IEngine *pEngine, IConsole *pConsole, const char **ppUrls, int NumUrls, int PreviousBestIndex);
virtual ~CServerBrowserHttp();
~CServerBrowserHttp() override;
void Update() override;
bool IsRefreshing() override { return m_State != STATE_DONE; }
void Refresh() override;

View file

@ -19,7 +19,7 @@ public:
};
CServerBrowserPingCache(IConsole *pConsole, IStorage *pStorage);
virtual ~CServerBrowserPingCache() = default;
~CServerBrowserPingCache() override = default;
void Load() override;

View file

@ -24,7 +24,7 @@ public:
ReadLaunchCommandLine();
str_copy(m_aPlayerName, SteamAPI_ISteamFriends_GetPersonaName(m_pSteamFriends));
}
~CSteam()
~CSteam() override
{
SteamAPI_Shutdown();
}

View file

@ -11,7 +11,7 @@ class CSqliteConnection : public IDbConnection
{
public:
CSqliteConnection(const char *pFilename, bool Setup);
virtual ~CSqliteConnection();
~CSqliteConnection() override;
void Print(IConsole *pConsole, const char *pMode) override;
const char *BinaryCollate() const override { return "BINARY"; }

View file

@ -91,7 +91,7 @@ class CRegister : public IRegister
m_pRegister(std::move(pRegister))
{
}
virtual ~CJob() = default;
~CJob() override = default;
};
CRegister *m_pParent;

View file

@ -53,7 +53,7 @@ public:
}
}
virtual ~CKernel()
~CKernel() override
{
// delete interfaces in reverse order just the way it would happen to objects on the stack
for(int i = m_NumInterfaces - 1; i >= 0; i--)