Skip to content

Commit 324512e

Browse files
committed
Style: Replace header guards with #pragma once
1 parent 96fdaa6 commit 324512e

File tree

1,746 files changed

+1767
-6920
lines changed

Some content is hidden

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

1,746 files changed

+1767
-6920
lines changed

core/config/engine.h

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 ENGINE_H
32-
#define ENGINE_H
31+
#pragma once
3332

3433
#include "core/os/main_loop.h"
3534
#include "core/string/ustring.h"
@@ -214,5 +213,3 @@ class Engine {
214213
Engine();
215214
virtual ~Engine();
216215
};
217-
218-
#endif // ENGINE_H

core/config/project_settings.h

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 PROJECT_SETTINGS_H
32-
#define PROJECT_SETTINGS_H
31+
#pragma once
3332

3433
#include "core/object/class_db.h"
3534

@@ -243,5 +242,3 @@ Variant _GLOBAL_DEF(const PropertyInfo &p_info, const Variant &p_default, bool p
243242
#define GLOBAL_DEF_RST_NOVAL_BASIC(m_var, m_value) _GLOBAL_DEF(m_var, m_value, true, true, true)
244243

245244
#define GLOBAL_DEF_INTERNAL(m_var, m_value) _GLOBAL_DEF(m_var, m_value, false, false, false, true)
246-
247-
#endif // PROJECT_SETTINGS_H

core/core_bind.h

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 CORE_BIND_H
32-
#define CORE_BIND_H
31+
#pragma once
3332

3433
#include "core/debugger/engine_profiler.h"
3534
#include "core/io/resource_loader.h"
@@ -670,5 +669,3 @@ VARIANT_ENUM_CAST(core_bind::Geometry2D::PolyEndType);
670669
VARIANT_ENUM_CAST(core_bind::Thread::Priority);
671670

672671
VARIANT_ENUM_CAST(core_bind::special::ClassDB::APIType);
673-
674-
#endif // CORE_BIND_H

core/core_constants.h

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 CORE_CONSTANTS_H
32-
#define CORE_CONSTANTS_H
31+
#pragma once
3332

3433
#include "core/string/string_name.h"
3534
#include "core/templates/hash_map.h"
@@ -47,5 +46,3 @@ class CoreConstants {
4746
static bool is_global_enum(const StringName &p_enum);
4847
static void get_enum_values(const StringName &p_enum, HashMap<StringName, int64_t> *p_values);
4948
};
50-
51-
#endif // CORE_CONSTANTS_H

core/core_globals.h

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 CORE_GLOBALS_H
32-
#define CORE_GLOBALS_H
31+
#pragma once
3332

3433
// Home for state needed from global functions
3534
// that cannot be stored in Engine or OS due to e.g. circular includes
@@ -40,5 +39,3 @@ class CoreGlobals {
4039
static bool print_line_enabled;
4140
static bool print_error_enabled;
4241
};
43-
44-
#endif // CORE_GLOBALS_H

core/core_string_names.h

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 CORE_STRING_NAMES_H
32-
#define CORE_STRING_NAMES_H
31+
#pragma once
3332

3433
#include "core/string/string_name.h"
3534

@@ -87,5 +86,3 @@ class CoreStringNames {
8786
};
8887

8988
#define CoreStringName(m_name) CoreStringNames::get_singleton()->m_name
90-
91-
#endif // CORE_STRING_NAMES_H

core/crypto/aes_context.h

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 AES_CONTEXT_H
32-
#define AES_CONTEXT_H
31+
#pragma once
3332

3433
#include "core/crypto/crypto_core.h"
3534
#include "core/object/ref_counted.h"
@@ -64,5 +63,3 @@ class AESContext : public RefCounted {
6463
};
6564

6665
VARIANT_ENUM_CAST(AESContext::Mode);
67-
68-
#endif // AES_CONTEXT_H

core/crypto/crypto.h

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 CRYPTO_H
32-
#define CRYPTO_H
31+
#pragma once
3332

3433
#include "core/crypto/hashing_context.h"
3534
#include "core/io/resource.h"
@@ -167,5 +166,3 @@ class ResourceFormatSaverCrypto : public ResourceFormatSaver {
167166
virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const override;
168167
virtual bool recognize(const Ref<Resource> &p_resource) const override;
169168
};
170-
171-
#endif // CRYPTO_H

core/crypto/crypto_core.h

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 CRYPTO_CORE_H
32-
#define CRYPTO_CORE_H
31+
#pragma once
3332

3433
#include "core/object/ref_counted.h"
3534

@@ -115,5 +114,3 @@ class CryptoCore {
115114
static Error sha1(const uint8_t *p_src, int p_src_len, unsigned char r_hash[20]);
116115
static Error sha256(const uint8_t *p_src, int p_src_len, unsigned char r_hash[32]);
117116
};
118-
119-
#endif // CRYPTO_CORE_H

core/crypto/hashing_context.h

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 HASHING_CONTEXT_H
32-
#define HASHING_CONTEXT_H
31+
#pragma once
3332

3433
#include "core/object/ref_counted.h"
3534

@@ -62,5 +61,3 @@ class HashingContext : public RefCounted {
6261
};
6362

6463
VARIANT_ENUM_CAST(HashingContext::HashType);
65-
66-
#endif // HASHING_CONTEXT_H

0 commit comments

Comments
 (0)