2
0
Эх сурвалжийг харах

Style: Cleanup header guards for consistency

Fix file names for {Static,Lightmap}RaycasterEmbree.
Rémi Verschelde 3 жил өмнө
parent
commit
49fcf4ffad
30 өөрчлөгдсөн 106 нэмэгдсэн , 70 устгасан
  1. 3 3
      core/math/convex_hull.h
  2. 2 2
      core/string/ustring.h
  3. 4 1
      core/templates/pooled_list.h
  4. 2 2
      editor/debugger/editor_debugger_tree.h
  5. 17 0
      misc/scripts/header_guards.sh
  6. 5 0
      modules/gltf/register_types.h
  7. 2 2
      modules/mono/utils/macos_utils.h
  8. 3 3
      modules/raycast/lightmap_raycaster_embree.cpp
  9. 7 2
      modules/raycast/lightmap_raycaster_embree.h
  10. 2 2
      modules/raycast/register_types.cpp
  11. 5 0
      modules/raycast/register_types.h
  12. 3 3
      modules/raycast/static_raycaster_embree.cpp
  13. 7 2
      modules/raycast/static_raycaster_embree.h
  14. 0 3
      platform/android/java_godot_io_wrapper.h
  15. 0 3
      platform/android/java_godot_wrapper.h
  16. 3 3
      platform/ios/os_ios.h
  17. 5 3
      platform/linuxbsd/detect_prime_x11.h
  18. 3 3
      platform/macos/export/codesign.h
  19. 2 2
      platform/macos/export/lipo.h
  20. 2 2
      platform/macos/export/macho.h
  21. 2 2
      platform/macos/export/plist.h
  22. 3 3
      scene/animation/easing_equations.h
  23. 3 3
      scene/resources/particle_process_material.h
  24. 3 3
      scene/resources/sky_material.h
  25. 3 3
      servers/physics_3d/joints/godot_cone_twist_joint_3d.h
  26. 3 3
      servers/physics_3d/joints/godot_generic_6dof_joint_3d.h
  27. 3 3
      servers/physics_3d/joints/godot_hinge_joint_3d.h
  28. 3 3
      servers/physics_3d/joints/godot_jacobian_entry_3d.h
  29. 3 3
      servers/physics_3d/joints/godot_pin_joint_3d.h
  30. 3 3
      servers/physics_3d/joints/godot_slider_joint_3d.h

+ 3 - 3
core/math/convex_hull.h

@@ -28,6 +28,9 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 /*************************************************************************/
 
 
+#ifndef CONVEX_HULL_H
+#define CONVEX_HULL_H
+
 /*
 /*
 Copyright (c) 2011 Ole Kniemeyer, MAXON, www.maxon.net
 Copyright (c) 2011 Ole Kniemeyer, MAXON, www.maxon.net
 This software is provided 'as-is', without any express or implied warranty.
 This software is provided 'as-is', without any express or implied warranty.
@@ -40,9 +43,6 @@ subject to the following restrictions:
 3. This notice may not be removed or altered from any source distribution.
 3. This notice may not be removed or altered from any source distribution.
 */
 */
 
 
-#ifndef CONVEX_HULL_H
-#define CONVEX_HULL_H
-
 #include "core/math/geometry_3d.h"
 #include "core/math/geometry_3d.h"
 #include "core/math/vector3.h"
 #include "core/math/vector3.h"
 #include "core/templates/local_vector.h"
 #include "core/templates/local_vector.h"

+ 2 - 2
core/string/ustring.h

@@ -28,11 +28,11 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 /*************************************************************************/
 
 
-// Note: _GODOT suffix added to avoid conflict with ICU header with the same guard.
-
 #ifndef USTRING_GODOT_H
 #ifndef USTRING_GODOT_H
 #define USTRING_GODOT_H
 #define USTRING_GODOT_H
 
 
+// Note: _GODOT suffix added to header guard to avoid conflict with ICU header.
+
 #include "core/string/char_utils.h"
 #include "core/string/char_utils.h"
 #include "core/templates/cowdata.h"
 #include "core/templates/cowdata.h"
 #include "core/templates/vector.h"
 #include "core/templates/vector.h"

+ 4 - 1
core/templates/pooled_list.h

