NavigationServer: Restore constness for thread safe get_singleton

This was removed by mistake in #47024, NavigationServer uses internal
mutability for thread safety, and removing `const` breaks the contract.
This commit is contained in:
Rémi Verschelde
2022-01-05 15:34:47 +01:00
parent 2c7fcdd7f9
commit b23552922f
5 changed files with 8 additions and 8 deletions

View File

@@ -204,7 +204,7 @@ void NavigationServer2D::_bind_methods() {
NavigationServer2D::NavigationServer2D() {
singleton = this;
ERR_FAIL_COND_MSG(!NavigationServer3D::get_singleton(), "The Navigation3D singleton should be initialized before the 2D one.");
NavigationServer3D::get_singleton()->connect("map_changed", callable_mp(this, &NavigationServer2D::_emit_map_changed));
NavigationServer3D::get_singleton_mut()->connect("map_changed", callable_mp(this, &NavigationServer2D::_emit_map_changed));
}
NavigationServer2D::~NavigationServer2D() {