Page MenuHomeWildfire Games

Refactor UpdateMessageSubscriptions in CCmpRangeOverlayRenderer
AcceptedPublic

Authored by Angen on Tue, Sep 15, 12:51 PM.

Details

Reviewers
bb
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Summary

rewrite 3 ifs to 1 if
merge 2 member variables into 1 member variable
remove 2 function local variables
save one call for CComponentManager as both ifs would or execute or not

code is shorter and looks nicer

Test Plan

confirm logic is the same

Diff Detail

Repository
rP 0 A.D. Public Repository
Branch
/ps/trunk
Lint
Lint OK
SeverityLocationCodeMessage
Errorsource/simulation2/components/CCmpRangeOverlayRenderer.cpp:45CPPCheckBear (unknownMacro)CPPCheckBear (unknownMacro)
Unit
No Unit Test Coverage
Build Status
Buildable 13182
Build 26250: Vulcan BuildJenkins
Build 26249: Vulcan Build (macOS)Jenkins
Build 26248: Vulcan Build (Windows)Jenkins
Build 26247: arc lint + arc unit

Event Timeline

Angen created this revision.Tue, Sep 15, 12:51 PM
Owners added a subscriber: Restricted Owners Package.Tue, Sep 15, 12:51 PM
Angen published this revision for review.Tue, Sep 15, 12:51 PM
Angen added a reviewer: Restricted Owners Package.

Successful build - Chance fights ever on the side of the prudent.

builderr-release-macos.txt
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libsimulation2.a(precompiled.o) has no symbols

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/1549/display/redirect

bb accepted this revision.Mon, Sep 21, 2:12 PM
bb added a subscriber: bb.

Digging back to D555, this code must be ccmpSelectable copy-pasta

Front doesn't fall

source/simulation2/components/CCmpRangeOverlayRenderer.cpp
1

Why didn't the linter work?

This revision is now accepted and ready to land.Mon, Sep 21, 2:12 PM
Angen added a subscriber: Itms.Mon, Sep 21, 2:16 PM
Angen added inline comments.
source/simulation2/components/CCmpRangeOverlayRenderer.cpp
1

ping @Itms