rest of virtuals removed

virtuals removed and replaced with override where necessary on the rest of the code base, clang-tidy to the rescue.
This commit is contained in:
marauder2k7 2024-03-18 18:40:22 +00:00
parent efbe5e90f5
commit 2b295fb7f0
454 changed files with 4162 additions and 4156 deletions

View file

@ -52,8 +52,8 @@ private:
protected:
static const WCHAR *smPVIQueryTypeToWMIString [];
bool _queryProperty( const PVIQueryType queryType, const U32 adapterId, String *outValue );
bool _initialize();
bool _queryProperty( const PVIQueryType queryType, const U32 adapterId, String *outValue ) override;
bool _initialize() override;
String _lookUpVendorId(U32 vendorId);
public:

View file

@ -124,7 +124,7 @@ class DInputDevice : public InputDevice
static bool joystickDetected();
//
bool process();
bool process() override;
};
//------------------------------------------------------------------------------

View file

@ -94,14 +94,14 @@ class DInputManager : public InputManager
public:
DInputManager();
bool enable();
void disable();
bool enable() override;
void disable() override;
void onDeleteNotify( SimObject* object );
bool onAdd();
void onRemove();
void onDeleteNotify( SimObject* object ) override;
bool onAdd() override;
void onRemove() override;
void process();
void process() override;
// DirectInput functions:
static void init();

View file

@ -35,7 +35,7 @@ public:
~Win32DLibrary();
bool open(const char* file);
void close();
void *bind(const char *name);
void *bind(const char *name) override;
};
Win32DLibrary::Win32DLibrary()

View file

@ -43,7 +43,7 @@ class ExecuteThread : public Thread
public:
ExecuteThread(const char *executable, const char *args = NULL, const char *directory = NULL);
virtual void run(void *arg = 0);
void run(void *arg = 0) override;
};
//-----------------------------------------------------------------------------
@ -62,7 +62,7 @@ public:
mOK = ok;
}
virtual void process(SimObject *object)
void process(SimObject *object) override
{
if( Con::isFunction( "onExecuteDone" ) )
Con::executef( "onExecuteDone", Con::getIntArg( mOK ) );

View file

@ -38,23 +38,23 @@ public:
virtual ~WinFont();
// PlatformFont virtual methods
virtual bool isValidChar(const UTF16 ch) const;
virtual bool isValidChar(const UTF8 *str) const;
bool isValidChar(const UTF16 ch) const override;
bool isValidChar(const UTF8 *str) const override;
inline virtual U32 getFontHeight() const
inline U32 getFontHeight() const override
{
return mTextMetric.tmHeight;
}
inline virtual U32 getFontBaseLine() const
inline U32 getFontBaseLine() const override
{
return mTextMetric.tmAscent;
}
virtual PlatformFont::CharInfo &getCharInfo(const UTF16 ch) const;
virtual PlatformFont::CharInfo &getCharInfo(const UTF8 *str) const;
PlatformFont::CharInfo &getCharInfo(const UTF16 ch) const override;
PlatformFont::CharInfo &getCharInfo(const UTF8 *str) const override;
virtual bool create(const char *name, dsize_t size, U32 charset = TGE_ANSI_CHARSET);
bool create(const char *name, dsize_t size, U32 charset = TGE_ANSI_CHARSET) override;
};
#endif // _WINFONT_H_

View file

@ -57,13 +57,13 @@ class Win32RedBookDevice : public RedBookDevice
U32 getDeviceId();
bool open();
bool close();
bool play(U32);
bool stop();
bool getTrackCount(U32 *);
bool getVolume(F32 *);
bool setVolume(F32);
bool open() override;
bool close() override;
bool play(U32) override;
bool stop() override;
bool getTrackCount(U32 *) override;
bool getVolume(F32 *) override;
bool setVolume(F32) override;
};
//------------------------------------------------------------------------------

View file

@ -47,7 +47,7 @@ public:
mPerfCountNext = 0.0;
}
const S32 getElapsedMs()
const S32 getElapsedMs() override
{
// Use QPC, update remainders so we don't leak time, and return the elapsed time.
QueryPerformanceCounter( (LARGE_INTEGER *) &mPerfCountNext);
@ -59,7 +59,7 @@ public:
return elapsed;
}
void reset()
void reset() override
{
// Do some simple copying to reset the timer to 0.
mPerfCountCurrent = mPerfCountNext;

View file

@ -72,10 +72,10 @@ namespace Win32
HANDLE *getHANDLES() { return mHandleList.address(); }
private:
virtual void internalProcessOnce();
void internalProcessOnce() override;
virtual bool internalAddNotification( const Path &dir );
virtual bool internalRemoveNotification( const Path &dir );
bool internalAddNotification( const Path &dir ) override;
bool internalRemoveNotification( const Path &dir ) override;
Vector<Path> mDirs;
Vector<HANDLE> mHandleList;

View file

@ -42,15 +42,15 @@ public:
Win32FileSystem(String volume);
~Win32FileSystem();
String getTypeStr() const { return "Win32"; }
String getTypeStr() const override { return "Win32"; }
FileNodeRef resolve(const Path& path);
FileNodeRef resolve(const Path& path) override;
void verifyCompatibility(const Path& _path, WIN32_FIND_DATAW _info);
FileNodeRef create(const Path& path,FileNode::Mode);
bool remove(const Path& path);
bool rename(const Path& from,const Path& to);
Path mapTo(const Path& path);
Path mapFrom(const Path& path);
FileNodeRef create(const Path& path,FileNode::Mode) override;
bool remove(const Path& path) override;
bool rename(const Path& from,const Path& to) override;
Path mapTo(const Path& path) override;
Path mapFrom(const Path& path) override;
private:
String mVolume;
@ -65,24 +65,24 @@ class Win32File: public File
public:
~Win32File();
Path getName() const;
NodeStatus getStatus() const;
bool getAttributes(Attributes*);
U64 getSize();
Path getName() const override;
NodeStatus getStatus() const override;
bool getAttributes(Attributes*) override;
U64 getSize() override;
U32 getPosition();
U32 setPosition(U32,SeekMode);
U32 getPosition() override;
U32 setPosition(U32,SeekMode) override;
bool open(AccessMode);
bool close();
bool open(AccessMode) override;
bool close() override;
U32 read(void* dst, U32 size);
U32 write(const void* src, U32 size);
U32 read(void* dst, U32 size) override;
U32 write(const void* src, U32 size) override;
private:
friend class Win32FileSystem;
U32 calculateChecksum();
U32 calculateChecksum() override;
Path mPath;
String mName;
@ -103,18 +103,18 @@ class Win32Directory: public Directory
public:
~Win32Directory();
Path getName() const;
NodeStatus getStatus() const;
bool getAttributes(Attributes*);
Path getName() const override;
NodeStatus getStatus() const override;
bool getAttributes(Attributes*) override;
bool open();
bool close();
bool read(Attributes*);
bool open() override;
bool close() override;
bool read(Attributes*) override;
private:
friend class Win32FileSystem;
U32 calculateChecksum();
U32 calculateChecksum() override;
Path mPath;
String mName;