Courtesy of @wraitii.
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Branch
- /ps/trunk
- Lint
Lint OK - Unit
No Unit Test Coverage - Build Status
Buildable 12809 Build 25025: Vulcan Build Jenkins Build 25024: Vulcan Build (macOS) Jenkins Build 25023: Vulcan Build (Windows) Jenkins Build 25022: arc lint + arc unit
Event Timeline
ModIo.cpp ../../../source/ps/ModIo.cpp:575:0: warning: "FAIL" redefined #define FAIL(...) STMT(err = fmt::sprintf(__VA_ARGS__); CLEANUP(); return false;) In file included from ../../../source/ps/ModIo.cpp:38:0: ../../../source/scriptinterface/ScriptConversions.h:112:0: note: this is the location of the previous definition #define FAIL(msg) STMT(JS_ReportError(cx, msg); return false)
All of this diff is magic to me, so please @Itms or @wraitii (or anyone knowledgeable) commandeer ^^'
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2933/display/redirect
source/scriptinterface/ScriptConversions.h | ||
---|---|---|
138 |
source/scriptinterface/ScriptConversions.h | ||
---|---|---|
138 | I can do that :) |
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2935/display/redirect
I don't see any strong reason to use std::unordered_map on the C++ side. It costs memory, some performance. The patch seems overhead, you might pass turrets through a list.
I use the map for D2814 too. That being said, you might argue that a vector of something is better for performance... Might be correct.
I haven't reviewed your patch precisely. But about turrets it's overhead. Nobody uses search in that map.