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

include/godot_cpp/core/memory.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_MEMORY_HPP
32-
#define GODOT_MEMORY_HPP
31+
#pragma once
3332

3433
#include <cstddef>
3534
#include <cstdint>
@@ -216,5 +215,3 @@ struct _GlobalNilClass {
216215
};
217216

218217
} // namespace godot
219-
220-
#endif // GODOT_MEMORY_HPP

include/godot_cpp/core/method_bind.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_METHOD_BIND_HPP
32-
#define GODOT_METHOD_BIND_HPP
31+
#pragma once
3332

3433
#include <godot_cpp/core/binder_common.hpp>
3534
#include <godot_cpp/core/type_info.hpp>
@@ -731,5 +730,3 @@ MethodBind *create_static_method_bind(R (*p_method)(P...)) {
731730
}
732731

733732
} // namespace godot
734-
735-
#endif // GODOT_METHOD_BIND_HPP

include/godot_cpp/core/method_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_METHOD_PTRCALL_HPP
32-
#define GODOT_METHOD_PTRCALL_HPP
31+
#pragma once
3332

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

@@ -234,5 +233,3 @@ GDVIRTUAL_NATIVE_PTR(float);
234233
GDVIRTUAL_NATIVE_PTR(double);
235234

236235
} // namespace godot
237-
238-
#endif // GODOT_METHOD_PTRCALL_HPP

include/godot_cpp/core/mutex_lock.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_MUTEX_LOCK_HPP
32-
#define GODOT_MUTEX_LOCK_HPP
31+
#pragma once
3332

3433
#include <godot_cpp/classes/mutex.hpp>
3534

@@ -55,5 +54,3 @@ class MutexLock {
5554
#define _THREAD_SAFE_UNLOCK_ _thread_safe_.unlock();
5655

5756
} // namespace godot
58-
59-
#endif // GODOT_MUTEX_LOCK_HPP

include/godot_cpp/core/object.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_OBJECT_HPP
32-
#define GODOT_OBJECT_HPP
31+
#pragma once
3332

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

@@ -148,5 +147,3 @@ const T *Object::cast_to(const Object *p_object) {
148147
}
149148

150149
} // namespace godot
151-
152-
#endif // GODOT_OBJECT_HPP

include/godot_cpp/core/object_id.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_OBJECT_ID_HPP
32-
#define GODOT_OBJECT_ID_HPP
31+
#pragma once
3332

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

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

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

include/godot_cpp/core/print_string.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_PRINT_STRING_HPP
32-
#define GODOT_PRINT_STRING_HPP
31+
#pragma once
3332

3433
#include <godot_cpp/variant/utility_functions.hpp>
3534

@@ -69,5 +68,3 @@ void print_verbose(const Variant &p_variant, Args... p_args) {
6968
bool is_print_verbose_enabled();
7069

7170
} // namespace godot
72-
73-
#endif // GODOT_PRINT_STRING_HPP

include/godot_cpp/core/property_info.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_PROPERTY_INFO_HPP
32-
#define GODOT_PROPERTY_INFO_HPP
31+
#pragma once
3332

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

@@ -128,5 +127,3 @@ struct PropertyInfo {
128127
};
129128

130129
} // namespace godot
131-
132-
#endif // GODOT_PROPERTY_INFO_HPP

include/godot_cpp/core/type_info.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_TYPE_INFO_HPP
32-
#define GODOT_TYPE_INFO_HPP
31+
#pragma once
3332

3433
#include <godot_cpp/core/object.hpp>
3534
#include <godot_cpp/variant/typed_array.hpp>
@@ -416,5 +415,3 @@ MAKE_TYPED_ARRAY_INFO(IPAddress, Variant::STRING)
416415
#define CLASS_INFO(m_type) (GetTypeInfo<m_type *>::get_class_info())
417416

418417
} // namespace godot
419-
420-
#endif // GODOT_TYPE_INFO_HPP

include/godot_cpp/godot.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_GODOT_HPP
32-
#define GODOT_GODOT_HPP
31+
#pragma once
3332

3433
#include <gdextension_interface.h>
3534

@@ -265,5 +264,3 @@ class GDExtensionBinding {
265264
};
266265

267266
} // namespace godot
268-
269-
#endif // GODOT_GODOT_HPP

include/godot_cpp/templates/cowdata.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_COWDATA_HPP
32-
#define GODOT_COWDATA_HPP
31+
#pragma once
3332

3433
#include <godot_cpp/classes/global_constants.hpp>
3534
#include <godot_cpp/core/error_macros.hpp>
@@ -488,5 +487,3 @@ CowData<T>::~CowData() {
488487
#endif
489488

490489
} // namespace godot
491-
492-
#endif // GODOT_COWDATA_HPP

include/godot_cpp/templates/hash_map.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_HASH_MAP_HPP
32-
#define GODOT_HASH_MAP_HPP
31+
#pragma once
3332

3433
#include <godot_cpp/core/error_macros.hpp>
3534
#include <godot_cpp/core/memory.hpp>
@@ -587,5 +586,3 @@ class HashMap {
587586
};
588587

589588
} // namespace godot
590-
591-
#endif // GODOT_HASH_MAP_HPP

include/godot_cpp/templates/hash_set.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_HASH_SET_HPP
32-
#define GODOT_HASH_SET_HPP
31+
#pragma once
3332

3433
#include <godot_cpp/core/error_macros.hpp>
3534
#include <godot_cpp/core/memory.hpp>
@@ -473,5 +472,3 @@ class HashSet {
473472
};
474473

475474
} // namespace godot
476-
477-
#endif // GODOT_HASH_SET_HPP

include/godot_cpp/templates/hashfuncs.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_HASHFUNCS_HPP
32-
#define GODOT_HASHFUNCS_HPP
31+
#pragma once
3332

3433
// Needed for fastmod.
3534
#if defined(_MSC_VER)
@@ -522,5 +521,3 @@ static _FORCE_INLINE_ uint32_t fastmod(const uint32_t n, const uint64_t c, const
522521
}
523522

524523
} // namespace godot
525-
526-
#endif // GODOT_HASHFUNCS_HPP

include/godot_cpp/templates/list.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_LIST_HPP
32-
#define GODOT_LIST_HPP
31+
#pragma once
3332

3433
#include <godot_cpp/core/error_macros.hpp>
3534
#include <godot_cpp/core/memory.hpp>
@@ -783,5 +782,3 @@ class List {
783782
};
784783

785784
} // namespace godot
786-
787-
#endif // GODOT_LIST_HPP

0 commit comments

Comments
 (0)