The IGUITextOwner is the same GUIObject that should own the text, literally. Therefore this argument is always this, so it can be this inside of the function call.
Details
- Reviewers
- None
- Commits
- rP23009: Remove redundant IGUITextOwner::AddText IGUIObject/this argument.
Notice that one might consider removing the IGUIObject reference from CGUIText, but that this would be more involved cleanup, whereas this diff is a preparation for D2325 (amongst D2332).
See that the code is equivalent and measurably less complex (less nr of arguments) and less prone to passing the wrong object.
Notice that the other arguments like Font and BufferZone are not defined in the IGUITextOwner but the derived class such as CText, hence this is the only argument that can be removed this way here.
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/856/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/340/display/redirect