1
0
forked from 0ad/0ad
0ad/source/simulation2/components
Yves 1a66f510d0 Use const T& for parameters of some types in script-exposed native functions
Using references matches the C++ coding style better and should improve
performance a bit in theory. It avoids 2 copies of T in case of the
functions registered with RegisterFunction (mainy used in the GUI). It
should also avoid one or two copies in case of
DEFINE_INTERFACE_METHOD_X, which is used in the simulation, but I
haven't bothered to count it there exactly.
It is now predefined which types have to be passed by const reference
and which are passed by value. Note that references can't be used as
out-parameters (to return multiple values to JS). This hasn't worked
before either and probably never will.

This was SVN commit r17696.
2016-01-23 15:17:56 +00:00
..
tests Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
CCmpAIManager.cpp Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
CCmpCinemaManager.cpp Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
CCmpCommandQueue.cpp SpiderMonkey 31 upgrade 2015-01-24 14:46:52 +00:00
CCmpDecay.cpp Improve template code style for the Decay component. 2015-01-21 21:45:05 +00:00
CCmpFootprint.cpp Implements relative templates. Fixes #2936. Thanks to leper, wraitii, historicbruno and everyone else that helped. 2015-12-05 17:02:25 +00:00
CCmpMinimap.cpp Fixes inconsistencies in spelling of colour/color by preferring "color" (only wxWidgets remains with some API that requires "colour"), fixes #1029. 2015-03-15 23:59:48 +00:00
CCmpMotionBall.cpp Avoid slightly-expensive QueryInterface() calls 2013-09-11 20:41:53 +00:00
CCmpObstruction.cpp Style cleanup, and remove a wrong TODO. 2015-09-02 17:40:31 +00:00
CCmpObstructionManager.cpp The over-rasterization of obstructions introduced in [17161] could in very rare cases lead to an OOS in the passability grid. Fixes #3612. 2015-11-16 22:03:10 +00:00
CCmpOverlayRenderer.cpp Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
CCmpOwnership.cpp Added a 'quiet' version of SetOwner() that doesn't send a message, to allow faux-atomic batch ownership changes. 2012-08-08 05:18:20 +00:00
CCmpParticleManager.cpp Set svn:eol-style=native, fix some inconsistent line endings 2013-12-06 00:42:50 +00:00
CCmpPathfinder_Common.h The over-rasterization of obstructions introduced in [17161] could in very rare cases lead to an OOS in the passability grid. Fixes #3612. 2015-11-16 22:03:10 +00:00
CCmpPathfinder_Vertex.cpp Styling fixes. 2015-11-12 17:23:50 +00:00
CCmpPathfinder.cpp Fix style issues and redundant code in [17161] and [17163]. 2015-11-06 19:48:08 +00:00
CCmpPosition.cpp Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
CCmpProjectileManager.cpp Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
CCmpRallyPointRenderer.cpp Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
CCmpRangeManager.cpp Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
CCmpSelectable.cpp Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
CCmpSoundManager.cpp Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
CCmpTemplateManager.cpp Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
CCmpTerrain.cpp Adapt Atlas to the new pathfinder. Fixes #3298 2015-06-29 19:59:41 +00:00
CCmpTerritoryInfluence.cpp Fix the territory influence weight to fit into an u16 number. (no idea why the buildings have so many different weights though). 2015-05-26 14:25:23 +00:00
CCmpTerritoryManager.cpp Cinematic camera core functionality. Patch by Vladislav Belov. 2016-01-03 12:41:04 +00:00
CCmpTest.cpp Simplify component interface: remove explicit context parameter, use GetSimContext() instead. 2011-01-16 14:08:38 +00:00
CCmpUnitMotion.cpp Fix a typo. Thanks stan for noticing. 2015-11-14 21:46:05 +00:00
CCmpUnitRenderer.cpp Optimization of isBoxVisible + cleanup, fixes #3712 2015-12-28 16:27:31 +00:00
CCmpVision.cpp Make the Ptolemaic lighthouse reveal the shore on the entire map. 2015-05-06 18:47:02 +00:00
CCmpVisualActor.cpp Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
CCmpWaterManager.cpp Remove a useless global terrain update when modifying environment settings in Atlas. 2015-07-14 17:08:02 +00:00
ICmpAIInterface.cpp SpiderMonkey 31 upgrade 2015-01-24 14:46:52 +00:00
ICmpAIInterface.h SpiderMonkey 31 upgrade 2015-01-24 14:46:52 +00:00
ICmpAIManager.cpp SpiderMonkey 31 upgrade 2015-01-24 14:46:52 +00:00
ICmpAIManager.h Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
ICmpCinemaManager.cpp Cinematic camera core functionality. Patch by Vladislav Belov. 2016-01-03 12:41:04 +00:00
ICmpCinemaManager.h Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
ICmpCommandQueue.cpp SpiderMonkey 31 upgrade 2015-01-24 14:46:52 +00:00
ICmpCommandQueue.h SpiderMonkey 31 upgrade 2015-01-24 14:46:52 +00:00
ICmpDecay.cpp # Add corpse decay and building collapse. 2010-08-01 17:38:01 +00:00
ICmpDecay.h # Add corpse decay and building collapse. 2010-08-01 17:38:01 +00:00
ICmpFogging.cpp Reduce drastically the number of mirages by making fogging conditional: entities will be miraged only if their health/resource amount is modified, or if they have a non-gaia owner. 2015-02-07 15:48:32 +00:00
ICmpFogging.h Reduce drastically the number of mirages by making fogging conditional: entities will be miraged only if their health/resource amount is modified, or if they have a non-gaia owner. 2015-02-07 15:48:32 +00:00
ICmpFootprint.cpp SpiderMonkey 31 upgrade 2015-01-24 14:46:52 +00:00
ICmpFootprint.h SpiderMonkey 31 upgrade 2015-01-24 14:46:52 +00:00
ICmpGuiInterface.cpp SpiderMonkey 31 upgrade 2015-01-24 14:46:52 +00:00
ICmpGuiInterface.h SpiderMonkey 31 upgrade 2015-01-24 14:46:52 +00:00
ICmpIdentity.cpp Missing files 2011-05-05 20:07:51 +00:00
ICmpIdentity.h Missing files 2011-05-05 20:07:51 +00:00
ICmpMinimap.cpp # Display units on the minimap 2010-04-23 18:36:48 +00:00
ICmpMinimap.h Fixes inconsistencies in spelling of colour/color by preferring "color" (only wxWidgets remains with some API that requires "colour"), fixes #1029. 2015-03-15 23:59:48 +00:00
ICmpMirage.cpp Hide changes to buildings in the fog-of-war. 2014-08-04 22:49:19 +00:00
ICmpMirage.h Hide changes to buildings in the fog-of-war. 2014-08-04 22:49:19 +00:00
ICmpMotion.cpp # Rewrite of the game's simulation system 2010-01-09 19:20:14 +00:00
ICmpMotion.h # Rewrite of the game's simulation system 2010-01-09 19:20:14 +00:00
ICmpObstruction.cpp Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
ICmpObstruction.h Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
ICmpObstructionManager.cpp Stop units walking outside the edges of circular maps. 2010-10-30 18:25:34 +00:00
ICmpObstructionManager.h Fix a rare case where units might get stuck around other idle entities, and clarify a related comment. 2015-11-11 12:28:38 +00:00
ICmpOverlayRenderer.cpp Cinematic camera core functionality. Patch by Vladislav Belov. 2016-01-03 12:41:04 +00:00
ICmpOverlayRenderer.h Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
ICmpOwnership.cpp Added a 'quiet' version of SetOwner() that doesn't send a message, to allow faux-atomic batch ownership changes. 2012-08-08 05:18:20 +00:00
ICmpOwnership.h Added a 'quiet' version of SetOwner() that doesn't send a message, to allow faux-atomic batch ownership changes. 2012-08-08 05:18:20 +00:00
ICmpParticleManager.cpp Set svn:eol-style=native, fix some inconsistent line endings 2013-12-06 00:42:50 +00:00
ICmpParticleManager.h Set svn:eol-style=native, fix some inconsistent line endings 2013-12-06 00:42:50 +00:00
ICmpPathfinder.cpp New long-range pathfinder. 2015-06-12 18:58:24 +00:00
ICmpPathfinder.h Code improvements and style fixes. 2015-10-03 08:27:19 +00:00
ICmpPlayer.cpp Fixes inconsistencies in spelling of colour/color by preferring "color" (only wxWidgets remains with some API that requires "colour"), fixes #1029. 2015-03-15 23:59:48 +00:00
ICmpPlayer.h Fixes inconsistencies in spelling of colour/color by preferring "color" (only wxWidgets remains with some API that requires "colour"), fixes #1029. 2015-03-15 23:59:48 +00:00
ICmpPlayerManager.cpp # Add new renderer mode based on GL_ARB_fragment_program. 2011-03-26 20:17:21 +00:00
ICmpPlayerManager.h # Add new renderer mode based on GL_ARB_fragment_program. 2011-03-26 20:17:21 +00:00
ICmpPosition.cpp New unit renderer. 2014-06-01 18:24:50 +00:00
ICmpPosition.h Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
ICmpProjectileManager.cpp Added randomized arrow positions with hit detection when the missile lands and splash damage. Fixes #18. 2012-05-19 23:07:41 +00:00
ICmpProjectileManager.h Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
ICmpRallyPointRenderer.cpp Recompute rally point lines when the rally point is set on a moving unit. 2014-06-04 22:07:58 +00:00
ICmpRallyPointRenderer.h Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
ICmpRangeManager.cpp Show status-bars of all players to observers, fixes #3215. 2016-01-10 16:47:57 +00:00
ICmpRangeManager.h Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
ICmpSelectable.cpp Cinematic camera core functionality. Patch by Vladislav Belov. 2016-01-03 12:41:04 +00:00
ICmpSelectable.h Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
ICmpSettlement.cpp # Initial support for territories 2011-07-20 19:48:06 +00:00
ICmpSettlement.h # Initial support for territories 2011-07-20 19:48:06 +00:00
ICmpSoundManager.cpp Stop music when resetting the simulation test mode in Atlas. 2014-09-12 21:38:10 +00:00
ICmpSoundManager.h Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
ICmpTechnologyTemplateManager.cpp SpiderMonkey 31 upgrade 2015-01-24 14:46:52 +00:00
ICmpTechnologyTemplateManager.h SpiderMonkey 31 upgrade 2015-01-24 14:46:52 +00:00
ICmpTemplateManager.cpp Clean up LoadPlayerSettings. 2015-01-01 23:10:24 +00:00
ICmpTemplateManager.h Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
ICmpTerrain.cpp Summon planes back from the emptyness 2013-11-26 15:12:16 +00:00
ICmpTerrain.h Fix an issue with corruption of water data when the actor editor opened in Atlas. 2014-02-25 06:27:15 +00:00
ICmpTerritoryInfluence.cpp # Initial support for territories 2011-07-20 19:48:06 +00:00
ICmpTerritoryInfluence.h Implement methods to find the neighbour of a certain territory, and use it for territory decay. Fixes #3204 2015-05-25 14:17:45 +00:00
ICmpTerritoryManager.cpp Add ability to query the map control percentage, and use this value in the summary screen. Patch by s0600204, fixes #3321 2015-08-23 17:44:37 +00:00
ICmpTerritoryManager.h Cinematic camera core functionality. Patch by Vladislav Belov. 2016-01-03 12:41:04 +00:00
ICmpTest.cpp # Rewrite of the game's simulation system 2010-01-09 19:20:14 +00:00
ICmpTest.h # Rewrite of the game's simulation system 2010-01-09 19:20:14 +00:00
ICmpUnitMotion.cpp Reenable formations and fix/improve the communication between UnitAI and UnitMotion. With the new pathfinder some path requests can be completed instantaneously, so UnitAI has to handle MoveStarted messages even in the IDLE state. 2015-09-17 16:31:23 +00:00
ICmpUnitMotion.h Reenable formations and fix/improve the communication between UnitAI and UnitMotion. With the new pathfinder some path requests can be completed instantaneously, so UnitAI has to handle MoveStarted messages even in the IDLE state. 2015-09-17 16:31:23 +00:00
ICmpUnitRenderer.cpp New unit renderer. 2014-06-01 18:24:50 +00:00
ICmpUnitRenderer.h Improve PickEntitiesAtPoint 2015-01-01 23:05:26 +00:00
ICmpUnknownScript.cpp # Added initial support for players and population counters in new simulation system, plus various infrastructure improvements. 2010-01-22 20:03:14 +00:00
ICmpUnknownScript.h # Added initial support for players and population counters in new simulation system, plus various infrastructure improvements. 2010-01-22 20:03:14 +00:00
ICmpValueModificationManager.cpp Make the actor tech-modifiable. Fixes #2243 2014-04-14 15:00:49 +00:00
ICmpValueModificationManager.h Make the actor tech-modifiable. Fixes #2243 2014-04-14 15:00:49 +00:00
ICmpVisibility.cpp Fix c229b46ac2. 2015-02-16 14:38:13 +00:00
ICmpVisibility.h Fix c229b46ac2. 2015-02-16 14:38:13 +00:00
ICmpVision.cpp Move template items GetRetainInFog and AlwaysVisible from Vision to Visibility. 2014-12-05 18:33:59 +00:00
ICmpVision.h Move template items GetRetainInFog and AlwaysVisible from Vision to Visibility. 2014-12-05 18:33:59 +00:00
ICmpVisual.cpp Fixes inconsistencies in spelling of colour/color by preferring "color" (only wxWidgets remains with some API that requires "colour"), fixes #1029. 2015-03-15 23:59:48 +00:00
ICmpVisual.h Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
ICmpWaterManager.cpp Substantial speed-up of the foam generation code. 2014-01-05 16:15:20 +00:00
ICmpWaterManager.h Substantial speed-up of the foam generation code. 2014-01-05 16:15:20 +00:00