From 450c3d65cd182b3e33a1deeae250143e699f7972 Mon Sep 17 00:00:00 2001 From: Zhehang Ding Date: Mon, 7 Oct 2024 20:51:51 +0800 Subject: [PATCH] Use namespace in defs.hpp A global alias of godot::real_t is defined for backward compatibility --- include/godot_cpp/core/defs.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/godot_cpp/core/defs.hpp b/include/godot_cpp/core/defs.hpp index 16812c2b4..5b985ffc3 100644 --- a/include/godot_cpp/core/defs.hpp +++ b/include/godot_cpp/core/defs.hpp @@ -35,6 +35,8 @@ #include #include +namespace godot { + #if !defined(GDE_EXPORT) #if defined(_WIN32) #define GDE_EXPORT __declspec(dllexport) @@ -127,4 +129,10 @@ struct BuildIndexSequence : BuildIndexSequence {}; template struct BuildIndexSequence<0, Is...> : IndexSequence {}; +} //namespace godot + +// To maintain compatibility an alias is defined outside the namespace. +// Consider it deprecated. +using real_t = godot::real_t; + #endif // GODOT_DEFS_HPP