Use namespace in defs.hpp

A global alias of godot::real_t is defined for backward compatibility
pull/1617/head
Zhehang Ding 2024-10-07 20:51:51 +08:00
parent 6facde3c29
commit 450c3d65cd
1 changed files with 8 additions and 0 deletions

View File

@ -35,6 +35,8 @@
#include <cstdint> #include <cstdint>
#include <cstring> #include <cstring>
namespace godot {
#if !defined(GDE_EXPORT) #if !defined(GDE_EXPORT)
#if defined(_WIN32) #if defined(_WIN32)
#define GDE_EXPORT __declspec(dllexport) #define GDE_EXPORT __declspec(dllexport)
@ -127,4 +129,10 @@ struct BuildIndexSequence : BuildIndexSequence<N - 1, N - 1, Is...> {};
template <size_t... Is> template <size_t... Is>
struct BuildIndexSequence<0, Is...> : IndexSequence<Is...> {}; struct BuildIndexSequence<0, Is...> : IndexSequence<Is...> {};
} //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 #endif // GODOT_DEFS_HPP