Browse Source

Code quality: Fix header guards consistency

Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
Rémi Verschelde 3 years ago
parent
commit
818f1eed31
100 changed files with 163 additions and 151 deletions
  1. 1 1
      core/bitfield_dynamic.h
  2. 1 1
      core/color.h
  3. 1 1
      core/command_queue_mt.h
  4. 1 1
      core/core_string_names.h
  5. 3 3
      core/cowdata.h
  6. 1 0
      core/crypto/crypto_core.h
  7. 1 1
      core/error_list.h
  8. 2 1
      core/error_macros.h
  9. 1 1
      core/hash_map.h
  10. 1 1
      core/hashfuncs.h
  11. 1 1
      core/image.h
  12. 1 1
      core/int_types.h
  13. 1 1
      core/io/image_loader.h
  14. 1 1
      core/io/logger.h
  15. 1 1
      core/io/marshalls.h
  16. 3 3
      core/io/multiplayer_api.h
  17. 1 1
      core/io/networked_multiplayer_custom.h
  18. 1 1
      core/io/networked_multiplayer_peer.h
  19. 1 1
      core/io/packet_peer.h
  20. 1 1
      core/io/resource_loader.h
  21. 1 1
      core/io/resource_saver.h
  22. 1 1
      core/io/stream_peer_tcp.h
  23. 1 1
      core/io/xml_parser.h
  24. 3 3
      core/list.h
  25. 1 1
      core/map.h
  26. 3 3
      core/math/a_star.h
  27. 3 3
      core/math/audio_frame.h
  28. 1 0
      core/math/basis.h
  29. 1 1
      core/math/bsp_tree.h
  30. 1 1
      core/math/camera_matrix.h
  31. 1 1
      core/math/disjoint_set.h
  32. 1 1
      core/math/geometry.h
  33. 1 1
      core/math/quat.h
  34. 1 1
      core/math/triangulate.h
  35. 1 1
      core/method_bind.h
  36. 2 1
      core/method_ptrcall.h
  37. 1 1
      core/node_path.h
  38. 1 1
      core/oa_hash_map.h
  39. 1 1
      core/object.h
  40. 3 3
      core/object_id.h
  41. 3 3
      core/object_rc.h
  42. 1 1
      core/os/dir_access.h
  43. 1 1
      core/os/file_access.h
  44. 1 1
      core/os/input_event.h
  45. 1 1
      core/os/keyboard.h
  46. 1 1
      core/os/main_loop.h
  47. 1 1
      core/os/memory.h
  48. 1 1
      core/os/midi_driver.h
  49. 1 1
      core/os/os.h
  50. 3 3
      core/os/rw_lock.h
  51. 1 0
      core/os/spin_lock.h
  52. 1 1
      core/os/thread_safe.h
  53. 1 1
      core/os/thread_work_pool.h
  54. 1 1
      core/pool_allocator.h
  55. 1 1
      core/print_string.h
  56. 3 3
      core/project_settings.h
  57. 1 0
      core/ref_ptr.h
  58. 1 1
      core/register_core_types.h
  59. 1 1
      core/resource.h
  60. 1 1
      core/rid.h
  61. 3 3
      core/ring_buffer.h
  62. 1 1
      core/script_language.h
  63. 1 1
      core/set.h
  64. 1 1
      core/simple_type.h
  65. 1 1
      core/string_buffer.h
  66. 3 3
      core/type_info.h
  67. 2 1
      core/ucaps.h
  68. 3 3
      core/ustring.h
  69. 2 1
      core/variant.h
  70. 1 1
      core/vector.h
  71. 3 3
      core/version.h
  72. 1 0
      core/vmap.h
  73. 1 1
      drivers/coreaudio/audio_driver_coreaudio.h
  74. 4 3
      drivers/coremidi/midi_driver_coremidi.h
  75. 3 3
      drivers/gles2/rasterizer_canvas_base_gles2.h
  76. 3 3
      drivers/gles2/rasterizer_canvas_gles2.h
  77. 3 3
      drivers/gles2/rasterizer_gles2.h
  78. 3 4
      drivers/gles2/rasterizer_scene_gles2.h
  79. 3 3
      drivers/gles2/rasterizer_storage_gles2.h
  80. 3 3
      drivers/gles2/shader_compiler_gles2.h
  81. 1 1
      drivers/gles2/shader_gles2.h
  82. 3 3
      drivers/gles3/rasterizer_canvas_base_gles3.h
  83. 3 3
      drivers/gles3/rasterizer_canvas_gles3.h
  84. 3 3
      drivers/gles3/rasterizer_gles3.h
  85. 3 3
      drivers/gles3/rasterizer_scene_gles3.h
  86. 3 3
      drivers/gles3/rasterizer_storage_gles3.h
  87. 1 1
      drivers/gles3/shader_cache_gles3.h
  88. 3 3
      drivers/gles3/shader_compiler_gles3.h
  89. 1 1
      drivers/gles3/shader_gles3.h
  90. 1 1
      drivers/png/image_loader_png.h
  91. 1 1
      drivers/png/png_driver_common.h
  92. 1 1
      drivers/register_driver_types.h
  93. 1 1
      drivers/unix/dir_access_unix.cpp
  94. 3 2
      drivers/unix/dir_access_unix.h
  95. 1 1
      drivers/unix/file_access_unix.cpp
  96. 3 2
      drivers/unix/file_access_unix.h
  97. 1 0
      drivers/unix/ip_unix.h
  98. 3 3
      drivers/unix/net_socket_posix.h
  99. 1 1
      drivers/unix/os_unix.h
  100. 1 1
      drivers/unix/syslog_logger.h