@@ -28,7 +28,8 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 /*************************************************************************/
 
 
-#pragma once
+#ifndef POOLED_LIST_H
+#define POOLED_LIST_H
 
 
 // Simple template to provide a pool with O(1) allocate and free.
 // Simple template to provide a pool with O(1) allocate and free.
 // The freelist could alternatively be a linked list placed within the unused elements
 // The freelist could alternatively be a linked list placed within the unused elements
@@ -206,3 +207,5 @@ private:
 	LocalVector<U, U> _active_map;
 	LocalVector<U, U> _active_map;
 	LocalVector<U, U> _active_list;
 	LocalVector<U, U> _active_list;
 };
 };
+
+#endif // POOLED_LIST_H

+ 2 - 2
editor/debugger/editor_debugger_tree.h

@@ -28,11 +28,11 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 /*************************************************************************/
 
 
-#include "scene/gui/tree.h"
-
 #ifndef EDITOR_DEBUGGER_TREE_H
 #ifndef EDITOR_DEBUGGER_TREE_H
 #define EDITOR_DEBUGGER_TREE_H
 #define EDITOR_DEBUGGER_TREE_H
 
 
+#include "scene/gui/tree.h"
+
 class SceneDebuggerTree;
 class SceneDebuggerTree;
 class EditorFileDialog;
 class EditorFileDialog;
 
 

+ 17 - 0
misc/scripts/header_guards.sh

@@ -5,11 +5,15 @@ if [ ! -f "version.py" ]; then
   echo "Some of the paths checks may not work as intended from a different folder."
   echo "Some of the paths checks may not work as intended from a different folder."
 fi
 fi
 
 
+files_invalid_guard=""
+
 for file in $(find -name "thirdparty" -prune -o -name "*.h" -print); do
 for file in $(find -name "thirdparty" -prune -o -name "*.h" -print); do
   # Skip *.gen.h and *-so_wrap.h, they're generated.
   # Skip *.gen.h and *-so_wrap.h, they're generated.
   if [[ "$file" == *".gen.h" || "$file" == *"-so_wrap.h" ]]; then continue; fi
   if [[ "$file" == *".gen.h" || "$file" == *"-so_wrap.h" ]]; then continue; fi
   # Has important define before normal header guards.
   # Has important define before normal header guards.
   if [[ "$file" == *"thread.h" || "$file" == *"platform_config.h" ]]; then continue; fi
   if [[ "$file" == *"thread.h" || "$file" == *"platform_config.h" ]]; then continue; fi
+  # Obj-C files don't use header guards.
+  if grep -q "#import " "$file"; then continue; fi
 
 
   bname=$(basename $file .h)
   bname=$(basename $file .h)
 
 
@@ -43,8 +47,21 @@ for file in $(find -name "thirdparty" -prune -o -name "*.h" -print); do
   sed -i $file -e "$ s/#endif.*/\n#endif \/\/ $guard/"
   sed -i $file -e "$ s/#endif.*/\n#endif \/\/ $guard/"
   # Removes redundant \n added before, if they weren't needed.
   # Removes redundant \n added before, if they weren't needed.
   sed -i $file -e "/^$/N;/^\n$/D"
   sed -i $file -e "/^$/N;/^\n$/D"
+
+  # Check that first ifndef (should be header guard) is at the expected position.
+  # If not it can mean we have some code before the guard that should be after.
+  # "31" is the expected line with the copyright header.
+  first_ifndef=$(grep -n -m 1 "ifndef" $file | sed 's/\([0-9]*\).*/\1/')
+  if [[ "$first_ifndef" != "31" ]]; then
+    files_invalid_guard+="$file\n"
+  fi
 done
 done
 
 
+if [[ ! -z "$files_invalid_guard" ]]; then
+  echo -e "The following files were found to have potentially invalid header guard:\n"
+  echo -e "$files_invalid_guard"
+fi
+
 diff=$(git diff --color)
 diff=$(git diff --color)
 
 
 # If no diff has been generated all is OK, clean up, and exit.
 # If no diff has been generated all is OK, clean up, and exit.

+ 5 - 0
modules/gltf/register_types.h

