m_Terrain->CalcPosition was called 12 times in that method but we just need 4 different calls.
Edit:
It's called just 6 times
Differential D2811
Remove duplicated call in void TerrainOverlay::RenderTile vinhig on Jun 12 2020, 4:29 PM. Authored by
Details
m_Terrain->CalcPosition was called 12 times in that method but we just need 4 different calls. Edit: Start Atlas editor and use the brush to modify terrain. If it doesn't crash and if 9 wonderful green squares are shown, it means that my little modfications work well :) Need someone to PROFILE2 this, I didn't manage to have it working...
Diff Detail
Event TimelineComment Actions Successful build - Chance fights ever on the side of the prudent. Linter detected issues: Executing section Source... source/renderer/TerrainOverlay.cpp | 1| /*·Copyright·(C)·2019·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2020" year instead of "2019" Executing section JS... Executing section cli... Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2405/display/redirect Comment Actions I forgot to add vinhig as a contributor and to change the date at the beginning of the file. Comment Actions Thanks and congratulations on your first patch :) It's a little frustrating that this 0-initialises the 4 vectors as CalcPosition takes the actors by argument, but the cost of 3 new 0-initialisations is very likely more than compensated by the 2 fewer calls to CalcPosition. I would suggest using pos_i0_j0 and pos_i1_j1 instead of ip1 as that makes them the same length and it's probably more readable. I also don't think you really need the 'precompute positions' comment.
Comment Actions Looks good, straightforward change. Feel free to update the diff with the inline cleanups, otherwise I'll do it when committing.
|