+ 1 - 1
core/bitfield_dynamic.h

@@ -108,4 +108,4 @@ inline void BitFieldDynamic::set_bit(uint32_t p_bit, uint32_t p_set) {
 	_data[byte_number] = uc;
 }
 
-#endif
+#endif // BITFIELD_DYNAMIC_H

+ 1 - 1
core/color.h

@@ -232,4 +232,4 @@ bool Color::operator<(const Color &p_color) const {
 	}
 }
 
-#endif
+#endif // COLOR_H

+ 1 - 1
core/command_queue_mt.h

@@ -507,4 +507,4 @@ public:
 #undef CMD_SYNC_TYPE
 #undef DECL_CMD_SYNC
 
-#endif
+#endif // COMMAND_QUEUE_MT_H

+ 1 - 1
core/core_string_names.h

@@ -91,4 +91,4 @@ public:
 	StringName a8;
 };
 
-#endif // SCENE_STRING_NAMES_H
+#endif // CORE_STRING_NAMES_H

+ 3 - 3
core/cowdata.h

@@ -28,8 +28,8 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 
-#ifndef COWDATA_H_
-#define COWDATA_H_
+#ifndef COWDATA_H
+#define COWDATA_H
 
 #include <string.h>
 
@@ -375,4 +375,4 @@ CowData<T>::~CowData() {
 	_unref(_ptr);
 }
 
-#endif /* COW_H_ */
+#endif // COWDATA_H

+ 1 - 0
core/crypto/crypto_core.h

@@ -98,4 +98,5 @@ public:
 	static Error sha1(const uint8_t *p_src, int p_src_len, unsigned char r_hash[20]);
 	static Error sha256(const uint8_t *p_src, int p_src_len, unsigned char r_hash[32]);
 };
+
 #endif // CRYPTO_CORE_H

+ 1 - 1
core/error_list.h

@@ -90,4 +90,4 @@ enum Error {
 	ERR_PRINTER_ON_FIRE, /// the parallel port printer is engulfed in flames
 };
 
-#endif
+#endif // ERROR_LIST_H

+ 2 - 1
core/error_macros.h

@@ -558,4 +558,5 @@ void _err_flush_stdout();
 		((void)0)
 #else
 #define DEV_CHECK_ONCE(m_cond)
-#endif
+
+#endif // ERROR_MACROS_H

+ 1 - 1
core/hash_map.h

@@ -574,4 +574,4 @@ public:
 	}
 };
 
-#endif
+#endif // HASH_MAP_H

+ 1 - 1
core/hashfuncs.h

@@ -166,4 +166,4 @@ struct HashMapComparatorDefault {
 	}
 };
 
-#endif
+#endif // HASHFUNCS_H

+ 1 - 1
core/image.h

@@ -388,4 +388,4 @@ VARIANT_ENUM_CAST(Image::CompressMode)
 VARIANT_ENUM_CAST(Image::CompressSource)
 VARIANT_ENUM_CAST(Image::AlphaMode)
 
-#endif
+#endif // IMAGE_H

+ 1 - 1
core/int_types.h

@@ -54,4 +54,4 @@ typedef unsigned long long uint64_t;
 #include <stdint.h>
 #endif
 
-#endif
+#endif // INT_TYPES_H

+ 1 - 1
core/io/image_loader.h

@@ -78,4 +78,4 @@ public:
 	virtual String get_resource_type(const String &p_path) const;
 };
 
-#endif
+#endif // IMAGE_LOADER_H

+ 1 - 1
core/io/logger.h

@@ -109,4 +109,4 @@ public:
 	virtual ~CompositeLogger();
 };
 
-#endif
+#endif // LOGGER_H

+ 1 - 1
core/io/marshalls.h

@@ -183,4 +183,4 @@ public:
 Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int *r_len = nullptr, bool p_allow_objects = false, int p_depth = 0);
 Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bool p_full_objects = false, int p_depth = 0);
 
-#endif
+#endif // MARSHALLS_H

+ 3 - 3
core/io/multiplayer_api.h

@@ -28,8 +28,8 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 
-#ifndef MULTIPLAYER_PROTOCOL_H
-#define MULTIPLAYER_PROTOCOL_H
+#ifndef MULTIPLAYER_API_H
+#define MULTIPLAYER_API_H
 
 #include "core/io/networked_multiplayer_peer.h"
 #include "core/reference.h"
