1
0
forked from 0ad/0ad
0ad/source
wraitii 1b67a079fb Reduce duplication in JSI GUI objects implementation.
- Store the functions in an unordered_map. A no-container implementation
is doable but likely not worth the added code complexity, maybe with
C++20
- Move more things into the _impl.h
- Clear out the un-necessary friends declaration in the specific types
by moving the functions to the public interface, which makes sense.
- Fix a memory leak (JS::PersistentRootedObject weren't deleted).

This doesn't change what one needs to do to add a new type, but it does
reduce the actual code that's necessary, and makes it less error prone.

Differential Revision: https://code.wildfiregames.com/D3214
This was SVN commit r24384.
2020-12-13 15:06:18 +00:00
..
collada Fix compiler warnings on VS 2015, refs #3439, refs #5069. 2018-03-10 09:58:53 +00:00
graphics Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
gui Reduce duplication in JSI GUI objects implementation. 2020-12-13 15:06:18 +00:00
i18n Update ICU on Windows to 68.1 with the v140_xp toolset. 2020-12-02 16:47:28 +00:00
lib Fix non-visual replay on Windows. Use the actual detected resolution. 2020-12-12 08:18:24 +00:00
lobby Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
maths Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
mocks More FreeBSD build fixes. 2012-01-30 06:21:11 +00:00
network Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
pch Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
ps Fix non-visual replay on Windows. Use the actual detected resolution. 2020-12-12 08:18:24 +00:00
renderer Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
rlinterface Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
scriptinterface Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
simulation2 Allow boolean and u16 modifications for C++ 2020-12-11 14:07:48 +00:00
soundmanager Improve sound attenuation so that zooming out actually reduce the sound level. 2020-12-13 00:04:17 +00:00
third_party Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
tools Associate .zip and .pyromod files with 0 A.D. on MacOS 2020-12-11 15:43:25 +00:00
main.cpp Associate .zip and .pyromod files with 0 A.D. on MacOS 2020-12-11 15:43:25 +00:00
test_setup.cpp Fix non-visual replay on Windows. Use the actual detected resolution. 2020-12-12 08:18:24 +00:00