Skip to content

Commit 7056c99

Browse files
committed
Style: Replace header guards with #pragma once
1 parent 107cb1d commit 7056c99

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+68
-272
lines changed

include/godot_cpp/classes/editor_plugin_registration.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
2929
/**************************************************************************/
3030

31-
#ifndef GODOT_EDITOR_PLUGIN_REGISTRATION_HPP
32-
#define GODOT_EDITOR_PLUGIN_REGISTRATION_HPP
31+
#pragma once
3332

3433
#include <godot_cpp/templates/vector.hpp>
3534

@@ -58,5 +57,3 @@ class EditorPlugins {
5857
};
5958

6059
} // namespace godot
61-
62-
#endif // GODOT_EDITOR_PLUGIN_REGISTRATION_HPP

include/godot_cpp/classes/ref.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
2929
/**************************************************************************/
3030

31-
#ifndef GODOT_REF_HPP
32-
#define GODOT_REF_HPP
31+
#pragma once
3332

3433
#include <godot_cpp/core/defs.hpp>
3534

@@ -284,5 +283,3 @@ struct GetTypeInfo<const Ref<T> &, typename EnableIf<TypeInherits<RefCounted, T>
284283
};
285284

286285
} // namespace godot
287-
288-
#endif // GODOT_REF_HPP

include/godot_cpp/classes/wrapped.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
2929
/**************************************************************************/
3030

31-
#ifndef GODOT_WRAPPED_HPP
32-
#define GODOT_WRAPPED_HPP
31+
#pragma once
3332

3433
#include <godot_cpp/core/memory.hpp>
3534

@@ -511,5 +510,3 @@ public:
511510
#define GDVIRTUAL_BIND(m_name, ...) ::godot::ClassDB::add_virtual_method(get_class_static(), _gdvirtual_##m_name##_get_method_info(), ::godot::snarray(__VA_ARGS__));
512511
#define GDVIRTUAL_IS_OVERRIDDEN(m_name) _gdvirtual_##m_name##_overridden()
513512
#define GDVIRTUAL_IS_OVERRIDDEN_PTR(m_obj, m_name) m_obj->_gdvirtual_##m_name##_overridden()
514-
515-
#endif // GODOT_WRAPPED_HPP

include/godot_cpp/core/binder_common.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
2929
/**************************************************************************/
3030

31-
#ifndef GODOT_BINDER_COMMON_HPP
32-
#define GODOT_BINDER_COMMON_HPP
31+
#pragma once
3332

3433
#include <gdextension_interface.h>
3534

@@ -692,5 +691,3 @@ void call_with_ptr_args_static_method_ret(R (*p_method)(P...), const GDExtension
692691

693692
#include <godot_cpp/classes/global_constants_binds.hpp>
694693
#include <godot_cpp/variant/builtin_binds.hpp>
695-
696-
#endif // GODOT_BINDER_COMMON_HPP

include/godot_cpp/core/builtin_ptrcall.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
2929
/**************************************************************************/
3030

31-
#ifndef GODOT_BUILTIN_PTRCALL_HPP
32-
#define GODOT_BUILTIN_PTRCALL_HPP
31+
#pragma once
3332

3433
#include <gdextension_interface.h>
3534
#include <godot_cpp/core/object.hpp>
@@ -88,5 +87,3 @@ T _call_builtin_ptr_getter(const GDExtensionPtrGetter getter, GDExtensionConstTy
8887
} // namespace internal
8988

9089
} // namespace godot
91-
92-
#endif // GODOT_BUILTIN_PTRCALL_HPP

include/godot_cpp/core/class_db.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
2929
/**************************************************************************/
3030

31-
#ifndef GODOT_CLASS_DB_HPP
32-
#define GODOT_CLASS_DB_HPP
31+
#pragma once
3332

3433
#include <gdextension_interface.h>
3534

@@ -370,5 +369,3 @@ MethodBind *ClassDB::bind_vararg_method(uint32_t p_flags, StringName p_name, M p
370369
} // namespace godot
371370

372371
CLASSDB_SINGLETON_VARIANT_CAST;
373-
374-
#endif // GODOT_CLASS_DB_HPP

include/godot_cpp/core/defs.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
2929
/**************************************************************************/
3030

31-
#ifndef GODOT_DEFS_HPP
32-
#define GODOT_DEFS_HPP
31+
#pragma once
3332

3433
#include <cstddef>
3534
#include <cstdint>
@@ -130,5 +129,3 @@ struct BuildIndexSequence<0, Is...> : IndexSequence<Is...> {};
130129
// To maintain compatibility an alias is defined outside the namespace.
131130
// Consider it deprecated.
132131
using real_t = godot::real_t;
133-
134-
#endif // GODOT_DEFS_HPP

include/godot_cpp/core/engine_ptrcall.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
2929
/**************************************************************************/
3030

31-
#ifndef GODOT_ENGINE_PTRCALL_HPP
32-
#define GODOT_ENGINE_PTRCALL_HPP
31+
#pragma once
3332

3433
#include <gdextension_interface.h>
3534

@@ -93,5 +92,3 @@ void _call_utility_no_ret(const GDExtensionPtrUtilityFunction func, const Args &
9392
} // namespace internal
9493

9594
} // namespace godot
96-
97-
#endif // GODOT_ENGINE_PTRCALL_HPP

include/godot_cpp/core/error_macros.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
2929
/**************************************************************************/
3030

31-
#ifndef GODOT_ERROR_MACROS_HPP
32-
#define GODOT_ERROR_MACROS_HPP
31+
#pragma once
3332

3433
#include <godot_cpp/core/defs.hpp>
3534

@@ -802,5 +801,3 @@ void _err_flush_stdout();
802801
#define CHECK_METHOD_BIND_RET(m_mb, m_ret)
803802
#define CHECK_METHOD_BIND(m_mb)
804803
#endif
805-
806-
#endif // GODOT_ERROR_MACROS_HPP

include/godot_cpp/core/math.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
2929
/**************************************************************************/
3030

31-
#ifndef GODOT_MATH_HPP
32-
#define GODOT_MATH_HPP
31+
#pragma once
3332

3433
#include <godot_cpp/core/defs.hpp>
3534

@@ -815,5 +814,3 @@ inline float snap_scalar_separation(float p_offset, float p_step, float p_target
815814

816815
} // namespace Math
817816
} // namespace godot
818-
819-
#endif // GODOT_MATH_HPP

0 commit comments

Comments
 (0)