Skip to content

Commit

Permalink
Use namespace in defs.hpp
Browse files Browse the repository at this point in the history
A global alias of godot::real_t is defined for backward compatibility
  • Loading branch information
zhehangd committed Nov 3, 2024
1 parent 6facde3 commit 450c3d6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/godot_cpp/core/defs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
#include <cstdint>
#include <cstring>

namespace godot {

#if !defined(GDE_EXPORT)
#if defined(_WIN32)
#define GDE_EXPORT __declspec(dllexport)
Expand Down Expand Up @@ -127,4 +129,10 @@ struct BuildIndexSequence : BuildIndexSequence<N - 1, N - 1, Is...> {};
template <size_t... 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

0 comments on commit 450c3d6

Please sign in to comment.