@@ -28,7 +28,12 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 /*************************************************************************/
 
 
+#ifndef GLTF_REGISTER_TYPES_H
+#define GLTF_REGISTER_TYPES_H
+
 #include "modules/register_module_types.h"
 #include "modules/register_module_types.h"
 
 
 void initialize_gltf_module(ModuleInitializationLevel p_level);
 void initialize_gltf_module(ModuleInitializationLevel p_level);
 void uninitialize_gltf_module(ModuleInitializationLevel p_level);
 void uninitialize_gltf_module(ModuleInitializationLevel p_level);
+
+#endif // GLTF_REGISTER_TYPES_H

+ 2 - 2
modules/mono/utils/macos_utils.h

@@ -28,13 +28,13 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 /*************************************************************************/
 
 
-#include "core/string/ustring.h"
-
 #ifndef MONO_MACOS_UTILS_H
 #ifndef MONO_MACOS_UTILS_H
 #define MONO_MACOS_UTILS_H
 #define MONO_MACOS_UTILS_H
 
 
 #ifdef MACOS_ENABLED
 #ifdef MACOS_ENABLED
 
 
+#include "core/string/ustring.h"
+
 bool macos_is_app_bundle_installed(const String &p_bundle_id);
 bool macos_is_app_bundle_installed(const String &p_bundle_id);
 
 
 #endif
 #endif

+ 3 - 3
modules/raycast/lightmap_raycaster.cpp → modules/raycast/lightmap_raycaster_embree.cpp

@@ -1,5 +1,5 @@
 /*************************************************************************/
 /*************************************************************************/
-/*  lightmap_raycaster.cpp                                               */
+/*  lightmap_raycaster_embree.cpp                                        */
 /*************************************************************************/
 /*************************************************************************/
 /*                       This file is part of:                           */
 /*                       This file is part of:                           */
 /*                           GODOT ENGINE                                */
 /*                           GODOT ENGINE                                */
@@ -30,7 +30,7 @@
 
 
 #ifdef TOOLS_ENABLED
 #ifdef TOOLS_ENABLED
 
 
-#include "lightmap_raycaster.h"
+#include "lightmap_raycaster_embree.h"
 
 
 #ifdef __SSE2__
 #ifdef __SSE2__
 #include <pmmintrin.h>
 #include <pmmintrin.h>
@@ -193,4 +193,4 @@ LightmapRaycasterEmbree::~LightmapRaycasterEmbree() {
 	}
 	}
 }
 }
 
 
-#endif
+#endif // TOOLS_ENABLED

+ 7 - 2
modules/raycast/lightmap_raycaster.h → modules/raycast/lightmap_raycaster_embree.h

@@ -1,5 +1,5 @@
 /*************************************************************************/
 /*************************************************************************/
-/*  lightmap_raycaster.h                                                 */
+/*  lightmap_raycaster_embree.h                                          */
 /*************************************************************************/
 /*************************************************************************/
 /*                       This file is part of:                           */
 /*                       This file is part of:                           */
 /*                           GODOT ENGINE                                */
 /*                           GODOT ENGINE                                */
@@ -28,6 +28,9 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 /*************************************************************************/
 
 
+#ifndef LIGHTMAP_RAYCASTER_EMBREE_H
+#define LIGHTMAP_RAYCASTER_EMBREE_H
+
 #ifdef TOOLS_ENABLED
 #ifdef TOOLS_ENABLED
 
 
 #include "core/io/image.h"
 #include "core/io/image.h"
@@ -74,4 +77,6 @@ public:
 	~LightmapRaycasterEmbree();
 	~LightmapRaycasterEmbree();
 };
 };
 
 
-#endif // LIGHTMAP_RAYCASTER_H
+#endif // TOOLS_ENABLED
+
+#endif // LIGHTMAP_RAYCASTER_EMBREE_H

+ 2 - 2
modules/raycast/register_types.cpp

@@ -30,9 +30,9 @@
 
 
 #include "register_types.h"
 #include "register_types.h"
 
 
-#include "lightmap_raycaster.h"
+#include "lightmap_raycaster_embree.h"
 #include "raycast_occlusion_cull.h"
 #include "raycast_occlusion_cull.h"
