Adds a helper function to pick entities with a given component and a given filter on screen.
Reviewed By: wraitii
Commented By: Stan, elexis
Differential Revision: https://code.wildfiregames.com/D2207
Adds a helper function to pick entities with a given component and a given…
Description
Details
Event TimelineComment Actions Edit: without precompiled headers Cannot compile on clang 8.0.1: In file included from ../../../source/simulation2/helpers/Selection.cpp:20: ../../../source/simulation2/helpers/Selection.h:85:2: error: use of undeclared identifier 'PROFILE2' PROFILE2("GetEntitiesWithObstructionInRect"); ^ 1 error generated. make[1]: *** [simulation2.make:479: obj/simulation2_Release/Selection.o] Error 1 make: *** [Makefile:97: simulation2] Error 2 make: *** Waiting for unfinished jobs.... CChart.cpp CCheckBox.cpp In file included from ../../../source/tools/atlas/GameInterface/Handlers/ObjectHandlers.cpp:53: ../../../source/simulation2/helpers/Selection.h:85:2: error: use of undeclared identifier 'PROFILE2' PROFILE2("GetEntitiesWithObstructionInRect"); ^ 1 error generated. TerrainHandlers.cpp make[1]: *** [atlas.make:193: obj/atlas_Release/ObjectHandlers.o] Error 1 On gcc 9.1.0: In file included from ../../../source/simulation2/helpers/Selection.cpp:20: ../../../source/simulation2/helpers/Selection.h: In function ‘std::vector<unsigned int> EntitySelection::GetEntitiesWithComponentInRect(CSimulation2&, int, const CCamera&, int, int, int, int)’: ../../../source/simulation2/helpers/Selection.h:85:2: error: there are no arguments to ‘PROFILE2’ that depend on a template parameter, so a declaration of ‘PROFILE2’ must be available [-fpermissive] 85 | PROFILE2("GetEntitiesWithObstructionInRect"); | ^~~~~~~~ ../../../source/simulation2/helpers/Selection.h:85:2: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated) make[1]: *** [simulation2.make:479: obj/simulation2_Release/Selection.o] Error 1 make: *** [Makefile:97: simulation2] Error 2 make: *** Waiting for unfinished jobs.... CProgressBar.cpp In file included from ../../../source/tools/atlas/GameInterface/Handlers/ObjectHandlers.cpp:53: ../../../source/simulation2/helpers/Selection.h: In function ‘std::vector<unsigned int> EntitySelection::GetEntitiesWithComponentInRect(CSimulation2&, int, const CCamera&, int, int, int, int)’: ../../../source/simulation2/helpers/Selection.h:85:2: error: there are no arguments to ‘PROFILE2’ that depend on a template parameter, so a declaration of ‘PROFILE2’ must be available [-fpermissive] 85 | PROFILE2("GetEntitiesWithObstructionInRect"); | ^~~~~~~~ ../../../source/simulation2/helpers/Selection.h:85:2: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated) make[1]: *** [atlas.make:193: obj/atlas_Release/ObjectHandlers.o] Error 1 make: *** [Makefile:121: atlas] Error 2
|