Jiaoyang-Li / MAPF-LNS

Anytime Multi-Agent Path Finding via Large-Neighborhood Search
Other
53 stars 15 forks source link

Fix access specifiers between CBS.h/ECBS.h #3

Open justinokamoto opened 3 weeks ago

justinokamoto commented 3 weeks ago

Calling terminate() on ECBS object caused a segfault because terminate() is implemented by the base class CBS. This method called printPaths() (from the base implementation) which caused the segfault since the member variable paths_found_initially from the base implementation was empty.

To make matters confusing, the base class had a protected variable paths_found_initially but the subclass "shadows" this variable by defining a private variable with the same name (paths_found_initially) but a different type.

This change updates access specifiers to align with usage and prevent segfault when CBS::terminate() is called from a subclass.

Fixes #2