Skip to content

Commit bc6f79c

Browse files
authored
Merge pull request #1617 from zhehangd/fix_def_hpp_namespace
Use namespace in defs.hpp
2 parents a42b363 + 450c3d6 commit bc6f79c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

include/godot_cpp/core/defs.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
#include <cstdint>
3636
#include <cstring>
3737

38+
namespace godot {
39+
3840
#if !defined(GDE_EXPORT)
3941
#if defined(_WIN32)
4042
#define GDE_EXPORT __declspec(dllexport)
@@ -127,4 +129,10 @@ struct BuildIndexSequence : BuildIndexSequence<N - 1, N - 1, Is...> {};
127129
template <size_t... Is>
128130
struct BuildIndexSequence<0, Is...> : IndexSequence<Is...> {};
129131

132+
} //namespace godot
133+
134+
// To maintain compatibility an alias is defined outside the namespace.
135+
// Consider it deprecated.
136+
using real_t = godot::real_t;
137+
130138
#endif // GODOT_DEFS_HPP

0 commit comments

Comments
 (0)