@@ -170,4 +170,4 @@ public:
 
 VARIANT_ENUM_CAST(MultiplayerAPI::RPCMode);
 
-#endif // MULTIPLAYER_PROTOCOL_H
+#endif // MULTIPLAYER_API_H

+ 1 - 1
core/io/networked_multiplayer_custom.h

@@ -84,4 +84,4 @@ public:
 	void deliver_packet(const PoolByteArray &p_data, int p_from_peer_id);
 };
 
-#endif
+#endif // NETWORKED_MULTIPLAYER_CUSTOM_H

+ 1 - 1
core/io/networked_multiplayer_peer.h

@@ -79,4 +79,4 @@ public:
 VARIANT_ENUM_CAST(NetworkedMultiplayerPeer::TransferMode)
 VARIANT_ENUM_CAST(NetworkedMultiplayerPeer::ConnectionStatus)
 
-#endif // NetworkedMultiplayerPeer_H
+#endif // NETWORKED_MULTIPLAYER_PEER_H

+ 1 - 1
core/io/packet_peer.h

@@ -110,4 +110,4 @@ public:
 	PacketPeerStream();
 };
 
-#endif // PACKET_STREAM_H
+#endif // PACKET_PEER_H

+ 1 - 1
core/io/resource_loader.h

@@ -200,4 +200,4 @@ public:
 	static void finalize();
 };
 
-#endif
+#endif // RESOURCE_LOADER_H

+ 1 - 1
core/io/resource_saver.h

@@ -89,4 +89,4 @@ public:
 	static void remove_custom_savers();
 };
 
-#endif
+#endif // RESOURCE_SAVER_H

+ 1 - 1
core/io/stream_peer_tcp.h

@@ -89,4 +89,4 @@ public:
 
 VARIANT_ENUM_CAST(StreamPeerTCP::Status);
 
-#endif
+#endif // STREAM_PEER_TCP_H

+ 1 - 1
core/io/xml_parser.h

@@ -117,4 +117,4 @@ public:
 	~XMLParser();
 };
 
-#endif
+#endif // XML_PARSER_H

+ 3 - 3
core/list.h

@@ -28,8 +28,8 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 
-#ifndef GLOBALS_LIST_H
-#define GLOBALS_LIST_H
+#ifndef LIST_H
+#define LIST_H
 
 #include "core/error_macros.h"
 #include "core/os/memory.h"
@@ -697,4 +697,4 @@ public:
 	};
 };
 
-#endif
+#endif // LIST_H

+ 1 - 1
core/map.h

@@ -675,4 +675,4 @@ public:
 	}
 };
 
-#endif
+#endif // MAP_H

+ 3 - 3
core/math/a_star.h

@@ -28,8 +28,8 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 
-#ifndef ASTAR_H
-#define ASTAR_H
+#ifndef A_STAR_H
+#define A_STAR_H
 
 #include "core/oa_hash_map.h"
 #include "core/reference.h"
@@ -208,4 +208,4 @@ public:
 	~AStar2D();
 };
 
-#endif // ASTAR_H
+#endif // A_STAR_H

+ 3 - 3
core/math/audio_frame.h

@@ -28,8 +28,8 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 
-#ifndef AUDIOFRAME_H
-#define AUDIOFRAME_H
+#ifndef AUDIO_FRAME_H
+#define AUDIO_FRAME_H
 
 #include "core/math/vector2.h"
 #include "core/typedefs.h"
@@ -141,4 +141,4 @@ struct AudioFrame {
 	_ALWAYS_INLINE_ AudioFrame() {}
 };
 
-#endif
+#endif // AUDIO_FRAME_H

+ 1 - 0
core/math/basis.h

@@ -350,4 +350,5 @@ Basis Basis::lerp(const Basis &p_to, const real_t &p_weight) const {
 
 	return b;
 }
+
 #endif // BASIS_H

+ 1 - 1
core/math/bsp_tree.h

@@ -157,4 +157,4 @@ struct PtrToArg<const BSP_Tree &> {
 
 #endif
 
-#endif
+#endif // BSP_TREE_H

+ 1 - 1
core/math/camera_matrix.h

@@ -102,4 +102,4 @@ Vector3 CameraMatrix::xform(const Vector3 &p_vec3) const {
 	return ret / w;
 }
 
-#endif
+#endif // CAMERA_MATRIX_H

+ 1 - 1
core/math/disjoint_set.h

@@ -151,4 +151,4 @@ void DisjointSet<T, C, AL>::get_members(Vector<T> &out_members, T representative
 	}
 }
 
-#endif
+#endif // DISJOINT_SET_H

+ 1 - 1
core/math/geometry.h

@@ -1114,4 +1114,4 @@ private:
 	static Vector<Vector<Point2>> _polypath_offset(const Vector<Point2> &p_polypath, real_t p_delta, PolyJoinType p_join_type, PolyEndType p_end_type);
 };
 
-#endif
+#endif // GEOMETRY_H

+ 1 - 1
core/math/quat.h