-#include "static_raycaster.h"
+#include "static_raycaster_embree.h"
 
 
 RaycastOcclusionCull *raycast_occlusion_cull = nullptr;
 RaycastOcclusionCull *raycast_occlusion_cull = nullptr;
 
 

+ 5 - 0
modules/raycast/register_types.h

@@ -28,7 +28,12 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 /*************************************************************************/
 
 
+#ifndef RAYCAST_REGISTER_TYPES_H
+#define RAYCAST_REGISTER_TYPES_H
+
 #include "modules/register_module_types.h"
 #include "modules/register_module_types.h"
 
 
 void initialize_raycast_module(ModuleInitializationLevel p_level);
 void initialize_raycast_module(ModuleInitializationLevel p_level);
 void uninitialize_raycast_module(ModuleInitializationLevel p_level);
 void uninitialize_raycast_module(ModuleInitializationLevel p_level);
+
+#endif // RAYCAST_REGISTER_TYPES_H

+ 3 - 3
modules/raycast/static_raycaster.cpp → modules/raycast/static_raycaster_embree.cpp

@@ -1,5 +1,5 @@
 /*************************************************************************/
 /*************************************************************************/
-/*  static_raycaster.cpp                                                 */
+/*  static_raycaster_embree.cpp                                          */
 /*************************************************************************/
 /*************************************************************************/
 /*                       This file is part of:                           */
 /*                       This file is part of:                           */
 /*                           GODOT ENGINE                                */
 /*                           GODOT ENGINE                                */
@@ -30,7 +30,7 @@
 
 
 #ifdef TOOLS_ENABLED
 #ifdef TOOLS_ENABLED
 
 
-#include "static_raycaster.h"
+#include "static_raycaster_embree.h"
 
 
 #ifdef __SSE2__
 #ifdef __SSE2__
 #include <pmmintrin.h>
 #include <pmmintrin.h>
@@ -134,4 +134,4 @@ StaticRaycasterEmbree::~StaticRaycasterEmbree() {
 	}
 	}
 }
 }
 
 
-#endif
+#endif // TOOLS_ENABLED

+ 7 - 2
modules/raycast/static_raycaster.h → modules/raycast/static_raycaster_embree.h

@@ -1,5 +1,5 @@
 /*************************************************************************/
 /*************************************************************************/
-/*  static_raycaster.h                                                   */
+/*  static_raycaster_embree.h                                            */
 /*************************************************************************/
 /*************************************************************************/
 /*                       This file is part of:                           */
 /*                       This file is part of:                           */
 /*                           GODOT ENGINE                                */
 /*                           GODOT ENGINE                                */
@@ -28,6 +28,9 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 /*************************************************************************/
 
 
+#ifndef STATIC_RAYCASTER_EMBREE_H
+#define STATIC_RAYCASTER_EMBREE_H
+
 #ifdef TOOLS_ENABLED
 #ifdef TOOLS_ENABLED
 
 
 #include "core/math/static_raycaster.h"
 #include "core/math/static_raycaster.h"
@@ -61,4 +64,6 @@ public:
 	~StaticRaycasterEmbree();
 	~StaticRaycasterEmbree();
 };
 };
 
 
-#endif // STATIC_RAYCASTER_H
+#endif // TOOLS_ENABLED
+
+#endif // STATIC_RAYCASTER_EMBREE_H

+ 0 - 3
platform/android/java_godot_io_wrapper.h

@@ -28,9 +28,6 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 /*************************************************************************/
 
 
-// note, swapped java and godot around in the file name so all the java
-// wrappers are together
-
 #ifndef JAVA_GODOT_IO_WRAPPER_H
 #ifndef JAVA_GODOT_IO_WRAPPER_H
 #define JAVA_GODOT_IO_WRAPPER_H
 #define JAVA_GODOT_IO_WRAPPER_H
 
 

+ 0 - 3
platform/android/java_godot_wrapper.h

@@ -28,9 +28,6 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 /*************************************************************************/
 
 
-// note, swapped java and godot around in the file name so all the java
-// wrappers are together
-
 #ifndef JAVA_GODOT_WRAPPER_H
 #ifndef JAVA_GODOT_WRAPPER_H
 #define JAVA_GODOT_WRAPPER_H
 #define JAVA_GODOT_WRAPPER_H
 
 

