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

@ -55,7 +55,7 @@ class ActionMap : public SimObject
friend class ContextAction;
protected:
bool onAdd();
bool onAdd() override;
struct Node {
U32 modifiers;
@ -214,8 +214,8 @@ public:
bool mReturnHoldTime; ///< Do we return back our time held?
ContextAction(StringTableEntry func, F32 minHoldTime, ActionMap::Node* button, bool holdOnly);
virtual void processTick();
virtual void interpolateTick(F32 delta) {}
virtual void advanceTime(F32 timeDelta) {}
void processTick() override;
void interpolateTick(F32 delta) override {}
void advanceTime(F32 timeDelta) override {}
};
#endif // _ACTIONMAP_H_

View file

@ -38,29 +38,29 @@ public:
mIndex = index;
mString = string;
}
virtual void pack(NetConnection* /*ps*/, BitStream *bstream)
void pack(NetConnection* /*ps*/, BitStream *bstream) override
{
bstream->writeInt(mIndex, ConnectionStringTable::EntryBitSize);
bstream->writeString(mString.getString());
}
virtual void write(NetConnection* /*ps*/, BitStream *bstream)
void write(NetConnection* /*ps*/, BitStream *bstream) override
{
bstream->writeInt(mIndex, ConnectionStringTable::EntryBitSize);
bstream->writeString(mString.getString());
}
virtual void unpack(NetConnection* /*con*/, BitStream *bstream)
void unpack(NetConnection* /*con*/, BitStream *bstream) override
{
char buf[256];
mIndex = bstream->readInt(ConnectionStringTable::EntryBitSize);
bstream->readString(buf);
mString = NetStringHandle(buf);
}
virtual void notifyDelivered(NetConnection *ps, bool madeit)
void notifyDelivered(NetConnection *ps, bool madeit) override
{
if(madeit)
ps->confirmStringReceived(mString, mIndex);
}
virtual void process(NetConnection *connection)
void process(NetConnection *connection) override
{
#ifdef TORQUE_DEBUG_NET
Con::printf("Mapping string: %s to index: %d", mString.getString(), mIndex);

View file

@ -69,25 +69,25 @@ public:
typedef NetEvent Parent;
ConnectionMessageEvent(U32 msg=0, U32 seq=0, U32 gc=0)
{ message = msg; sequence = seq; ghostCount = gc;}
void pack(NetConnection *, BitStream *bstream)
void pack(NetConnection *, BitStream *bstream) override
{
bstream->write(sequence);
bstream->writeInt(message, 3);
bstream->writeInt(ghostCount, NetConnection::GhostIdBitSize + 1);
}
void write(NetConnection *, BitStream *bstream)
void write(NetConnection *, BitStream *bstream) override
{
bstream->write(sequence);
bstream->writeInt(message, 3);
bstream->writeInt(ghostCount, NetConnection::GhostIdBitSize + 1);
}
void unpack(NetConnection *, BitStream *bstream)
void unpack(NetConnection *, BitStream *bstream) override
{
bstream->read(&sequence);
message = bstream->readInt(3);
ghostCount = bstream->readInt(NetConnection::GhostIdBitSize + 1);
}
void process(NetConnection *ps)
void process(NetConnection *ps) override
{
ps->handleConnectionMessage(message, sequence, ghostCount);
}
@ -790,7 +790,7 @@ public:
stream.setBuffer(buffer, inStream->getPosition());
stream.setPosition(inStream->getPosition());
}
void process(SimObject *object)
void process(SimObject *object) override
{
((NetConnection *) object)->sendPacket(&stream);
}

View file

@ -59,28 +59,28 @@ public:
}
}
virtual void pack(NetConnection *, BitStream *bstream)
void pack(NetConnection *, BitStream *bstream) override
{
bstream->writeRangedU32(nameCount, 0, MaxFileNames);
for(U32 i = 0; i < nameCount; i++)
bstream->writeString(mFileNames[i]);
}
virtual void write(NetConnection *, BitStream *bstream)
void write(NetConnection *, BitStream *bstream) override
{
bstream->writeRangedU32(nameCount, 0, MaxFileNames);
for(U32 i = 0; i < nameCount; i++)
bstream->writeString(mFileNames[i]);
}
virtual void unpack(NetConnection *, BitStream *bstream)
void unpack(NetConnection *, BitStream *bstream) override
{
nameCount = bstream->readRangedU32(0, MaxFileNames);
for(U32 i = 0; i < nameCount; i++)
bstream->readString(mFileNames[i]);
}
virtual void process(NetConnection *connection)
void process(NetConnection *connection) override
{
U32 i;
for(i = 0; i < nameCount; i++)
@ -120,30 +120,30 @@ public:
chunkLen = len;
}
virtual void pack(NetConnection *, BitStream *bstream)
void pack(NetConnection *, BitStream *bstream) override
{
bstream->writeRangedU32(chunkLen, 0, ChunkSize);
bstream->write(chunkLen, chunkData);
}
virtual void write(NetConnection *, BitStream *bstream)
void write(NetConnection *, BitStream *bstream) override
{
bstream->writeRangedU32(chunkLen, 0, ChunkSize);
bstream->write(chunkLen, chunkData);
}
virtual void unpack(NetConnection *, BitStream *bstream)
void unpack(NetConnection *, BitStream *bstream) override
{
chunkLen = bstream->readRangedU32(0, ChunkSize);
bstream->read(chunkLen, chunkData);
}
virtual void process(NetConnection *connection)
void process(NetConnection *connection) override
{
connection->chunkReceived(chunkData, chunkLen);
}
virtual void notifyDelivered(NetConnection *nc, bool madeIt)
void notifyDelivered(NetConnection *nc, bool madeIt) override
{
if(!nc->isRemoved())
nc->sendFileChunk();

View file

@ -63,7 +63,7 @@ public:
~GhostAlwaysObjectEvent()
{ delete object; }
void pack(NetConnection *ps, BitStream *bstream)
void pack(NetConnection *ps, BitStream *bstream) override
{
bstream->writeInt(ghostIndex, NetConnection::GhostIdBitSize);
@ -83,7 +83,7 @@ public:
#endif
}
}
void write(NetConnection *ps, BitStream *bstream)
void write(NetConnection *ps, BitStream *bstream) override
{
bstream->writeInt(ghostIndex, NetConnection::GhostIdBitSize);
if(bstream->writeFlag(validObject))
@ -100,7 +100,7 @@ public:
#endif
}
}
void unpack(NetConnection *ps, BitStream *bstream)
void unpack(NetConnection *ps, BitStream *bstream) override
{
ghostIndex = bstream->readInt(NetConnection::GhostIdBitSize);
@ -136,7 +136,7 @@ public:
validObject = false;
}
}
void process(NetConnection *ps)
void process(NetConnection *ps) override
{
Con::executef("onGhostAlwaysObjectReceived");