@@ -228,4 +228,4 @@ bool Quat::operator!=(const Quat &p_quat) const {
 	return x != p_quat.x || y != p_quat.y || z != p_quat.z || w != p_quat.w;
 }
 
-#endif
+#endif // QUAT_H

+ 1 - 1
core/math/triangulate.h

@@ -58,4 +58,4 @@ private:
 	static bool snip(const Vector<Vector2> &p_contour, int u, int v, int w, int n, const Vector<int> &V, bool relaxed);
 };
 
-#endif
+#endif // TRIANGULATE_H

+ 1 - 1
core/method_bind.h

@@ -382,4 +382,4 @@ class __UnexistingClass;
 
 #include "method_bind.gen.inc"
 
-#endif
+#endif // METHOD_BIND_H

+ 2 - 1
core/method_ptrcall.h

@@ -448,5 +448,6 @@ struct PtrToArg<const PoolVector<Face3> &> {
 	}
 };
 
+#endif // PTRCALL_ENABLED
+
 #endif // METHOD_PTRCALL_H
-#endif

+ 1 - 1
core/node_path.h

@@ -102,4 +102,4 @@ public:
 	~NodePath();
 };
 
-#endif
+#endif // NODE_PATH_H

+ 1 - 1
core/oa_hash_map.h

@@ -376,4 +376,4 @@ public:
 	}
 };
 
-#endif
+#endif // OA_HASH_MAP_H

+ 1 - 1
core/object.h

@@ -808,4 +808,4 @@ public:
 //needed by macros
 #include "core/class_db.h"
 
-#endif
+#endif // OBJECT_H

+ 3 - 3
core/object_id.h

@@ -28,11 +28,11 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 
-#ifndef OBJECTID_H
-#define OBJECTID_H
+#ifndef OBJECT_ID_H
+#define OBJECT_ID_H
 
 #include "core/int_types.h"
 
 typedef uint64_t ObjectID;
 
-#endif
+#endif // OBJECT_ID_H

+ 3 - 3
core/object_rc.h

@@ -28,8 +28,8 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 
-#ifndef OBJECTRC_H
-#define OBJECTRC_H
+#ifndef OBJECT_RC_H
+#define OBJECT_RC_H
 
 #include "core/os/memory.h"
 #include "core/typedefs.h"
@@ -74,4 +74,4 @@ public:
 	}
 };
 
-#endif
+#endif // OBJECT_RC_H

+ 1 - 1
core/os/dir_access.h

@@ -157,4 +157,4 @@ struct DirAccessRef {
 	}
 };
 
-#endif
+#endif // DIR_ACCESS_H

+ 1 - 1
core/os/file_access.h

@@ -197,4 +197,4 @@ struct FileAccessRef {
 	}
 };
 
-#endif
+#endif // FILE_ACCESS_H

+ 1 - 1
core/os/input_event.h

@@ -649,4 +649,4 @@ public:
 	InputEventMIDI();
 };
 
-#endif
+#endif // INPUT_EVENT_H

+ 1 - 1
core/os/keyboard.h

@@ -325,4 +325,4 @@ int keycode_get_count();
 int keycode_get_value_by_index(int p_index);
 const char *keycode_get_name_by_index(int p_index);
 
-#endif
+#endif // KEYBOARD_H

+ 1 - 1
core/os/main_loop.h

@@ -81,4 +81,4 @@ public:
 	virtual ~MainLoop();
 };
 
-#endif
+#endif // MAIN_LOOP_H

+ 1 - 1
core/os/memory.h

@@ -202,4 +202,4 @@ struct _GlobalNilClass {
 	static _GlobalNil _nil;
 };
 
-#endif
+#endif // MEMORY_H

+ 1 - 1
core/os/midi_driver.h

@@ -57,4 +57,4 @@ public:
 	virtual ~MIDIDriver() {}
 };
 
-#endif
+#endif // MIDI_DRIVER_H

+ 1 - 1
core/os/os.h

@@ -620,4 +620,4 @@ public:
 
 VARIANT_ENUM_CAST(OS::PowerState);
 
-#endif
+#endif // OS_H

+ 3 - 3
core/os/rw_lock.h

@@ -28,8 +28,8 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 
-#ifndef RWLOCK_H
-#define RWLOCK_H
+#ifndef RW_LOCK_H
+#define RW_LOCK_H
 
 #include "core/error_list.h"
 
@@ -113,4 +113,4 @@ public:
 	}
 };
 
-#endif // RWLOCK_H
+#endif // RW_LOCK_H

+ 1 - 0
core/os/spin_lock.h

@@ -48,4 +48,5 @@ public:
 		locked.clear(std::memory_order_release);
 	}
 };
+
 #endif // SPIN_LOCK_H

+ 1 - 1
core/os/thread_safe.h

@@ -38,4 +38,4 @@
 #define _THREAD_SAFE_LOCK_ _thread_safe_.lock();
 #define _THREAD_SAFE_UNLOCK_ _thread_safe_.unlock();
 
-#endif
+#endif // THREAD_SAFE_H

+ 1 - 1
core/os/thread_work_pool.h

