refactor: Add override keyword to virtual function overrides in GameEngineDevice#2393
Merged
xezon merged 7 commits intoTheSuperHackers:mainfrom Mar 26, 2026
Conversation
|
| Filename | Overview |
|---|---|
| Core/GameEngineDevice/Include/MilesAudioDevice/MilesAudioManager.h | Adds override to all overriding virtual methods. Non-overriding virtuals (findPlayingAudioFrom, processPlayingList, processFadingList, processStoppedList) are correctly left without override. |
| Core/GameEngineDevice/Include/W3DDevice/GameClient/W3DView.h | Large file with ~107 virtual methods updated with override. Methods like isDoingScriptedCamera, cameraModFreezeTime, isTimeFrozen, cameraEnableRealZoomMode, and cameraDisableRealZoomMode are correctly left without override as they are declarations not matching a base class virtual. |
| Core/GameEngineDevice/Include/W3DDevice/GameClient/W3DTerrainVisual.h | Some previously non-virtual methods (getTerrainColorAt, getTerrainTile, addFactionBib, removeFactionBib, addFactionBibDrawable, removeFactionBibDrawable, getLogicHeightMap, getClientHeightMap) are now correctly marked virtual ... override, making the implicit inheritance explicit. |
| Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DMouse.cpp | MouseThreadClass::Thread_Function was non-virtual; now correctly declared virtual ... override, making the implicit override of ThreadClass::Thread_Function explicit. |
| Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DShaderManager.cpp | Several file-local shader classes (ScreenDefaultFilter, ShroudTextureShader, FlatShroudTextureShader, MaskTextureShader, TerrainShader8Stage, etc.) all get override added cleanly. |
| Core/GameEngineDevice/Include/VideoDevice/Bink/BinkVideoPlayer.h | ~BinkVideoPlayer() gains both virtual and override (was undecorated); initializeBinkWithMiles() is correctly left without override as it is specific to BinkVideoPlayer and has no matching base class virtual. |
| Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/Shadow/W3DProjectedShadow.cpp | W3DShadowTexture and MissingTextureClass destructors and Get_Key() correctly gain virtual + override. |
| Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DAssetManager.cpp | W3DPrototypeClass methods (Get_Name, Get_Class_ID, Create, DeleteSelf) gain override, aligning with PrototypeClass base interface. |
| Core/GameEngineDevice/Include/W3DDevice/GameClient/Module/W3DModelDraw.h | All overriding virtual methods in W3DModelDraw and W3DModelDrawModuleData gain override. getRenderCost inside the #if defined(RTS_DEBUG) block is correctly left without override. |
| Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DTerrainVisual.cpp | TestSeismicFilter::filterCallback and applyGravityCallback gain override cleanly. |
Class Diagram
%%{init: {'theme': 'neutral'}}%%
classDiagram
class AudioManager {
+virtual init()
+virtual update()
+virtual reset()
}
class MilesAudioManager {
+virtual init() override
+virtual update() override
+virtual reset() override
}
AudioManager <|-- MilesAudioManager
class VideoPlayer {
+virtual init()
+virtual update()
+virtual open()
}
class BinkVideoPlayer {
+virtual init() override
+virtual update() override
+virtual open() override
+virtual ~BinkVideoPlayer() override
+virtual initializeBinkWithMiles()
}
VideoPlayer <|-- BinkVideoPlayer
class TerrainVisual {
+virtual load()
+virtual getTerrainColorAt()
+virtual addFactionBib()
}
class W3DTerrainVisual {
+virtual load() override
+virtual getTerrainColorAt() override
+virtual addFactionBib() override
}
TerrainVisual <|-- W3DTerrainVisual
class View {
+virtual init()
+virtual drawView()
+virtual lookAt()
}
class W3DView {
+virtual init() override
+virtual drawView() override
+virtual lookAt() override
+virtual isDoingScriptedCamera()
}
View <|-- W3DView
class GhostObject {
+virtual snapShot()
+virtual updateParentObject()
}
class W3DGhostObject {
+virtual snapShot() override
+virtual updateParentObject() override
}
GhostObject <|-- W3DGhostObject
Reviews (6): Last reviewed commit: "fix: Add missing virtual keyword to dest..." | Re-trigger Greptile
1c9931f to
37bcbc7
Compare
Skyaero42
reviewed
Mar 12, 2026
Generals/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DScene.h
Outdated
Show resolved
Hide resolved
…des in GameEngineDevice
…s in GameEngineDevice
… GameEngineDevice
…evice abstract classes
…n GameEngineDevice
47bfd7e to
52c92bf
Compare
xezon
reviewed
Mar 24, 2026
Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/Shadow/W3DVolumetricShadow.cpp
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
overridekeyword to virtual function overrides in GameEngineDeviceContext
Part 5/6 of splitting #2101. Depends on #2389 merging first.
Notes
overridekeyword additionsoverridefrom methods without matching virtual base classvirtualkeyword