Style: Replace header guards with #pragma once

This commit is contained in:
Thaddeus Crews
2025-02-01 10:33:58 -06:00
parent 96fdaa616b
commit 324512e11c
1746 changed files with 1767 additions and 6920 deletions

View File

@@ -28,10 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
// This file was generated using the `misc/scripts/char_range_fetch.py` script.
#ifndef CHAR_RANGE_INC
#define CHAR_RANGE_INC
#pragma once
#include "core/typedefs.h"
@@ -3630,5 +3627,3 @@ constexpr inline CharRange unicode_letter[] = {
{ 0x30000, 0x3134a },
{ 0x31350, 0x323af },
};
#endif // CHAR_RANGE_INC

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef CHAR_UTILS_H
#define CHAR_UTILS_H
#pragma once
#include "core/typedefs.h"
@@ -133,5 +132,3 @@ constexpr bool is_punct(char32_t p_char) {
constexpr bool is_underscore(char32_t p_char) {
return (p_char == '_');
}
#endif // CHAR_UTILS_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef FUZZY_SEARCH_H
#define FUZZY_SEARCH_H
#pragma once
#include "core/variant/variant.h"
@@ -97,5 +96,3 @@ public:
bool search(const String &p_target, FuzzySearchResult &p_result) const;
void search_all(const PackedStringArray &p_targets, Vector<FuzzySearchResult> &p_results) const;
};
#endif // FUZZY_SEARCH_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef LOCALES_H
#define LOCALES_H
#pragma once
// Windows has some weird locale identifiers which do not honor the ISO 639-1
// standardized nomenclature. Whenever those don't conflict with existing ISO
@@ -1195,5 +1194,3 @@ static const char *script_list[][2] = {
{ "Zanabazar Square", "Zanb" },
{ nullptr, nullptr }
};
#endif // LOCALES_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef NODE_PATH_H
#define NODE_PATH_H
#pragma once
#include "core/string/string_name.h"
#include "core/string/ustring.h"
@@ -96,5 +95,3 @@ public:
NodePath() {}
~NodePath();
};
#endif // NODE_PATH_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef OPTIMIZED_TRANSLATION_H
#define OPTIMIZED_TRANSLATION_H
#pragma once
#include "core/string/translation.h"
@@ -86,5 +85,3 @@ public:
OptimizedTranslation() {}
};
#endif // OPTIMIZED_TRANSLATION_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef PRINT_STRING_H
#define PRINT_STRING_H
#pragma once
#include "core/variant/variant.h"
@@ -86,5 +85,3 @@ template <typename... Args>
void print_line_rich(const Variant &p_var, Args... p_args) {
__print_line_rich(stringify_variants(p_var, p_args...));
}
#endif // PRINT_STRING_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef STRING_BUFFER_H
#define STRING_BUFFER_H
#pragma once
#include "core/string/ustring.h"
@@ -158,5 +157,3 @@ int64_t StringBuffer<SHORT_BUFFER_SIZE>::as_int() {
current_buffer_ptr()[string_length] = '\0';
return String::to_int(current_buffer_ptr());
}
#endif // STRING_BUFFER_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef STRING_BUILDER_H
#define STRING_BUILDER_H
#pragma once
#include "core/string/ustring.h"
#include "core/templates/local_vector.h"
@@ -80,5 +79,3 @@ public:
StringBuilder() {}
};
#endif // STRING_BUILDER_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef STRING_NAME_H
#define STRING_NAME_H
#pragma once
#include "core/os/mutex.h"
#include "core/string/ustring.h"
@@ -240,5 +239,3 @@ StringName _scs_create(const char *p_chr, bool p_static = false);
*/
#define SNAME(m_arg) ([]() -> const StringName & { static StringName sname = _scs_create(m_arg, true); return sname; })()
#endif // STRING_NAME_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef TRANSLATION_H
#define TRANSLATION_H
#pragma once
#include "core/io/resource.h"
#include "core/object/gdvirtual.gen.inc"
@@ -69,5 +68,3 @@ public:
Translation() {}
};
#endif // TRANSLATION_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef TRANSLATION_DOMAIN_H
#define TRANSLATION_DOMAIN_H
#pragma once
#include "core/object/ref_counted.h"
@@ -103,5 +102,3 @@ public:
TranslationDomain();
};
#endif // TRANSLATION_DOMAIN_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef TRANSLATION_PO_H
#define TRANSLATION_PO_H
#pragma once
//#define DEBUG_TRANSLATION_PO
@@ -99,5 +98,3 @@ public:
TranslationPO() {}
};
#endif // TRANSLATION_PO_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef TRANSLATION_SERVER_H
#define TRANSLATION_SERVER_H
#pragma once
#include "core/string/translation.h"
#include "core/string/translation_domain.h"
@@ -160,5 +159,3 @@ public:
TranslationServer();
};
#endif // TRANSLATION_SERVER_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef UCAPS_H
#define UCAPS_H
#pragma once
// This file was generated using the `misc/scripts/ucaps_fetch.py` script.
@@ -3018,5 +3017,3 @@ static int _find_lower(int ch) {
return ch;
}
#endif // UCAPS_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef USTRING_GODOT_H
#define USTRING_GODOT_H
#pragma once
// Note: _GODOT suffix added to header guard to avoid conflict with ICU header.
@@ -798,5 +797,3 @@ _FORCE_INLINE_ Vector<String> sarray(P... p_args) {
sarray_add_str(arr, p_args...);
return arr;
}
#endif // USTRING_GODOT_H