@@ -154,4 +154,4 @@ public:
 	~ThreadWorkPool();
 };
 
-#endif // THREAD_POOL_H
+#endif // THREAD_WORK_POOL_H

+ 1 - 1
core/pool_allocator.h

@@ -147,4 +147,4 @@ public:
 	virtual ~PoolAllocator();
 };
 
-#endif
+#endif // POOL_ALLOCATOR_H

+ 1 - 1
core/print_string.h

@@ -59,4 +59,4 @@ extern void print_line(String p_string);
 extern void print_error(String p_string);
 extern void print_verbose(String p_string);
 
-#endif
+#endif // PRINT_STRING_H

+ 3 - 3
core/project_settings.h

@@ -28,8 +28,8 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 
-#ifndef GLOBAL_CONFIG_H
-#define GLOBAL_CONFIG_H
+#ifndef PROJECT_SETTINGS_H
+#define PROJECT_SETTINGS_H
 
 #include "core/object.h"
 #include "core/os/thread_safe.h"
@@ -218,4 +218,4 @@ Variant _GLOBAL_DEF_ALIAS(const String &p_var, const String &p_old_name, const V
 #define GLOBAL_DEF_ALIAS_RST(m_var, m_old_name, m_value) _GLOBAL_DEF(m_var, m_old_name, m_value, true)
 #define GLOBAL_GET(m_var) ProjectSettings::get_singleton()->get(m_var)
 
-#endif
+#endif // PROJECT_SETTINGS_H

+ 1 - 0
core/ref_ptr.h

@@ -30,6 +30,7 @@
 
 #ifndef REF_PTR_H
 #define REF_PTR_H
+
 /**
 	@author Juan Linietsky <[email protected]>
  * This class exists to workaround a limitation in C++ but keep the design OK.

+ 1 - 1
core/register_core_types.h

@@ -36,4 +36,4 @@ void register_core_settings();
 void register_core_singletons();
 void unregister_core_types();
 
-#endif
+#endif // REGISTER_CORE_TYPES_H

+ 1 - 1
core/resource.h

@@ -164,4 +164,4 @@ public:
 	static int get_cached_resource_count();
 };
 
-#endif
+#endif // RESOURCE_H

+ 1 - 1
core/rid.h

@@ -191,4 +191,4 @@ public:
 
 #endif // not handles
 
-#endif
+#endif // RID_H

+ 3 - 3
core/ring_buffer.h

@@ -28,8 +28,8 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 
-#ifndef RINGBUFFER_H
-#define RINGBUFFER_H
+#ifndef RING_BUFFER_H
+#define RING_BUFFER_H
 
 #include "core/vector.h"
 
@@ -219,4 +219,4 @@ public:
 	~RingBuffer<T>(){};
 };
 
-#endif
+#endif // RING_BUFFER_H

+ 1 - 1
core/script_language.h

@@ -468,4 +468,4 @@ public:
 	virtual ~ScriptDebugger() { singleton = nullptr; }
 };
 
-#endif
+#endif // SCRIPT_LANGUAGE_H

+ 1 - 1
core/set.h

@@ -629,4 +629,4 @@ public:
 	}
 };
 
-#endif
+#endif // SET_H

+ 1 - 1
core/simple_type.h

@@ -48,4 +48,4 @@ struct GetSimpleTypeT<T const> {
 	typedef T type_t;
 };
 
-#endif
+#endif // SIMPLE_TYPE_H

+ 1 - 1
core/string_buffer.h

@@ -163,4 +163,4 @@ int64_t StringBuffer<SHORT_BUFFER_SIZE>::as_int() {
 	return String::to_int(current_buffer_ptr());
 }
 
-#endif
+#endif // STRING_BUFFER_H

+ 3 - 3
core/type_info.h

@@ -28,8 +28,8 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 
-#ifndef GET_TYPE_INFO_H
-#define GET_TYPE_INFO_H
+#ifndef TYPE_INFO_H
+#define TYPE_INFO_H
 
 template <bool C, typename T = void>
 struct EnableIf {
@@ -282,4 +282,4 @@ inline StringName __constant_get_enum_name(T param, const String &p_constant) {
 #define MAKE_ENUM_TYPE_INFO(m_enum)
 #define CLASS_INFO(m_type)
 
-#endif // GET_TYPE_INFO_H
+#endif // TYPE_INFO_H

+ 2 - 1
core/ucaps.h

@@ -1411,4 +1411,5 @@ static int _find_lower(int ch) {
 
 	return ch;
 }
-#endif
+
+#endif // UCAPS_H

+ 3 - 3
core/ustring.h

@@ -28,8 +28,8 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 
-#ifndef USTRING_H
-#define USTRING_H
+#ifndef USTRING_GODOT_H
+#define USTRING_GODOT_H
 
 #include "core/array.h"
 #include "core/cowdata.h"
@@ -455,4 +455,4 @@ String RTR(const String &);
 bool is_symbol(CharType c);
 bool select_word(const String &p_s, int p_col, int &r_beg, int &r_end);
 
-#endif // USTRING_H
+#endif // USTRING_GODOT_H

+ 2 - 1
core/variant.h

@@ -467,4 +467,5 @@ const Variant::ObjData &Variant::_get_obj() const {
 }
 
 String vformat(const String &p_text, const Variant &p1 = Variant(), const Variant &p2 = Variant(), const Variant &p3 = Variant(), const Variant &p4 = Variant(), const Variant &p5 = Variant());
-#endif
+
+#endif // VARIANT_H

+ 1 - 1
core/vector.h

@@ -200,4 +200,4 @@ void Vector<T>::fill(T p_elem) {
 	}
 }
 
-#endif
+#endif // VECTOR_H

+ 3 - 3
core/version.h

@@ -28,8 +28,8 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 
-#ifndef GODOT_VERSION_H
-#define GODOT_VERSION_H
+#ifndef VERSION_H
+#define VERSION_H
 
 #include "core/version_generated.gen.h"
 
@@ -71,4 +71,4 @@
 // Git commit hash, generated at build time in `core/version_hash.gen.cpp`.
 extern const char *const VERSION_HASH;
 
-#endif // GODOT_VERSION_H
+#endif // VERSION_H

+ 1 - 0
core/vmap.h

@@ -199,4 +199,5 @@ public:
 		return *this;
 	}
 };
+
 #endif // VMAP_H

+ 1 - 1
drivers/coreaudio/audio_driver_coreaudio.h

@@ -122,4 +122,4 @@ public:
 
 #endif
 
-#endif
+#endif // AUDIO_DRIVER_COREAUDIO_H

+ 4 - 3
drivers/coremidi/midi_driver_coremidi.h

@@ -28,11 +28,11 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 
-#ifdef COREMIDI_ENABLED
-
 #ifndef MIDI_DRIVER_COREMIDI_H
 #define MIDI_DRIVER_COREMIDI_H
 
+#ifdef COREMIDI_ENABLED
+
 #include "core/os/midi_driver.h"
 #include "core/vector.h"
 
@@ -57,5 +57,6 @@ public:
 	virtual ~MIDIDriverCoreMidi();
 };
 
-#endif // MIDI_DRIVER_COREMIDI_H
 #endif // COREMIDI_ENABLED
+
+#endif // MIDI_DRIVER_COREMIDI_H

+ 3 - 3
drivers/gles2/rasterizer_canvas_base_gles2.h

@@ -28,8 +28,8 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 
-#ifndef RASTERIZERCANVASBASEGLES2_H
-#define RASTERIZERCANVASBASEGLES2_H
+#ifndef RASTERIZER_CANVAS_BASE_GLES2_H
+#define RASTERIZER_CANVAS_BASE_GLES2_H
 
 #include "drivers/gles_common/rasterizer_array.h"
 #include "rasterizer_storage_gles2.h"
@@ -145,4 +145,4 @@ public:
 	RasterizerCanvasBaseGLES2();
 };
 
-#endif // RASTERIZERCANVASBASEGLES2_H
+#endif // RASTERIZER_CANVAS_BASE_GLES2_H

+ 3 - 3
drivers/gles2/rasterizer_canvas_gles2.h

@@ -28,8 +28,8 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 
-#ifndef RASTERIZERCANVASGLES2_H
-#define RASTERIZERCANVASGLES2_H
+#ifndef RASTERIZER_CANVAS_GLES2_H
+#define RASTERIZER_CANVAS_GLES2_H
 
 #include "drivers/gles_common/rasterizer_canvas_batcher.h"
 #include "rasterizer_canvas_base_gles2.h"
@@ -70,4 +70,4 @@ public:
 	RasterizerCanvasGLES2();
 };
 
-#endif // RASTERIZERCANVASGLES2_H
+#endif // RASTERIZER_CANVAS_GLES2_H

+ 3 - 3
drivers/gles2/rasterizer_gles2.h

@@ -28,8 +28,8 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 
-#ifndef RASTERIZERGLES2_H
-#define RASTERIZERGLES2_H
+#ifndef RASTERIZER_GLES2_H
+#define RASTERIZER_GLES2_H
 
 #include "rasterizer_canvas_gles2.h"
 #include "rasterizer_scene_gles2.h"
@@ -76,4 +76,4 @@ public:
 	~RasterizerGLES2();
 };
 
-#endif // RASTERIZERGLES2_H
+#endif // RASTERIZER_GLES2_H

+ 3 - 4
drivers/gles2/rasterizer_scene_gles2.h

@@ -28,8 +28,8 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 
-#ifndef RASTERIZERSCENEGLES2_H
-#define RASTERIZERSCENEGLES2_H
+#ifndef RASTERIZER_SCENE_GLES2_H
+#define RASTERIZER_SCENE_GLES2_H
 
 /* Must come before shaders or the Windows build fails... */
 #include "rasterizer_storage_gles2.h"
@@ -40,7 +40,6 @@
 #include "shaders/tonemap.glsl.gen.h"
 /*
 
-
 #include "drivers/gles3/shaders/exposure.glsl.gen.h"
 #include "drivers/gles3/shaders/resolve.glsl.gen.h"
 #include "drivers/gles3/shaders/scene.glsl.gen.h"
@@ -780,4 +779,4 @@ public:
 	~RasterizerSceneGLES2();
 };
 
-#endif // RASTERIZERSCENEGLES2_H
+#endif // RASTERIZER_SCENE_GLES2_H

+ 3 - 3
drivers/gles2/rasterizer_storage_gles2.h

@@ -28,8 +28,8 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 
-#ifndef RASTERIZERSTORAGEGLES2_H
-#define RASTERIZERSTORAGEGLES2_H
+#ifndef RASTERIZER_STORAGE_GLES2_H
+#define RASTERIZER_STORAGE_GLES2_H
 
 #include "core/pool_vector.h"
 #include "core/self_list.h"
@@ -1404,4 +1404,4 @@ inline void RasterizerStorageGLES2::buffer_orphan_and_upload(unsigned int p_buff
 	glBufferSubData(p_target, p_offset_bytes, p_data_size_bytes, p_data);
 }
 
-#endif // RASTERIZERSTORAGEGLES2_H
+#endif // RASTERIZER_STORAGE_GLES2_H

+ 3 - 3
drivers/gles2/shader_compiler_gles2.h

@@ -28,8 +28,8 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 
-#ifndef SHADERCOMPILERGLES2_H
-#define SHADERCOMPILERGLES2_H
+#ifndef SHADER_COMPILER_GLES2_H
+#define SHADER_COMPILER_GLES2_H
 
 #include "core/pair.h"
 #include "core/string_builder.h"
@@ -98,4 +98,4 @@ public:
 	ShaderCompilerGLES2();
 };
 
-#endif // SHADERCOMPILERGLES2_H
+#endif // SHADER_COMPILER_GLES2_H

+ 1 - 1
drivers/gles2/shader_gles2.h

@@ -270,4 +270,4 @@ void ShaderGLES2::_set_conditional(int p_which, bool p_value) {
 	}
 }
 
-#endif
+#endif // SHADER_GLES2_H

+ 3 - 3
drivers/gles3/rasterizer_canvas_base_gles3.h

@@ -28,8 +28,8 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 
-#ifndef RASTERIZERCANVASBASEGLES3_H
-#define RASTERIZERCANVASBASEGLES3_H
+#ifndef RASTERIZER_CANVAS_BASE_GLES3_H
+#define RASTERIZER_CANVAS_BASE_GLES3_H
 
 #include "rasterizer_storage_gles3.h"
 #include "servers/visual/rasterizer.h"
@@ -159,4 +159,4 @@ public:
 	RasterizerCanvasBaseGLES3();
 };
 
-#endif // RASTERIZERCANVASBASEGLES3_H
+#endif // RASTERIZER_CANVAS_BASE_GLES3_H

+ 3 - 3
drivers/gles3/rasterizer_canvas_gles3.h

@@ -28,8 +28,8 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 
-#ifndef RASTERIZERCANVASGLES3_H
-#define RASTERIZERCANVASGLES3_H
+#ifndef RASTERIZER_CANVAS_GLES3_H
+#define RASTERIZER_CANVAS_GLES3_H
 
 #include "drivers/gles_common/rasterizer_canvas_batcher.h"
 #include "rasterizer_canvas_base_gles3.h"
@@ -75,4 +75,4 @@ public:
 	RasterizerCanvasGLES3();
 };
 
-#endif // RASTERIZERCANVASGLES3_H
+#endif // RASTERIZER_CANVAS_GLES3_H

+ 3 - 3
drivers/gles3/rasterizer_gles3.h

@@ -28,8 +28,8 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 
-#ifndef RASTERIZERGLES3_H
-#define RASTERIZERGLES3_H
+#ifndef RASTERIZER_GLES3_H
+#define RASTERIZER_GLES3_H
 
 #include "rasterizer_canvas_gles3.h"
 #include "rasterizer_scene_gles3.h"
@@ -76,4 +76,4 @@ public:
 	~RasterizerGLES3();
 };
 
-#endif // RASTERIZERGLES3_H
+#endif // RASTERIZER_GLES3_H

+ 3 - 3
drivers/gles3/rasterizer_scene_gles3.h

@@ -28,8 +28,8 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 
-#ifndef RASTERIZERSCENEGLES3_H
-#define RASTERIZERSCENEGLES3_H
+#ifndef RASTERIZER_SCENE_GLES3_H
+#define RASTERIZER_SCENE_GLES3_H
 
 /* Must come before shaders or the Windows build fails... */
 #include "rasterizer_storage_gles3.h"
@@ -870,4 +870,4 @@ public:
 	~RasterizerSceneGLES3();
 };
 
