-
Notifications
You must be signed in to change notification settings - Fork 189
refactor: Add override keyword to virtual function overrides in Core code (2) #2603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
6213687
058a119
b97e2cf
0cf01e8
09e8b99
4b2b9ce
d949582
5e6f6bb
4d41dbb
85da3b0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -161,13 +161,13 @@ Int LANGameInfo::getSlotNum( UnicodeString userName ) | |||||||||||||||||||||||||||||||||||||||||||||||||
| return -1; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| Bool LANGameInfo::amIHost() | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Bool LANGameInfo::amIHost() const | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this change behavior? Meaning a different function is called now?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like a bug to me, but without noticeable issues: CodeGeneralsGameCode/Core/GameEngine/Source/GameNetwork/GameInfo.cpp Lines 500 to 507 in efabb08
GeneralsGameCode/Core/GameEngine/Source/GameNetwork/GameInfo.cpp Lines 275 to 278 in efabb08
GeneralsGameCode/Core/GameEngine/Source/GameNetwork/LANGameInfo.cpp Lines 164 to 171 in efabb08
GeneralsGameCode/Core/GameEngine/Source/GameNetwork/LANGameInfo.cpp Lines 82 to 85 in efabb08
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| DEBUG_ASSERTCRASH(m_inGame, ("Looking for game slot while not in game")); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| if (!m_inGame) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| return false; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| return getLANSlot(0)->isLocalPlayer(); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| return getConstLANSlot(0)->isLocalPlayer(); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| void LANGameInfo::setMap( AsciiString mapName ) | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -105,7 +105,7 @@ class BaseHeightMapRenderObjClass : public RenderObjClass, public DX8_CleanupHoo | |
| ///////////////////////////////////////////////////////////////////////////// | ||
| virtual RenderObjClass * Clone() const override; | ||
| virtual int Class_ID() const override; | ||
| virtual void Render(RenderInfoClass & rinfo) = 0; | ||
| virtual void Render(RenderInfoClass & rinfo) override = 0; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What happens if this is omitted?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nothing. It's just to acknowledge that the base class also has this exact function, but it's not pure virtual. If that were removed that would lead to a compilation error here, which seems desirable. |
||
| virtual bool Cast_Ray(RayCollisionTestClass & raytest) override; // This CANNOT be Bool, as it will not inherit properly if you make Bool == Int | ||
| virtual void Get_Obj_Space_Bounding_Sphere(SphereClass & sphere) const override; | ||
| virtual void Get_Obj_Space_Bounding_Box(AABoxClass & aabox) const override; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if this was removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing. It's just to acknowledge that the base class also has this exact function, but it's not pure virtual. If that were removed that would lead to a compilation error here, which seems desirable.