1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-22 22:13:35 +02:00
vcmi/test
Ivan Savenko 3dd4fa2528 Reduce usage of pointers to VLC entities
Final goal (of multiple PR's) is to remove all remaining pointers from
serializeable game state, and replace them with either identifiers or
with shared/unique pointers.

CGTownInstance::town and CGHeroInstance::type members have been removed.
Now this data is computed dynamically using subID member.

VLC entity of a town can now be accessed via following methods:
- getFactionID() returns ID of a faction
- getFaction() returns pointer to a faction
- getTown() returns pointer to a town

VLC entity of a hero can now be accessed via following methods:
- getHeroTypeID() returns ID of a hero
- getHeroClassID() returns ID of a hero class
- getHeroType() returns pointer to a hero
- getHeroClass() returns pointer to a hero class
2024-10-10 12:28:08 +00:00
..
battle remove never used code in CBonusSystemNode 2024-08-25 14:15:21 +02:00
entity Reduce usage of pointers to VLC entities 2024-10-10 12:28:08 +00:00
erm Fix typos using https://github.com/crate-ci/typos 2024-06-24 03:47:19 +02:00
events Replace redundant types with auto for the lvalues of template factory functions for smart pointers 2024-01-17 12:50:00 +00:00
game Replace pointer with reference in pack apply functions 2024-10-07 14:59:46 +00:00
googletest@b514bdc898 Update googletest submodule 2024-08-02 15:09:48 +00:00
map Fix test 2024-07-19 12:17:06 +00:00
mock Reduce usage of pointers to VLC entities 2024-10-10 12:28:08 +00:00
netpacks Remove test for no longer existing logic 2024-06-01 12:18:09 +00:00
rmg Replace redundant types with auto for the lvalues of template factory functions for smart pointers 2024-01-17 12:50:00 +00:00
scripting Fix scripting build 2024-10-07 15:14:03 +00:00
serializer vcmi: use std::optional 2023-04-17 00:43:13 +03:00
spells Replace pointer with reference in pack apply functions 2024-10-07 14:59:46 +00:00
testdata Fix typos using https://github.com/crate-ci/typos 2024-06-24 03:47:19 +02:00
vcai Fix typos using https://github.com/crate-ci/typos 2024-06-24 03:47:19 +02:00
CMakeLists.txt Remove test for no longer existing logic 2024-06-01 12:18:09 +00:00
CMemoryBufferTest.cpp Migrating from boost test to google test. 2017-07-18 16:49:05 +02:00
CVcmiTestConfig.cpp tests: disable settings.init() 2023-04-27 20:59:55 +03:00
CVcmiTestConfig.h Remove redundant virtual specifiers 2024-02-10 20:46:13 +01:00
JsonComparer.cpp Rename toJson to toString/toCompactString for consistency 2024-02-26 12:55:49 +02:00
JsonComparer.h Moved json files to new directory, split on per-class basis 2024-02-14 13:08:24 +02:00
main.cpp CMake: unittest improvements (#447) 2018-04-15 18:02:31 +07:00
StdInc.cpp convert line endings from CRLF (Windows) to LF (Linux/Unix) 2023-10-19 16:23:21 +02:00
StdInc.h convert line endings from CRLF (Windows) to LF (Linux/Unix) 2023-10-19 16:23:21 +02:00