Sfoglia il codice sorgente

Merge pull request #108516 from KoBeWi/file_graveyard

Remove unnecessary cpp files after cleanup
Thaddeus Crews 1 mese fa
parent
commit
c6fe923e33

+ 0 - 38
core/templates/command_queue_mt.cpp

@@ -1,38 +0,0 @@
-/**************************************************************************/
-/*  command_queue_mt.cpp                                                  */
-/**************************************************************************/
-/*                         This file is part of:                          */
-/*                             GODOT ENGINE                               */
-/*                        https://godotengine.org                         */
-/**************************************************************************/
-/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */
-/*                                                                        */
-/* Permission is hereby granted, free of charge, to any person obtaining  */
-/* a copy of this software and associated documentation files (the        */
-/* "Software"), to deal in the Software without restriction, including    */
-/* without limitation the rights to use, copy, modify, merge, publish,    */
-/* distribute, sublicense, and/or sell copies of the Software, and to     */
-/* permit persons to whom the Software is furnished to do so, subject to  */
-/* the following conditions:                                              */
-/*                                                                        */
-/* The above copyright notice and this permission notice shall be         */
-/* included in all copies or substantial portions of the Software.        */
-/*                                                                        */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,        */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF     */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY   */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,   */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
-/**************************************************************************/
-
-#include "command_queue_mt.h"
-
-CommandQueueMT::CommandQueueMT() {
-	command_mem.reserve(DEFAULT_COMMAND_MEM_SIZE_KB * 1024);
-}
-
-CommandQueueMT::~CommandQueueMT() {
-}

+ 3 - 2
core/templates/command_queue_mt.h

@@ -252,6 +252,7 @@ public:
 		pump_task_id = p_task_id;
 	}
 
-	CommandQueueMT();
-	~CommandQueueMT();
+	CommandQueueMT() {
+		command_mem.reserve(DEFAULT_COMMAND_MEM_SIZE_KB * 1024);
+	}
 };

+ 0 - 33
core/templates/rid_owner.cpp

@@ -1,33 +0,0 @@
-/**************************************************************************/
-/*  rid_owner.cpp                                                         */
-/**************************************************************************/
-/*                         This file is part of:                          */
-/*                             GODOT ENGINE                               */
-/*                        https://godotengine.org                         */
-/**************************************************************************/
-/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */
-/*                                                                        */
-/* Permission is hereby granted, free of charge, to any person obtaining  */
-/* a copy of this software and associated documentation files (the        */
-/* "Software"), to deal in the Software without restriction, including    */
-/* without limitation the rights to use, copy, modify, merge, publish,    */
-/* distribute, sublicense, and/or sell copies of the Software, and to     */
-/* permit persons to whom the Software is furnished to do so, subject to  */
-/* the following conditions:                                              */
-/*                                                                        */
-/* The above copyright notice and this permission notice shall be         */
-/* included in all copies or substantial portions of the Software.        */
-/*                                                                        */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,        */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF     */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY   */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,   */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
-/**************************************************************************/
-
-#include "rid_owner.h"
-
-SafeNumeric<uint64_t> RID_AllocBase::base_id{ 1 };

+ 1 - 1
core/templates/rid_owner.h