+ 3 - 3
platform/ios/os_ios.h

@@ -28,11 +28,11 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 /*************************************************************************/
 
 
-#ifdef IOS_ENABLED
-
 #ifndef OS_IOS_H
 #ifndef OS_IOS_H
 #define OS_IOS_H
 #define OS_IOS_H
 
 
+#ifdef IOS_ENABLED
+
 #include "drivers/coreaudio/audio_driver_coreaudio.h"
 #include "drivers/coreaudio/audio_driver_coreaudio.h"
 #include "drivers/unix/os_unix.h"
 #include "drivers/unix/os_unix.h"
 #include "ios.h"
 #include "ios.h"
@@ -124,6 +124,6 @@ public:
 	void on_focus_in();
 	void on_focus_in();
 };
 };
 
 
-#endif // OS_IOS_H
+#endif // IOS_ENABLED
 
 
 #endif // OS_IOS_H
 #endif // OS_IOS_H

+ 5 - 3
platform/linuxbsd/detect_prime_x11.h

@@ -28,11 +28,13 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 /*************************************************************************/
 
 
-#ifdef X11_ENABLED
-#if defined(GLES3_ENABLED)
+#ifndef DETECT_PRIME_X11_H
+#define DETECT_PRIME_X11_H
+
+#if defined(X11_ENABLED) && defined(GLES3_ENABLED)
 
 
 int detect_prime();
 int detect_prime();
 
 
-#endif
+#endif // X11_ENABLED && GLES3_ENABLED
 
 
 #endif // DETECT_PRIME_X11_H
 #endif // DETECT_PRIME_X11_H

+ 3 - 3
platform/macos/export/codesign.h

@@ -28,6 +28,9 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 /*************************************************************************/
 
 
+#ifndef MACOS_CODESIGN_H
+#define MACOS_CODESIGN_H
+
 // macOS code signature creation utility.
 // macOS code signature creation utility.
 //
 //
 // Current implementation has the following limitation:
 // Current implementation has the following limitation:
@@ -38,9 +41,6 @@
 //  - Requirements code generator is not implemented (only hard-coded requirements for the ad-hoc signing is supported).
 //  - Requirements code generator is not implemented (only hard-coded requirements for the ad-hoc signing is supported).
 //  - RFC5652/CMS blob generation is not implemented, supports ad-hoc signing only.
 //  - RFC5652/CMS blob generation is not implemented, supports ad-hoc signing only.
 
 
-#ifndef MACOS_CODESIGN_H
-#define MACOS_CODESIGN_H
-
 #include "core/crypto/crypto_core.h"
 #include "core/crypto/crypto_core.h"
 #include "core/io/dir_access.h"
 #include "core/io/dir_access.h"
 #include "core/io/file_access.h"
 #include "core/io/file_access.h"

+ 2 - 2
platform/macos/export/lipo.h

@@ -28,11 +28,11 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 /*************************************************************************/
 
 
-// Universal / Universal 2 fat binary file creator and extractor.
-
 #ifndef MACOS_LIPO_H
 #ifndef MACOS_LIPO_H
 #define MACOS_LIPO_H
 #define MACOS_LIPO_H
 
 
+// Universal / Universal 2 fat binary file creator and extractor.
+
 #include "core/io/file_access.h"
 #include "core/io/file_access.h"
 #include "core/object/ref_counted.h"
 #include "core/object/ref_counted.h"
 #include "modules/modules_enabled.gen.h" // For regex.
 #include "modules/modules_enabled.gen.h" // For regex.

+ 2 - 2
platform/macos/export/macho.h

@@ -28,11 +28,11 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 /*************************************************************************/
 
 
-// Mach-O binary object file format parser and editor.
-
 #ifndef MACOS_MACHO_H
 #ifndef MACOS_MACHO_H
 #define MACOS_MACHO_H
 #define MACOS_MACHO_H
 
 
+// Mach-O binary object file format parser and editor.
+
 #include "core/crypto/crypto.h"
 #include "core/crypto/crypto.h"
 #include "core/crypto/crypto_core.h"
 #include "core/crypto/crypto_core.h"
 #include "core/io/file_access.h"
 #include "core/io/file_access.h"