-#endif // RASTERIZERSCENEGLES3_H
+#endif // RASTERIZER_SCENE_GLES3_H

+ 3 - 3
drivers/gles3/rasterizer_storage_gles3.h

@@ -28,8 +28,8 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 
-#ifndef RASTERIZERSTORAGEGLES3_H
-#define RASTERIZERSTORAGEGLES3_H
+#ifndef RASTERIZER_STORAGE_GLES3_H
+#define RASTERIZER_STORAGE_GLES3_H
 
 #include "core/self_list.h"
 #include "drivers/gles_common/rasterizer_asserts.h"
@@ -1559,4 +1559,4 @@ inline void RasterizerStorageGLES3::buffer_orphan_and_upload(unsigned int p_buff
 	glBufferSubData(p_target, p_offset_bytes, p_data_size_bytes, p_data);
 }
 
-#endif // RASTERIZERSTORAGEGLES3_H
+#endif // RASTERIZER_STORAGE_GLES3_H

+ 1 - 1
drivers/gles3/shader_cache_gles3.h

@@ -55,4 +55,4 @@ public:
 	~ShaderCacheGLES3();
 };
 
-#endif
+#endif // SHADER_CACHE_GLES3_H

+ 3 - 3
drivers/gles3/shader_compiler_gles3.h