@@ -75,7 +75,7 @@
 #endif
 
 class RID_AllocBase {
-	static SafeNumeric<uint64_t> base_id;
+	static inline SafeNumeric<uint64_t> base_id{ 1 };
 
 protected:
 	static RID _make_from_id(uint64_t p_id) {

+ 0 - 36
modules/godot_physics_2d/godot_broad_phase_2d.cpp

@@ -1,36 +0,0 @@
-/**************************************************************************/
-/*  godot_broad_phase_2d.cpp                                              */
-/**************************************************************************/
-/*                         This file is part of:                          */
-/*                             GODOT ENGINE                               */
-/*                        https://godotengine.org                         */
-/**************************************************************************/
-/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */
-/*                                                                        */
-/* Permission is hereby granted, free of charge, to any person obtaining  */
-/* a copy of this software and associated documentation files (the        */
-/* "Software"), to deal in the Software without restriction, including    */
-/* without limitation the rights to use, copy, modify, merge, publish,    */
-/* distribute, sublicense, and/or sell copies of the Software, and to     */
-/* permit persons to whom the Software is furnished to do so, subject to  */
-/* the following conditions:                                              */
-/*                                                                        */
-/* The above copyright notice and this permission notice shall be         */
-/* included in all copies or substantial portions of the Software.        */
-/*                                                                        */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,        */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF     */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY   */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,   */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
-/**************************************************************************/
-
-#include "godot_broad_phase_2d.h"
-
-GodotBroadPhase2D::CreateFunction GodotBroadPhase2D::create_func = nullptr;
-
-GodotBroadPhase2D::~GodotBroadPhase2D() {
-}

+ 2 - 2
modules/godot_physics_2d/godot_broad_phase_2d.h

@@ -39,7 +39,7 @@ class GodotBroadPhase2D {
 public:
 	typedef GodotBroadPhase2D *(*CreateFunction)();
 
-	static CreateFunction create_func;
+	static inline CreateFunction create_func = nullptr;
 
 	typedef uint32_t ID;
 
@@ -64,5 +64,5 @@ public:
 
 	virtual void update() = 0;
 
-	virtual ~GodotBroadPhase2D();
+	virtual ~GodotBroadPhase2D() {}
 };

+ 0 - 36
modules/godot_physics_3d/godot_broad_phase_3d.cpp

@@ -1,36 +0,0 @@
-/**************************************************************************/
-/*  godot_broad_phase_3d.cpp                                              */
-/**************************************************************************/
-/*                         This file is part of:                          */
-/*                             GODOT ENGINE                               */
-/*                        https://godotengine.org                         */
-/**************************************************************************/
-/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */
-/*                                                                        */
-/* Permission is hereby granted, free of charge, to any person obtaining  */
-/* a copy of this software and associated documentation files (the        */
-/* "Software"), to deal in the Software without restriction, including    */
-/* without limitation the rights to use, copy, modify, merge, publish,    */
-/* distribute, sublicense, and/or sell copies of the Software, and to     */
-/* permit persons to whom the Software is furnished to do so, subject to  */
-/* the following conditions:                                              */
-/*                                                                        */
-/* The above copyright notice and this permission notice shall be         */
-/* included in all copies or substantial portions of the Software.        */
-/*                                                                        */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,        */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF     */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY   */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,   */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
-/**************************************************************************/
-
-#include "godot_broad_phase_3d.h"
-
-GodotBroadPhase3D::CreateFunction GodotBroadPhase3D::create_func = nullptr;
-
-GodotBroadPhase3D::~GodotBroadPhase3D() {
-}

+ 2 - 2
modules/godot_physics_3d/godot_broad_phase_3d.h

@@ -39,7 +39,7 @@ class GodotBroadPhase3D {
 public:
 	typedef GodotBroadPhase3D *(*CreateFunction)();
 
-	static CreateFunction create_func;
+	static inline CreateFunction create_func = nullptr;
 
 	typedef uint32_t ID;
 
@@ -65,5 +65,5 @@ public:
 
 	virtual void update() = 0;
 
-	virtual ~GodotBroadPhase3D();
+	virtual ~GodotBroadPhase3D() {}
 };

+ 0 - 2
platform/web/SCsub

@@ -27,8 +27,6 @@ web_files = [
     "http_client_web.cpp",
     "javascript_bridge_singleton.cpp",
     "web_main.cpp",
-    "ip_web.cpp",
-    "net_socket_web.cpp",
     "os_web.cpp",
 ]
 

+ 0 - 48
platform/web/ip_web.cpp

@@ -1,48 +0,0 @@
-/**************************************************************************/
-/*  ip_web.cpp                                                            */
-/**************************************************************************/
-/*                         This file is part of:                          */
-/*                             GODOT ENGINE                               */
-/*                        https://godotengine.org                         */
-/**************************************************************************/
-/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */
-/*                                                                        */
-/* Permission is hereby granted, free of charge, to any person obtaining  */
-/* a copy of this software and associated documentation files (the        */
-/* "Software"), to deal in the Software without restriction, including    */
-/* without limitation the rights to use, copy, modify, merge, publish,    */
-/* distribute, sublicense, and/or sell copies of the Software, and to     */
-/* permit persons to whom the Software is furnished to do so, subject to  */
-/* the following conditions:                                              */
-/*                                                                        */
-/* The above copyright notice and this permission notice shall be         */
-/* included in all copies or substantial portions of the Software.        */
-/*                                                                        */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,        */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF     */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY   */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,   */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
-/**************************************************************************/
-
-#include "ip_web.h"
-
-void IPWeb::_resolve_hostname(List<IPAddress> &r_addresses, const String &p_hostname, Type p_type) const {
-}
-
-void IPWeb::get_local_interfaces(HashMap<String, Interface_Info> *r_interfaces) const {
-}
-
-void IPWeb::make_default() {
-	_create = _create_web;
-}
-
-IP *IPWeb::_create_web() {
-	return memnew(IPWeb);
-}
-
-IPWeb::IPWeb() {
-}

+ 8 - 5
platform/web/ip_web.h

@@ -35,14 +35,17 @@
 class IPWeb : public IP {
 	GDCLASS(IPWeb, IP);
 
-	virtual void _resolve_hostname(List<IPAddress> &r_addresses, const String &p_hostname, Type p_type = TYPE_ANY) const override;
+	virtual void _resolve_hostname(List<IPAddress> &r_addresses, const String &p_hostname, Type p_type = TYPE_ANY) const override {}
 
 private:
-	static IP *_create_web();
+	static IP *_create_web() {
+		return memnew(IPWeb);
+	}
 
 public:
-	virtual void get_local_interfaces(HashMap<String, Interface_Info> *r_interfaces) const override;
+	virtual void get_local_interfaces(HashMap<String, Interface_Info> *r_interfaces) const override {}
 
-	static void make_default();
-	IPWeb();
+	static void make_default() {
+		_create = _create_web;
+	}
 };

+ 0 - 39
platform/web/net_socket_web.cpp

@@ -1,39 +0,0 @@
-/**************************************************************************/
-/*  net_socket_web.cpp                                                    */
-/**************************************************************************/
-/*                         This file is part of:                          */
-/*                             GODOT ENGINE                               */
-/*                        https://godotengine.org                         */
-/**************************************************************************/
-/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */
-/*                                                                        */
-/* Permission is hereby granted, free of charge, to any person obtaining  */
-/* a copy of this software and associated documentation files (the        */
-/* "Software"), to deal in the Software without restriction, including    */
-/* without limitation the rights to use, copy, modify, merge, publish,    */
-/* distribute, sublicense, and/or sell copies of the Software, and to     */
-/* permit persons to whom the Software is furnished to do so, subject to  */
-/* the following conditions:                                              */
-/*                                                                        */
-/* The above copyright notice and this permission notice shall be         */
-/* included in all copies or substantial portions of the Software.        */
-/*                                                                        */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,        */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF     */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY   */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,   */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
-/**************************************************************************/
-
-#include "net_socket_web.h"
-
-NetSocket *NetSocketWeb::_create_func() {
-	return memnew(NetSocketWeb);
-}
-
-void NetSocketWeb::make_default() {
-	_create = _create_func;
-}

+ 6 - 4
platform/web/net_socket_web.h

@@ -38,10 +38,14 @@ class NetSocketWeb : public NetSocket {
 	GDSOFTCLASS(NetSocketWeb, NetSocket);
 
 protected:
-	static NetSocket *_create_func();
+	static NetSocket *_create_func() {
+		return memnew(NetSocketWeb);
+	}
 
 public:
-	static void make_default();
+	static void make_default() {
+		_create = _create_func;
+	}
 
 	virtual Error open(Family p_family, Type p_sock_type, IP::Type &ip_type) override { return ERR_UNAVAILABLE; }
 	virtual void close() override {}
@@ -66,6 +70,4 @@ public:
 	virtual void set_reuse_address_enabled(bool p_enabled) override {}
 	virtual Error join_multicast_group(const IPAddress &p_multi_address, const String &p_if_name) override { return ERR_UNAVAILABLE; }
 	virtual Error leave_multicast_group(const IPAddress &p_multi_address, const String &p_if_name) override { return ERR_UNAVAILABLE; }
-
-	NetSocketWeb() {}
 };

+ 0 - 43
servers/rendering/dummy/storage/texture_storage.cpp

@@ -1,43 +0,0 @@
-/**************************************************************************/
-/*  texture_storage.cpp                                                   */
-/**************************************************************************/
-/*                         This file is part of:                          */
-/*                             GODOT ENGINE                               */
-/*                        https://godotengine.org                         */
-/**************************************************************************/
-/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */
-/*                                                                        */
-/* Permission is hereby granted, free of charge, to any person obtaining  */
-/* a copy of this software and associated documentation files (the        */
-/* "Software"), to deal in the Software without restriction, including    */
-/* without limitation the rights to use, copy, modify, merge, publish,    */
-/* distribute, sublicense, and/or sell copies of the Software, and to     */
-/* permit persons to whom the Software is furnished to do so, subject to  */
-/* the following conditions:                                              */
-/*                                                                        */
-/* The above copyright notice and this permission notice shall be         */
-/* included in all copies or substantial portions of the Software.        */
-/*                                                                        */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,        */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF     */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY   */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,   */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
-/**************************************************************************/
-
-#include "texture_storage.h"
-
-using namespace RendererDummy;
-
-TextureStorage *TextureStorage::singleton = nullptr;
-
-TextureStorage::TextureStorage() {
-	singleton = this;
-}
-
-TextureStorage::~TextureStorage() {
-	singleton = nullptr;
-}

+ 3 - 3
servers/rendering/dummy/storage/texture_storage.h

@@ -36,7 +36,7 @@ namespace RendererDummy {
 
 class TextureStorage : public RendererTextureStorage {
 private:
-	static TextureStorage *singleton;
+	static inline TextureStorage *singleton = nullptr;
 
 	struct DummyTexture {
 		Ref<Image> image;
@@ -46,8 +46,8 @@ private:
 public:
 	static TextureStorage *get_singleton() { return singleton; }
 
-	TextureStorage();
-	~TextureStorage();
+	TextureStorage() { singleton = this; }
+	~TextureStorage() { singleton = nullptr; }
 
 	/* Canvas Texture API */
 

+ 0 - 43
servers/rendering/renderer_rd/storage_rd/forward_id_storage.cpp

@@ -1,43 +0,0 @@
-/**************************************************************************/
-/*  forward_id_storage.cpp                                                */
-/**************************************************************************/
-/*                         This file is part of:                          */
-/*                             GODOT ENGINE                               */
-/*                        https://godotengine.org                         */
-/**************************************************************************/
-/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */
-/*                                                                        */
-/* Permission is hereby granted, free of charge, to any person obtaining  */
-/* a copy of this software and associated documentation files (the        */
-/* "Software"), to deal in the Software without restriction, including    */
-/* without limitation the rights to use, copy, modify, merge, publish,    */
-/* distribute, sublicense, and/or sell copies of the Software, and to     */
-/* permit persons to whom the Software is furnished to do so, subject to  */
-/* the following conditions:                                              */
-/*                                                                        */
-/* The above copyright notice and this permission notice shall be         */
-/* included in all copies or substantial portions of the Software.        */
-/*                                                                        */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,        */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF     */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY   */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,   */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
-/**************************************************************************/
-
-#include "forward_id_storage.h"
-
-using namespace RendererRD;
-
-ForwardIDStorage *ForwardIDStorage::singleton = nullptr;
-
-ForwardIDStorage::ForwardIDStorage() {
-	singleton = this;
-}
-
-ForwardIDStorage::~ForwardIDStorage() {
-	singleton = nullptr;
-}

+ 3 - 3
servers/rendering/renderer_rd/storage_rd/forward_id_storage.h

@@ -48,13 +48,13 @@ enum ForwardIDType {
 
 class ForwardIDStorage {
 private:
-	static ForwardIDStorage *singleton;
+	static inline ForwardIDStorage *singleton = nullptr;
 
 public:
 	static ForwardIDStorage *get_singleton() { return singleton; }
 
-	ForwardIDStorage();
-	virtual ~ForwardIDStorage();
+	ForwardIDStorage() { singleton = this; }
+	virtual ~ForwardIDStorage() { singleton = nullptr; }
 
 	virtual RendererRD::ForwardID allocate_forward_id(RendererRD::ForwardIDType p_type) { return -1; }
 	virtual void free_forward_id(RendererRD::ForwardIDType p_type, RendererRD::ForwardID p_id) {}

+ 0 - 47
servers/rendering/renderer_rd/storage_rd/render_data_rd.cpp

@@ -1,47 +0,0 @@
-/**************************************************************************/
-/*  render_data_rd.cpp                                                    */
-/**************************************************************************/
-/*                         This file is part of:                          */
-/*                             GODOT ENGINE                               */
-/*                        https://godotengine.org                         */
-/**************************************************************************/
-/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */
-/*                                                                        */
-/* Permission is hereby granted, free of charge, to any person obtaining  */
-/* a copy of this software and associated documentation files (the        */
-/* "Software"), to deal in the Software without restriction, including    */
-/* without limitation the rights to use, copy, modify, merge, publish,    */
-/* distribute, sublicense, and/or sell copies of the Software, and to     */
-/* permit persons to whom the Software is furnished to do so, subject to  */
-/* the following conditions:                                              */
-/*                                                                        */
-/* The above copyright notice and this permission notice shall be         */
-/* included in all copies or substantial portions of the Software.        */
-/*                                                                        */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,        */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF     */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY   */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,   */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
-/**************************************************************************/
-
-#include "render_data_rd.h"
-
-Ref<RenderSceneBuffers> RenderDataRD::get_render_scene_buffers() const {
-	return render_buffers;
-}
-
-RenderSceneData *RenderDataRD::get_render_scene_data() const {
-	return scene_data;
-}
-
-RID RenderDataRD::get_environment() const {
-	return environment;
-}
-
-RID RenderDataRD::get_camera_attributes() const {
-	return camera_attributes;
-}

+ 4 - 4
servers/rendering/renderer_rd/storage_rd/render_data_rd.h

@@ -39,11 +39,11 @@ class RenderDataRD : public RenderData {
 
 public:
 	// Access methods to expose data externally
-	virtual Ref<RenderSceneBuffers> get_render_scene_buffers() const override;
-	virtual RenderSceneData *get_render_scene_data() const override;
+	virtual Ref<RenderSceneBuffers> get_render_scene_buffers() const override { return render_buffers; }
+	virtual RenderSceneData *get_render_scene_data() const override { return scene_data; }
 
-	virtual RID get_environment() const override;
-	virtual RID get_camera_attributes() const override;
+	virtual RID get_environment() const override { return environment; }
+	virtual RID get_camera_attributes() const override { return camera_attributes; }
 
 	// Members are publicly accessible within the render engine.
 	Ref<RenderSceneBuffersRD> render_buffers;

+ 0 - 37
servers/rendering/rendering_method.cpp

@@ -1,37 +0,0 @@
-/**************************************************************************/
-/*  rendering_method.cpp                                                  */
-/**************************************************************************/
-/*                         This file is part of:                          */
-/*                             GODOT ENGINE                               */
-/*                        https://godotengine.org                         */
-/**************************************************************************/
-/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */
-/*                                                                        */
-/* Permission is hereby granted, free of charge, to any person obtaining  */
-/* a copy of this software and associated documentation files (the        */
-/* "Software"), to deal in the Software without restriction, including    */
-/* without limitation the rights to use, copy, modify, merge, publish,    */
-/* distribute, sublicense, and/or sell copies of the Software, and to     */
-/* permit persons to whom the Software is furnished to do so, subject to  */
-/* the following conditions:                                              */
-/*                                                                        */
-/* The above copyright notice and this permission notice shall be         */
-/* included in all copies or substantial portions of the Software.        */
-/*                                                                        */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,        */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF     */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY   */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,   */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
-/**************************************************************************/
-
-#include "rendering_method.h"
-
-RenderingMethod::RenderingMethod() {
-}
-
-RenderingMethod::~RenderingMethod() {
-}

+ 1 - 2
servers/rendering/rendering_method.h

@@ -370,6 +370,5 @@ public:
 	virtual void tick() = 0;
 	virtual void pre_draw(bool p_will_draw) = 0;
 
-	RenderingMethod();
-	virtual ~RenderingMethod();
+	virtual ~RenderingMethod() {}
 };

+ 0 - 49
servers/rendering/rendering_server_globals.cpp

@@ -1,49 +0,0 @@
-/**************************************************************************/
-/*  rendering_server_globals.cpp                                          */
-/**************************************************************************/
-/*                         This file is part of:                          */
-/*                             GODOT ENGINE                               */
-/*                        https://godotengine.org                         */
-/**************************************************************************/
-/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */
-/*                                                                        */
-/* Permission is hereby granted, free of charge, to any person obtaining  */
-/* a copy of this software and associated documentation files (the        */
-/* "Software"), to deal in the Software without restriction, including    */
-/* without limitation the rights to use, copy, modify, merge, publish,    */
-/* distribute, sublicense, and/or sell copies of the Software, and to     */
-/* permit persons to whom the Software is furnished to do so, subject to  */
-/* the following conditions:                                              */
-/*                                                                        */
-/* The above copyright notice and this permission notice shall be         */
-/* included in all copies or substantial portions of the Software.        */
-/*                                                                        */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,        */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF     */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY   */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,   */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
-/**************************************************************************/
-
-#include "rendering_server_globals.h"
-
-bool RenderingServerGlobals::threaded = false;
-
-RendererUtilities *RenderingServerGlobals::utilities = nullptr;
-RendererLightStorage *RenderingServerGlobals::light_storage = nullptr;
-RendererMaterialStorage *RenderingServerGlobals::material_storage = nullptr;
-RendererMeshStorage *RenderingServerGlobals::mesh_storage = nullptr;
-RendererParticlesStorage *RenderingServerGlobals::particles_storage = nullptr;
-RendererTextureStorage *RenderingServerGlobals::texture_storage = nullptr;
-RendererGI *RenderingServerGlobals::gi = nullptr;
-RendererFog *RenderingServerGlobals::fog = nullptr;
-RendererCameraAttributes *RenderingServerGlobals::camera_attributes = nullptr;
-RendererCanvasRender *RenderingServerGlobals::canvas_render = nullptr;
-RendererCompositor *RenderingServerGlobals::rasterizer = nullptr;
-
-RendererCanvasCull *RenderingServerGlobals::canvas = nullptr;
-RendererViewport *RenderingServerGlobals::viewport = nullptr;
-RenderingMethod *RenderingServerGlobals::scene = nullptr;

+ 15 - 15
servers/rendering/rendering_server_globals.h

@@ -49,23 +49,23 @@ class RenderingMethod;
 
 class RenderingServerGlobals {
 public:
-	static bool threaded;
+	static inline bool threaded = false;
 
-	static RendererUtilities *utilities;
-	static RendererLightStorage *light_storage;
-	static RendererMaterialStorage *material_storage;
-	static RendererMeshStorage *mesh_storage;
-	static RendererParticlesStorage *particles_storage;
-	static RendererTextureStorage *texture_storage;
-	static RendererGI *gi;
-	static RendererFog *fog;
-	static RendererCameraAttributes *camera_attributes;
-	static RendererCanvasRender *canvas_render;
-	static RendererCompositor *rasterizer;
+	static inline RendererUtilities *utilities = nullptr;
+	static inline RendererLightStorage *light_storage = nullptr;
+	static inline RendererMaterialStorage *material_storage = nullptr;
+	static inline RendererMeshStorage *mesh_storage = nullptr;
+	static inline RendererParticlesStorage *particles_storage = nullptr;
+	static inline RendererTextureStorage *texture_storage = nullptr;
+	static inline RendererGI *gi = nullptr;
+	static inline RendererFog *fog = nullptr;
+	static inline RendererCameraAttributes *camera_attributes = nullptr;
+	static inline RendererCanvasRender *canvas_render = nullptr;
+	static inline RendererCompositor *rasterizer = nullptr;
 
-	static RendererCanvasCull *canvas;
-	static RendererViewport *viewport;
-	static RenderingMethod *scene;
+	static inline RendererCanvasCull *canvas = nullptr;
+	static inline RendererViewport *viewport = nullptr;
+	static inline RenderingMethod *scene = nullptr;
 };
 
 #define RSG RenderingServerGlobals

+ 0 - 39
servers/xr/xr_controller_tracker.cpp

@@ -1,39 +0,0 @@
-/**************************************************************************/
-/*  xr_controller_tracker.cpp                                             */
-/**************************************************************************/
-/*                         This file is part of:                          */
-/*                             GODOT ENGINE                               */
-/*                        https://godotengine.org                         */
-/**************************************************************************/
-/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */
-/*                                                                        */
-/* Permission is hereby granted, free of charge, to any person obtaining  */
-/* a copy of this software and associated documentation files (the        */
-/* "Software"), to deal in the Software without restriction, including    */
-/* without limitation the rights to use, copy, modify, merge, publish,    */
-/* distribute, sublicense, and/or sell copies of the Software, and to     */
-/* permit persons to whom the Software is furnished to do so, subject to  */
-/* the following conditions:                                              */
-/*                                                                        */
-/* The above copyright notice and this permission notice shall be         */
-/* included in all copies or substantial portions of the Software.        */
-/*                                                                        */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,        */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF     */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY   */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,   */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
-/**************************************************************************/
-
-#include "xr_controller_tracker.h"
-
-#include "core/input/input.h"
-
-void XRControllerTracker::_bind_methods() {}
-
-XRControllerTracker::XRControllerTracker() {
-	type = XRServer::TRACKER_CONTROLLER;
-}

+ 3 - 4
servers/xr/xr_controller_tracker.h

@@ -41,9 +41,8 @@ class XRControllerTracker : public XRPositionalTracker {
 	GDCLASS(XRControllerTracker, XRPositionalTracker);
 	_THREAD_SAFE_CLASS_
 
-protected:
-	static void _bind_methods();
-
 public:
-	XRControllerTracker();
+	XRControllerTracker() {
+		type = XRServer::TRACKER_CONTROLLER;
+	}
 };