+ 2 - 2
platform/macos/export/plist.h

@@ -28,11 +28,11 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 /*************************************************************************/
 
 
-// Property list file format (application/x-plist) parser, property list ASN-1 serialization.
-
 #ifndef MACOS_PLIST_H
 #ifndef MACOS_PLIST_H
 #define MACOS_PLIST_H
 #define MACOS_PLIST_H
 
 
+// Property list file format (application/x-plist) parser, property list ASN-1 serialization.
+
 #include "core/crypto/crypto_core.h"
 #include "core/crypto/crypto_core.h"
 #include "core/io/file_access.h"
 #include "core/io/file_access.h"
 #include "modules/modules_enabled.gen.h" // For regex.
 #include "modules/modules_enabled.gen.h" // For regex.

+ 3 - 3
scene/animation/easing_equations.h

@@ -28,6 +28,9 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 /*************************************************************************/
 
 
+#ifndef EASING_EQUATIONS_H
+#define EASING_EQUATIONS_H
+
 /*
 /*
  * Derived from Robert Penner's easing equations: http://robertpenner.com/easing/
  * Derived from Robert Penner's easing equations: http://robertpenner.com/easing/
  *
  *
@@ -52,9 +55,6 @@
  * SOFTWARE.
  * SOFTWARE.
  */
  */
 
 