@@ -28,8 +28,8 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 
-#ifndef SHADERCOMPILERGLES3_H
-#define SHADERCOMPILERGLES3_H
+#ifndef SHADER_COMPILER_GLES3_H
+#define SHADER_COMPILER_GLES3_H
 
 #include "core/pair.h"
 #include "servers/visual/shader_language.h"
@@ -100,4 +100,4 @@ public:
 	ShaderCompilerGLES3();
 };
 
-#endif // SHADERCOMPILERGLES3_H
+#endif // SHADER_COMPILER_GLES3_H

+ 1 - 1
drivers/gles3/shader_gles3.h

@@ -447,4 +447,4 @@ void ShaderGLES3::_set_conditional(int p_which, bool p_value) {
 	}
 }
 
-#endif
+#endif // SHADER_GLES3_H

+ 1 - 1
drivers/png/image_loader_png.h

@@ -45,4 +45,4 @@ public:
 	ImageLoaderPNG();
 };
 
-#endif
+#endif // IMAGE_LOADER_PNG_H

+ 1 - 1
drivers/png/png_driver_common.h

@@ -45,4 +45,4 @@ Error image_to_png(const Ref<Image> &p_image, PoolVector<uint8_t> &p_buffer);
 
 } // namespace PNGDriverCommon
 
