1
0
forked from 0ad/0ad
0ad/source
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
..
collada Cinematic camera core functionality. Patch by Vladislav Belov. 2016-01-03 12:41:04 +00:00
graphics Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
gui Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
i18n Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
lib Updates precompiled win32 SDL libs to 2.0.4 from libsdl.org. 2016-01-17 23:11:37 +00:00
lobby Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
maths Cinematic camera core functionality. Patch by Vladislav Belov. 2016-01-03 12:41:04 +00:00
mocks More FreeBSD build fixes. 2012-01-30 06:21:11 +00:00
network Deep freeze simulation commands to prevent accidental updates. Fixes #3647. 2016-01-18 22:24:50 +00:00
pch Switch to std::shared_ptr and std::weak_ptr. 2015-01-25 03:10:58 +00:00
ps Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
renderer Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
scriptinterface Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
simulation2 Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
soundmanager Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00
third_party Update tinygettext. 2015-12-08 18:05:11 +00:00
tools Don't create replays without commands in case of running non-visual replay or an atlas simulation. 2016-01-23 01:02:57 +00:00
main.cpp Add version command line option. Fixes #2965. 2016-01-08 19:35:33 +00:00
test_setup.cpp Use const T& for parameters of some types in script-exposed native functions 2016-01-23 15:17:56 +00:00