Draft: Integrate MantleAPI v12
- Reimplement deleted Mocks that return other mocks on e.g. GetEntityRepository() in test/TestUtils.h as Fake classes
- Replace mocks with fake classes in tests
- fix wrong usage of (local) LaneIds and (global) UniqueId for lanes in LateralDistanceAction and ConvertScenarioAbsoluteTargetLaneTest
- adjust to new getter for entities (weak ptr instead of optional reference wrapper)
- entities in the repo are now shared ptr instead of unique ptrs (for tests)
- adjust to new route handling (removed AssignRoute(), add Create() in route repository and SetRoute() in entity)
- adjust to renaming of members in route definition
- adjust to redefinition of polynomial in SplineSection (struct instead of tuple)
- fix namespace for MockStatistics
Merge request reports
Activity
added Community Contribution label
assigned to @arauschert
added 5 commits
-
a1a19010...fdfbb280 - 2 commits from branch
main
- a034def7 - Integrate MantleAPI v12
- f1051f11 - Try fix Windows build
- 60371aec - Fix after rebase to main
Toggle commit list-
a1a19010...fdfbb280 - 2 commits from branch
requested review from @anastasiiavolkova
requested review from @rparisha2
- Resolved by René Paris
- Resolved by René Paris
added 2 commits
reset approvals from @anastasiiavolkova by pushing to the branch
193 193 mantle_api::IEntity& EntityUtils::GetEntityByName(const std::shared_ptr<mantle_api::IEnvironment>& environment, This is dangerous. You create a temporary shared_pointer named
entity
from locking the given weak_ptr. Then you return the dereferenced pointer to this pointer. Directly after the returnentity
will get out of scope and with it the lock, so nobody prevents the memory management to wipe out the actual entity. So you end up with a dangling reference somewhen after calling "GetEntityByName". The only chance to prevent this in this architecture is to return the shared pointer itself.changed this line in version 8 of the diff
added 1 commit
- 6c2d069e - Change return type of GetEntityByName to shared_ptr