-#endif
+#endif // PNG_DRIVER_COMMON_H

+ 1 - 1
drivers/register_driver_types.h

@@ -37,4 +37,4 @@ void unregister_core_driver_types();
 void register_driver_types();
 void unregister_driver_types();
 
-#endif
+#endif // REGISTER_DRIVER_TYPES_H

+ 1 - 1
drivers/unix/dir_access_unix.cpp

@@ -479,4 +479,4 @@ DirAccessUnix::~DirAccessUnix() {
 	list_dir_end();
 }
 
-#endif //posix_enabled
+#endif // UNIX_ENABLED || LIBC_FILEIO_ENABLED

+ 3 - 2
drivers/unix/dir_access_unix.h

@@ -88,5 +88,6 @@ public:
 	~DirAccessUnix();
 };
 
-#endif //UNIX ENABLED
-#endif
+#endif // UNIX_ENABLED || LIBC_FILEIO_ENABLED
+
+#endif // DIR_ACCESS_UNIX_H

+ 1 - 1
drivers/unix/file_access_unix.cpp

@@ -347,4 +347,4 @@ FileAccessUnix::~FileAccessUnix() {
 	close();
 }
 
-#endif
+#endif // UNIX_ENABLED || LIBC_FILEIO_ENABLED

+ 3 - 2
drivers/unix/file_access_unix.h

@@ -85,5 +85,6 @@ public:
 	virtual ~FileAccessUnix();
 };
 
-#endif
-#endif
+#endif // UNIX_ENABLED || LIBC_FILEIO_ENABLED
+
+#endif // FILE_ACCESS_UNIX_H

+ 1 - 0
drivers/unix/ip_unix.h

@@ -50,4 +50,5 @@ public:
 };
 
 #endif
+
 #endif // IP_UNIX_H

+ 3 - 3
drivers/unix/net_socket_posix.h

@@ -28,8 +28,8 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 
-#ifndef NET_SOCKET_UNIX_H
-#define NET_SOCKET_UNIX_H
+#ifndef NET_SOCKET_POSIX_H
+#define NET_SOCKET_POSIX_H
 
 #include "core/io/net_socket.h"
 
@@ -101,4 +101,4 @@ public:
 	~NetSocketPosix();
 };
 
-#endif
+#endif // NET_SOCKET_POSIX_H

+ 1 - 1
drivers/unix/os_unix.h

@@ -111,4 +111,4 @@ public:
 
 #endif
 
-#endif
+#endif // OS_UNIX_H

+ 1 - 1
drivers/unix/syslog_logger.h

@@ -45,4 +45,4 @@ public:
 
 #endif
 
-#endif
+#endif // SYSLOG_LOGGER_H

Some files were not shown because too many files changed in this diff