Page MenuHomeWildfire Games

Fix Vulkan warnings in Health.js
ClosedPublic

Authored by Stan on Jan 29 2019, 12:44 PM.

Details

Reviewers
Vulcan
elexis
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rP22075: Health.js cleanup. Fixes Vulkan complaints
Summary

Currently when you modify Health.js in another diff, you get a lot of error spam from vulkan, which is annoying.

Test Plan

Ought to be unproblematic

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

Stan created this revision.Jan 29 2019, 12:44 PM
Vulcan added a subscriber: Vulcan.Jan 29 2019, 12:46 PM

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

Link to build: https://jenkins.wildfiregames.com/job/differential/1014/

elexis accepted this revision.Jan 29 2019, 1:21 PM
elexis added a reviewer: Vulcan.
elexis added a subscriber: elexis.

Fix Vulkan warnings in Health.js

Vulcan should accept then.

Only checked for syntax styling completeness briefly, I suppose one could change every var to let, they're not so many and maybe not many merge conflicts resulting from this, and those that do result are easy to solve.

binaries/data/mods/public/simulation/components/Health.js
99 ↗(On Diff #7420)

good

114 ↗(On Diff #7420)

yes

225 ↗(On Diff #7420)

legit, because the first statement that would come after this fall-through would be the break statement

This revision is now accepted and ready to land.Jan 29 2019, 1:21 PM
Stan updated this revision to Diff 7427.Jan 29 2019, 4:32 PM

Change var to let.

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

Link to build: https://jenkins.wildfiregames.com/job/differential/1019/

Stan marked an inline comment as done.Jan 29 2019, 4:34 PM
Stan added a subscriber: Angen.
Stan added inline comments.
binaries/data/mods/public/simulation/components/Health.js
192 ↗(On Diff #7427)

See @Angen's patch: D1769

(Get it over with, you replaced the var/let correctly, the rest is accepted by me, and ask Vulcan for the rest. There are no changes that can break anything.)

binaries/data/mods/public/simulation/components/Health.js
278 ↗(On Diff #7427)

Actually I think if we change it to /** then the jsdoc connotation is that this comment relates to the next function (http://usejsdoc.org/about-block-inline-tags.html), but the intention of the comment is to speak about all functions below. (Technically there aren't any private functions either, all are publicly accessible. ) There's only @file in jsdoc that relates to everything, but I didn't find anything quickly that relates to some of the functions below.
So maybe leave it as is unless Vulcan gets a stroke.

This revision was automatically updated to reflect the committed changes.
Stan marked an inline comment as done.