From b23552922f012bc90e7ebd2dde26b46aacbbdddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 5 Jan 2022 15:34:47 +0100 Subject: 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. --- servers/navigation_server_2d.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'servers/navigation_server_2d.h') diff --git a/servers/navigation_server_2d.h b/servers/navigation_server_2d.h index 8ab479b8fd..2dd718e09c 100644 --- a/servers/navigation_server_2d.h +++ b/servers/navigation_server_2d.h @@ -52,7 +52,7 @@ protected: public: /// Thread safe, can be used across many threads. - static NavigationServer2D *get_singleton() { return singleton; } + static const NavigationServer2D *get_singleton() { return singleton; } /// MUST be used in single thread! static NavigationServer2D *get_singleton_mut() { return singleton; } -- cgit v1.2.3