-#ifndef EASING_EQUATIONS_H
-#define EASING_EQUATIONS_H
-
 namespace linear {
 namespace linear {
 static real_t in(real_t t, real_t b, real_t c, real_t d) {
 static real_t in(real_t t, real_t b, real_t c, real_t d) {
 	return c * t / d + b;
 	return c * t / d + b;

+ 3 - 3
scene/resources/particle_process_material.h

@@ -28,12 +28,12 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 /*************************************************************************/
 
 
-#include "core/templates/rid.h"
-#include "scene/resources/material.h"
-
 #ifndef PARTICLE_PROCESS_MATERIAL_H
 #ifndef PARTICLE_PROCESS_MATERIAL_H
 #define PARTICLE_PROCESS_MATERIAL_H
 #define PARTICLE_PROCESS_MATERIAL_H
 
 
+#include "core/templates/rid.h"
+#include "scene/resources/material.h"
+
 /*
 /*
  TODO:
  TODO:
 -Path following
 -Path following

+ 3 - 3
scene/resources/sky_material.h

@@ -28,12 +28,12 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 /*************************************************************************/
 
 
-#include "core/templates/rid.h"
-#include "scene/resources/material.h"
-
 #ifndef SKY_MATERIAL_H
 #ifndef SKY_MATERIAL_H
 #define SKY_MATERIAL_H
 #define SKY_MATERIAL_H
 
 
+#include "core/templates/rid.h"
+#include "scene/resources/material.h"
+
 class ProceduralSkyMaterial : public Material {
 class ProceduralSkyMaterial : public Material {
 	GDCLASS(ProceduralSkyMaterial, Material);
 	GDCLASS(ProceduralSkyMaterial, Material);
 
 

+ 3 - 3
servers/physics_3d/joints/godot_cone_twist_joint_3d.h

@@ -28,6 +28,9 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 /*************************************************************************/
 
 
+#ifndef GODOT_CONE_TWIST_JOINT_3D_H
+#define GODOT_CONE_TWIST_JOINT_3D_H
+
 /*
 /*
 Adapted to Godot from the Bullet library.
 Adapted to Godot from the Bullet library.
 */
 */
@@ -49,9 +52,6 @@ subject to the following restrictions:
 Written by: Marcus Hennix
 Written by: Marcus Hennix
 */
 */
 
 
-#ifndef GODOT_CONE_TWIST_JOINT_3D_H
-#define GODOT_CONE_TWIST_JOINT_3D_H
-
 #include "servers/physics_3d/godot_joint_3d.h"
 #include "servers/physics_3d/godot_joint_3d.h"
 #include "servers/physics_3d/joints/godot_jacobian_entry_3d.h"
 #include "servers/physics_3d/joints/godot_jacobian_entry_3d.h"
 
 

+ 3 - 3
servers/physics_3d/joints/godot_generic_6dof_joint_3d.h

@@ -28,13 +28,13 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 /*************************************************************************/
 
 
+#ifndef GODOT_GENERIC_6DOF_JOINT_3D_H
+#define GODOT_GENERIC_6DOF_JOINT_3D_H
+
 /*
 /*
 Adapted to Godot from the Bullet library.
 Adapted to Godot from the Bullet library.
 */
 */
 
 
-#ifndef GODOT_GENERIC_6DOF_JOINT_3D_H
-#define GODOT_GENERIC_6DOF_JOINT_3D_H
-
 #include "servers/physics_3d/godot_joint_3d.h"
 #include "servers/physics_3d/godot_joint_3d.h"
 #include "servers/physics_3d/joints/godot_jacobian_entry_3d.h"
 #include "servers/physics_3d/joints/godot_jacobian_entry_3d.h"
 
 

+ 3 - 3
servers/physics_3d/joints/godot_hinge_joint_3d.h

@@ -28,13 +28,13 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 /*************************************************************************/
 
 
+#ifndef GODOT_HINGE_JOINT_3D_H
+#define GODOT_HINGE_JOINT_3D_H
+
 /*
 /*
 Adapted to Godot from the Bullet library.
 Adapted to Godot from the Bullet library.
 */
 */
 
 
-#ifndef GODOT_HINGE_JOINT_3D_H
-#define GODOT_HINGE_JOINT_3D_H
-
 #include "servers/physics_3d/godot_joint_3d.h"
 #include "servers/physics_3d/godot_joint_3d.h"
 #include "servers/physics_3d/joints/godot_jacobian_entry_3d.h"
 #include "servers/physics_3d/joints/godot_jacobian_entry_3d.h"
 
 

+ 3 - 3
servers/physics_3d/joints/godot_jacobian_entry_3d.h

@@ -28,13 +28,13 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 /*************************************************************************/
 
 
+#ifndef GODOT_JACOBIAN_ENTRY_3D_H
+#define GODOT_JACOBIAN_ENTRY_3D_H
+
 /*
 /*
 Adapted to Godot from the Bullet library.
 Adapted to Godot from the Bullet library.
 */
 */
 
 
-#ifndef GODOT_JACOBIAN_ENTRY_3D_H
-#define GODOT_JACOBIAN_ENTRY_3D_H
-
 /*
 /*
 Bullet Continuous Collision Detection and Physics Library
 Bullet Continuous Collision Detection and Physics Library
 Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
 Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/

+ 3 - 3
servers/physics_3d/joints/godot_pin_joint_3d.h

@@ -28,13 +28,13 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 /*************************************************************************/
 
 
+#ifndef GODOT_PIN_JOINT_3D_H
+#define GODOT_PIN_JOINT_3D_H
+
 /*
 /*
 Adapted to Godot from the Bullet library.
 Adapted to Godot from the Bullet library.
 */
 */
 
 
-#ifndef GODOT_PIN_JOINT_3D_H
-#define GODOT_PIN_JOINT_3D_H
-
 #include "servers/physics_3d/godot_joint_3d.h"
 #include "servers/physics_3d/godot_joint_3d.h"
 #include "servers/physics_3d/joints/godot_jacobian_entry_3d.h"
 #include "servers/physics_3d/joints/godot_jacobian_entry_3d.h"
 
 

+ 3 - 3
servers/physics_3d/joints/godot_slider_joint_3d.h

@@ -28,13 +28,13 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 /*************************************************************************/
 
 
+#ifndef GODOT_SLIDER_JOINT_3D_H
+#define GODOT_SLIDER_JOINT_3D_H
+
 /*
 /*
 Adapted to Godot from the Bullet library.
 Adapted to Godot from the Bullet library.
 */
 */
 
 
-#ifndef GODOT_SLIDER_JOINT_3D_H
-#define GODOT_SLIDER_JOINT_3D_H
-
 #include "servers/physics_3d/godot_joint_3d.h"
 #include "servers/physics_3d/godot_joint_3d.h"
 #include "servers/physics_3d/joints/godot_jacobian_entry_3d.h"
 #include "servers/physics_3d/joints/godot_jacobian_entry_3d.h"