瀏覽代碼

Merge pull request #14332 from akien-mga/clang-format

Update style for clang-format 5.0.0, new min required version
Rémi Verschelde 7 年之前
父節點
當前提交
96dbf19093
共有 100 個文件被更改,包括 606 次插入550 次删除
  1. 34 16
      .clang-format
  2. 2 2
      .travis.yml
  3. 4 4
      core/class_db.h
  4. 14 14
      core/core_string_names.cpp
  5. 1 1
      core/dvector.h
  6. 3 3
      core/engine.h
  7. 7 7
      core/global_constants.cpp
  8. 3 3
      core/hash_map.h
  9. 4 5
      core/helper/math_fieldwise.cpp
  10. 3 3
      core/io/file_access_pack.cpp
  11. 2 2
      core/io/marshalls.cpp
  12. 3 3
      core/io/resource_import.h
  13. 2 2
      core/math/a_star.h
  14. 3 3
      core/math/aabb.h
  15. 5 5
      core/math/bsp_tree.cpp
  16. 1 2
      core/math/face3.cpp
  17. 0 2
      core/math/face3.h
  18. 15 15
      core/math/math_2d.h
  19. 1 1
      core/math/math_funcs.h
  20. 9 9
      core/math/plane.h
  21. 3 3
      core/math/transform.cpp
  22. 84 84
      core/object.cpp
  23. 19 19
      core/object.h
  24. 14 12
      core/ordered_hash_map.h
  25. 1 1
      core/os/os.h
  26. 3 3
      core/pair.h
  27. 11 11
      core/project_settings.h
  28. 2 2
      core/resource.cpp
  29. 4 4
      core/safe_refcount.cpp
  30. 19 19
      core/script_debugger_remote.cpp
  31. 4 4
      core/script_language.cpp
  32. 5 5
      core/translation.cpp
  33. 3 3
      core/typedefs.h
  34. 1 5
      core/variant.cpp
  35. 3 3
      core/variant_call.cpp
  36. 1 1
      drivers/convex_decomp/b2d_decompose.cpp
  37. 0 12
      drivers/gles3/rasterizer_scene_gles3.cpp
  38. 1 1
      drivers/gles3/rasterizer_scene_gles3.h
  39. 12 10
      drivers/gles3/rasterizer_storage_gles3.h
  40. 1 4
      drivers/unix/ip_unix.cpp
  41. 1 1
      drivers/unix/os_unix.cpp
  42. 1 1
      drivers/unix/os_unix.h
  43. 2 2
      drivers/xaudio2/audio_driver_xaudio2.h
  44. 3 2
      editor/editor_export.h
  45. 6 4
      editor/filesystem_dock.h
  46. 0 2
      editor/import/editor_import_collada.cpp
  47. 15 10
      editor/plugins/abstract_polygon_2d_editor.cpp
  48. 2 2
      editor/plugins/canvas_item_editor_plugin.cpp
  49. 4 4
      editor/plugins/collision_polygon_2d_editor_plugin.cpp
  50. 4 2
      editor/plugins/curve_editor_plugin.cpp
  51. 4 4
      editor/plugins/line_2d_editor_plugin.cpp
  52. 4 4
      editor/plugins/navigation_polygon_editor_plugin.cpp
  53. 4 4
      editor/plugins/polygon_2d_editor_plugin.cpp
  54. 1 1
      editor/project_manager.cpp
  55. 1 1
      editor/property_editor.cpp
  56. 0 1
      main/main.cpp
  57. 2 2
      main/tests/test_gdscript.cpp
  58. 1 1
      main/tests/test_gdscript.h
  59. 1 1
      main/tests/test_image.cpp
  60. 2 2
      main/tests/test_io.cpp
  61. 1 1
      main/tests/test_math.cpp
  62. 1 1
      main/tests/test_physics.cpp
  63. 1 1
      main/tests/test_physics_2d.cpp
  64. 1 1
      main/tests/test_render.cpp
  65. 1 1
      main/tests/test_shader_lang.cpp
  66. 1 1
      main/tests/test_string.cpp
  67. 1 1
      misc/travis/clang-format.sh
  68. 13 13
      modules/bullet/area_bullet.cpp
  69. 8 6
      modules/bullet/area_bullet.h
  70. 3 3
      modules/bullet/btRayShape.cpp
  71. 4 4
      modules/bullet/bullet_physics_server.cpp
  72. 11 4
      modules/bullet/collision_object_bullet.cpp
  73. 13 7
      modules/bullet/collision_object_bullet.h
  74. 2 2
      modules/bullet/cone_twist_joint_bullet.cpp
  75. 3 2
      modules/bullet/constraint_bullet.cpp
  76. 2 2
      modules/bullet/generic_6dof_joint_bullet.cpp
  77. 2 2
      modules/bullet/godot_collision_configuration.cpp
  78. 2 2
      modules/bullet/godot_collision_dispatcher.cpp
  79. 4 4
      modules/bullet/godot_motion_state.h
  80. 12 12
      modules/bullet/godot_ray_world_algorithm.cpp
  81. 40 20
      modules/bullet/godot_result_callbacks.h
  82. 4 4
      modules/bullet/hinge_joint_bullet.cpp
  83. 2 2
      modules/bullet/joint_bullet.cpp
  84. 2 2
      modules/bullet/pin_joint_bullet.cpp
  85. 19 19
      modules/bullet/rigid_body_bullet.cpp
  86. 2 2
      modules/bullet/rigid_body_bullet.h
  87. 18 16
      modules/bullet/shape_bullet.cpp
  88. 2 2
      modules/bullet/slider_joint_bullet.cpp
  89. 12 2
      modules/bullet/soft_body_bullet.cpp
  90. 27 26
      modules/bullet/space_bullet.cpp
  91. 2 2
      modules/bullet/space_bullet.h
  92. 1 1
      modules/gdnative/arvr/arvr_interface_gdnative.cpp
  93. 1 1
      modules/gdnative/gdnative.cpp
  94. 2 2
      modules/gdnative/gdnative.h
  95. 0 2
      modules/gdnative/nativescript/api_generator.cpp
  96. 5 5
      modules/gdnative/nativescript/nativescript.cpp
  97. 6 6
      modules/gdnative/nativescript/nativescript.h
  98. 2 2
      modules/gdnative/pluginscript/pluginscript_language.cpp
  99. 5 2
      modules/gdnative/pluginscript/pluginscript_script.cpp
  100. 3 3
      modules/gdscript/gdscript.cpp

+ 34 - 16
.clang-format

@@ -1,15 +1,14 @@
----
-BasedOnStyle:  LLVM
 # Commented out parameters are those with the same value as base LLVM style
 # We can uncomment them if we want to change their value, or enforce the
-# chosen value in case the base style changes (initial sync: Clang 3.9.1).
-...
-Language:        Cpp
+# chosen value in case the base style changes (last sync: Clang 5.0.0).
+---
+### General config, applies to all languages ###
+BasedOnStyle:  LLVM
 AccessModifierOffset: -4
 AlignAfterOpenBracket: DontAlign
 # AlignConsecutiveAssignments: false
 # AlignConsecutiveDeclarations: false
-# AlignEscapedNewlinesLeft: false
+# AlignEscapedNewlines: Right
 # AlignOperands:   true
 AlignTrailingComments: false
 AllowAllParametersOfDeclarationOnNextLine: false
@@ -36,22 +35,32 @@ AllowShortIfStatementsOnASingleLine: true
 #   BeforeCatch:     false
 #   BeforeElse:      false
 #   IndentBraces:    false
+#   SplitEmptyFunction: true
+#   SplitEmptyRecord: true
+#   SplitEmptyNamespace: true
 # BreakBeforeBinaryOperators: None
 # BreakBeforeBraces: Attach
+# BreakBeforeInheritanceComma: false
 BreakBeforeTernaryOperators: false
 # BreakConstructorInitializersBeforeComma: false
+BreakConstructorInitializers: AfterColon
 # BreakAfterJavaFieldAnnotations: false
 # BreakStringLiterals: true
 ColumnLimit:     0
 # CommentPragmas:  '^ IWYU pragma:'
-# ConstructorInitializerAllOnOneLineOrOnePerLine: false
-# ConstructorInitializerIndentWidth: 4
+# CompactNamespaces: false
+ConstructorInitializerAllOnOneLineOrOnePerLine: true
+ConstructorInitializerIndentWidth: 8
 ContinuationIndentWidth: 8
 Cpp11BracedListStyle: false
 # DerivePointerAlignment: false
 # DisableFormat:   false
 # ExperimentalAutoDetectBinPacking: false
-# ForEachMacros:   [ foreach, Q_FOREACH, BOOST_FOREACH ]
+# FixNamespaceComments: true
+# ForEachMacros:
+#   - foreach
+#   - Q_FOREACH
+#   - BOOST_FOREACH
 IncludeCategories:
   - Regex:           '".*"'
     Priority:        1
@@ -59,7 +68,7 @@ IncludeCategories:
     Priority:        2
   - Regex:           '^<.*'
     Priority:        3
-# IncludeIsMainRegex: '$'
+# IncludeIsMainRegex: '(Test)?$'
 IndentCaseLabels: true
 IndentWidth:     4
 # IndentWrappedFunctionNames: false
@@ -70,19 +79,19 @@ IndentWidth:     4
 # MacroBlockEnd:   ''
 # MaxEmptyLinesToKeep: 1
 # NamespaceIndentation: None
-ObjCBlockIndentWidth: 4
-# ObjCSpaceAfterProperty: false
-# ObjCSpaceBeforeProtocolList: true
+# PenaltyBreakAssignment: 2
 # PenaltyBreakBeforeFirstCallParameter: 19
 # PenaltyBreakComment: 300
 # PenaltyBreakFirstLessLess: 120
 # PenaltyBreakString: 1000
 # PenaltyExcessCharacter: 1000000
 # PenaltyReturnTypeOnItsOwnLine: 60
-PointerAlignment: Right
+# PointerAlignment: Right
 # ReflowComments:  true
-SortIncludes:    true
+# SortIncludes:    true
+# SortUsingDeclarations: true
 # SpaceAfterCStyleCast: false
+# SpaceAfterTemplateKeyword: true
 # SpaceBeforeAssignmentOperators: true
 # SpaceBeforeParens: ControlStatements
 # SpaceInEmptyParentheses: false
@@ -92,7 +101,16 @@ SortIncludes:    true
 # SpacesInCStyleCastParentheses: false
 # SpacesInParentheses: false
 # SpacesInSquareBrackets: false
-Standard:        Cpp03
 TabWidth:        4
 UseTab:          Always
+---
+### C++ specific config ###
+Language:        Cpp
+Standard:        Cpp03
+---
+### ObjC specific config ###
+Language:        ObjC
+ObjCBlockIndentWidth: 4
+# ObjCSpaceAfterProperty: false
+# ObjCSpaceBeforeProtocolList: true
 ...

+ 2 - 2
.travis.yml

@@ -41,7 +41,7 @@ addons:
   apt:
     sources:
       - ubuntu-toolchain-r-test
-      - llvm-toolchain-trusty-3.9
+      - llvm-toolchain-trusty-5.0
     packages:
       - build-essential
       - scons
@@ -67,7 +67,7 @@ addons:
       #- mingw-w64
 
       # For style checks.
-      - clang-format-3.9
+      - clang-format-5.0
 
 install:
   - if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$GODOT_TARGET" = "android" ]; then

+ 4 - 4
core/class_db.h

@@ -49,10 +49,10 @@ struct MethodDefinition {
 	StringName name;
 	Vector<StringName> args;
 	MethodDefinition() {}
-	MethodDefinition(const char *p_name)
-		: name(p_name) {}
-	MethodDefinition(const StringName &p_name)
-		: name(p_name) {}
+	MethodDefinition(const char *p_name) :
+			name(p_name) {}
+	MethodDefinition(const StringName &p_name) :
+			name(p_name) {}
 };
 
 MethodDefinition D_METHOD(const char *p_name);

+ 14 - 14
core/core_string_names.cpp

@@ -31,22 +31,22 @@
 
 CoreStringNames *CoreStringNames::singleton = NULL;
 
-CoreStringNames::CoreStringNames()
-	: _free(StaticCString::create("free")),
-	  changed(StaticCString::create("changed")),
-	  _meta(StaticCString::create("__meta__")),
-	  _script(StaticCString::create("script")),
-	  script_changed(StaticCString::create("script_changed")),
-	  ___pdcdata(StaticCString::create("___pdcdata")),
-	  __getvar(StaticCString::create("__getvar")),
-	  _iter_init(StaticCString::create("_iter_init")),
-	  _iter_next(StaticCString::create("_iter_next")),
-	  _iter_get(StaticCString::create("_iter_get")),
-	  get_rid(StaticCString::create("get_rid")),
+CoreStringNames::CoreStringNames() :
+		_free(StaticCString::create("free")),
+		changed(StaticCString::create("changed")),
+		_meta(StaticCString::create("__meta__")),
+		_script(StaticCString::create("script")),
+		script_changed(StaticCString::create("script_changed")),
+		___pdcdata(StaticCString::create("___pdcdata")),
+		__getvar(StaticCString::create("__getvar")),
+		_iter_init(StaticCString::create("_iter_init")),
+		_iter_next(StaticCString::create("_iter_next")),
+		_iter_get(StaticCString::create("_iter_get")),
+		get_rid(StaticCString::create("get_rid")),
 #ifdef TOOLS_ENABLED
-	  _sections_unfolded(StaticCString::create("_sections_unfolded")),
+		_sections_unfolded(StaticCString::create("_sections_unfolded")),
 #endif
-	  _custom_features(StaticCString::create("_custom_features")) {
+		_custom_features(StaticCString::create("_custom_features")) {
 
 	x = StaticCString::create("x");
 	y = StaticCString::create("y");

+ 1 - 1
core/dvector.h

@@ -149,7 +149,7 @@ class PoolVector {
 		}
 
 		if (old_alloc->refcount.unref() == true) {
-//this should never happen but..
+		//this should never happen but..
 
 #ifdef DEBUG_ENABLED
 			MemoryPool::alloc_mutex->lock();

+ 3 - 3
core/engine.h

@@ -41,9 +41,9 @@ public:
 	struct Singleton {
 		StringName name;
 		Object *ptr;
-		Singleton(const StringName &p_name = StringName(), Object *p_ptr = NULL)
-			: name(p_name),
-			  ptr(p_ptr) {
+		Singleton(const StringName &p_name = StringName(), Object *p_ptr = NULL) :
+				name(p_name),
+				ptr(p_ptr) {
 		}
 	};
 

+ 7 - 7
core/global_constants.cpp

@@ -45,15 +45,15 @@ struct _GlobalConstant {
 	_GlobalConstant() {}
 
 #ifdef DEBUG_METHODS_ENABLED
-	_GlobalConstant(const StringName &p_enum_name, const char *p_name, int p_value)
-		: enum_name(p_enum_name),
-		  name(p_name),
-		  value(p_value) {
+	_GlobalConstant(const StringName &p_enum_name, const char *p_name, int p_value) :
+			enum_name(p_enum_name),
+			name(p_name),
+			value(p_value) {
 	}
 #else
-	_GlobalConstant(const char *p_name, int p_value)
-		: name(p_name),
-		  value(p_value) {
+	_GlobalConstant(const char *p_name, int p_value) :
+			name(p_name),
+			value(p_value) {
 	}
 #endif
 };

+ 3 - 3
core/hash_map.h

@@ -63,9 +63,9 @@ public:
 		TData data;
 
 		Pair() {}
-		Pair(const TKey &p_key, const TData &p_data)
-			: key(p_key),
-			  data(p_data) {
+		Pair(const TKey &p_key, const TData &p_data) :
+				key(p_key),
+				data(p_data) {
 		}
 	};
 

+ 4 - 5
core/helper/math_fieldwise.cpp

@@ -44,10 +44,10 @@ Variant fieldwise_assign(const Variant &p_target, const Variant &p_source, const
 
 	ERR_FAIL_COND_V(p_target.get_type() != p_source.get_type(), p_target);
 
-	switch (p_source.get_type()) {
+	/* clang-format makes a mess of this macro usage */
+	/* clang-format off */
 
-			/* clang-format makes a mess of this macro usage */
-			/* clang-format off */
+	switch (p_source.get_type()) {
 
 		case Variant::VECTOR2: {
 
@@ -174,9 +174,8 @@ Variant fieldwise_assign(const Variant &p_target, const Variant &p_source, const
 		default: {
 			ERR_FAIL_V(p_target);
 		}
-
-			/* clang-format on */
 	}
+	/* clang-format on */
 }
 
 #endif // TOOLS_ENABLED

+ 3 - 3
core/io/file_access_pack.cpp

@@ -313,9 +313,9 @@ bool FileAccessPack::file_exists(const String &p_name) {
 	return false;
 }
 
-FileAccessPack::FileAccessPack(const String &p_path, const PackedData::PackedFile &p_file)
-	: pf(p_file),
-	  f(FileAccess::open(pf.pack, FileAccess::READ)) {
+FileAccessPack::FileAccessPack(const String &p_path, const PackedData::PackedFile &p_file) :
+		pf(p_file),
+		f(FileAccess::open(pf.pack, FileAccess::READ)) {
 	if (!f) {
 		ERR_EXPLAIN("Can't open pack-referenced file: " + String(pf.pack));
 		ERR_FAIL_COND(!f);

+ 2 - 2
core/io/marshalls.cpp

@@ -159,8 +159,8 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
 			r_variant = str;
 
 		} break;
-			// math types
 
+		// math types
 		case Variant::VECTOR2: {
 
 			ERR_FAIL_COND_V(len < (int)4 * 2, ERR_INVALID_DATA);
@@ -959,8 +959,8 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
 			_encode_string(p_variant, buf, r_len);
 
 		} break;
-			// math types
 
+		// math types
 		case Variant::VECTOR2: {
 
 			if (buf) {

+ 3 - 3
core/io/resource_import.h

@@ -90,9 +90,9 @@ public:
 		PropertyInfo option;
 		Variant default_value;
 
-		ImportOption(const PropertyInfo &p_info, const Variant &p_default)
-			: option(p_info),
-			  default_value(p_default) {
+		ImportOption(const PropertyInfo &p_info, const Variant &p_default) :
+				option(p_info),
+				default_value(p_default) {
 		}
 		ImportOption() {}
 	};

+ 2 - 2
core/math/a_star.h

@@ -59,8 +59,8 @@ class AStar : public Reference {
 		Point *prev_point;
 		real_t distance;
 
-		Point()
-			: list(this) {}
+		Point() :
+				list(this) {}
 	};
 
 	Map<int, Point *> points;

+ 3 - 3
core/math/aabb.h

@@ -101,9 +101,9 @@ public:
 	operator String() const;
 
 	_FORCE_INLINE_ AABB() {}
-	inline AABB(const Vector3 &p_pos, const Vector3 &p_size)
-		: position(p_pos),
-		  size(p_size) {
+	inline AABB(const Vector3 &p_pos, const Vector3 &p_size) :
+			position(p_pos),
+			size(p_size) {
 	}
 };
 

+ 5 - 5
core/math/bsp_tree.cpp

@@ -577,11 +577,11 @@ BSP_Tree::BSP_Tree(const PoolVector<Face3> &p_faces, real_t p_error_radius) {
 	error_radius = p_error_radius;
 }
 
-BSP_Tree::BSP_Tree(const Vector<Node> &p_nodes, const Vector<Plane> &p_planes, const AABB &p_aabb, real_t p_error_radius)
-	: nodes(p_nodes),
-	  planes(p_planes),
-	  aabb(p_aabb),
-	  error_radius(p_error_radius) {
+BSP_Tree::BSP_Tree(const Vector<Node> &p_nodes, const Vector<Plane> &p_planes, const AABB &p_aabb, real_t p_error_radius) :
+		nodes(p_nodes),
+		planes(p_planes),
+		aabb(p_aabb),
+		error_radius(p_error_radius) {
 }
 
 BSP_Tree::~BSP_Tree() {

+ 1 - 2
core/math/face3.cpp

@@ -195,9 +195,8 @@ bool Face3::intersects_aabb(const AABB &p_aabb) const {
 	if (!p_aabb.intersects_plane(get_plane()))
 		return false;
 
-		/** TEST FACE AXIS */
-
 #define TEST_AXIS(m_ax)                                            \
+	/** TEST FACE AXIS */                                          \
 	{                                                              \
 		real_t aabb_min = p_aabb.position.m_ax;                    \
 		real_t aabb_max = p_aabb.position.m_ax + p_aabb.size.m_ax; \

+ 0 - 2
core/math/face3.h

@@ -256,6 +256,4 @@ bool Face3::intersects_aabb2(const AABB &p_aabb) const {
 	return true;
 }
 
-	//this sucks...
-
 #endif // FACE3_H

+ 15 - 15
core/math/math_2d.h

@@ -385,13 +385,13 @@ struct Rect2 {
 	operator String() const { return String(position) + ", " + String(size); }
 
 	Rect2() {}
-	Rect2(real_t p_x, real_t p_y, real_t p_width, real_t p_height)
-		: position(Point2(p_x, p_y)),
-		  size(Size2(p_width, p_height)) {
+	Rect2(real_t p_x, real_t p_y, real_t p_width, real_t p_height) :
+			position(Point2(p_x, p_y)),
+			size(Size2(p_width, p_height)) {
 	}
-	Rect2(const Point2 &p_pos, const Size2 &p_size)
-		: position(p_pos),
-		  size(p_size) {
+	Rect2(const Point2 &p_pos, const Size2 &p_size) :
+			position(p_pos),
+			size(p_size) {
 	}
 };
 
@@ -578,18 +578,18 @@ struct Rect2i {
 	operator String() const { return String(position) + ", " + String(size); }
 
 	operator Rect2() const { return Rect2(position, size); }
-	Rect2i(const Rect2 &p_r2)
-		: position(p_r2.position),
-		  size(p_r2.size) {
+	Rect2i(const Rect2 &p_r2) :
+			position(p_r2.position),
+			size(p_r2.size) {
 	}
 	Rect2i() {}
-	Rect2i(int p_x, int p_y, int p_width, int p_height)
-		: position(Point2(p_x, p_y)),
-		  size(Size2(p_width, p_height)) {
+	Rect2i(int p_x, int p_y, int p_width, int p_height) :
+			position(Point2(p_x, p_y)),
+			size(Size2(p_width, p_height)) {
 	}
-	Rect2i(const Point2 &p_pos, const Size2 &p_size)
-		: position(p_pos),
-		  size(p_size) {
+	Rect2i(const Point2 &p_pos, const Size2 &p_size) :
+			position(p_pos),
+			size(p_size) {
 	}
 };
 

+ 1 - 1
core/math/math_funcs.h

@@ -272,7 +272,7 @@ public:
 
 #elif defined(_MSC_VER) && _MSC_VER < 1800
 		__asm fld a __asm fistp b
-/*#elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) )
+		/*#elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) )
 		// use AT&T inline assembly style, document that
 		// we use memory as output (=m) and input (m)
 		__asm__ __volatile__ (

+ 9 - 9
core/math/plane.h

@@ -74,9 +74,9 @@ public:
 	operator String() const;
 
 	_FORCE_INLINE_ Plane() { d = 0; }
-	_FORCE_INLINE_ Plane(real_t p_a, real_t p_b, real_t p_c, real_t p_d)
-		: normal(p_a, p_b, p_c),
-		  d(p_d){};
+	_FORCE_INLINE_ Plane(real_t p_a, real_t p_b, real_t p_c, real_t p_d) :
+			normal(p_a, p_b, p_c),
+			d(p_d){};
 
 	_FORCE_INLINE_ Plane(const Vector3 &p_normal, real_t p_d);
 	_FORCE_INLINE_ Plane(const Vector3 &p_point, const Vector3 &p_normal);
@@ -100,14 +100,14 @@ bool Plane::has_point(const Vector3 &p_point, real_t _epsilon) const {
 	return (dist <= _epsilon);
 }
 
-Plane::Plane(const Vector3 &p_normal, real_t p_d)
-	: normal(p_normal),
-	  d(p_d) {
+Plane::Plane(const Vector3 &p_normal, real_t p_d) :
+		normal(p_normal),
+		d(p_d) {
 }
 
-Plane::Plane(const Vector3 &p_point, const Vector3 &p_normal)
-	: normal(p_normal),
-	  d(p_normal.dot(p_point)) {
+Plane::Plane(const Vector3 &p_point, const Vector3 &p_normal) :
+		normal(p_normal),
+		d(p_normal.dot(p_point)) {
 }
 
 Plane::Plane(const Vector3 &p_point1, const Vector3 &p_point2, const Vector3 &p_point3, ClockDirection p_dir) {

+ 3 - 3
core/math/transform.cpp

@@ -208,7 +208,7 @@ Transform::operator String() const {
 	return basis.operator String() + " - " + origin.operator String();
 }
 
-Transform::Transform(const Basis &p_basis, const Vector3 &p_origin)
-	: basis(p_basis),
-	  origin(p_origin) {
+Transform::Transform(const Basis &p_basis, const Vector3 &p_origin) :
+		basis(p_basis),
+		origin(p_origin) {
 }

+ 84 - 84
core/object.cpp

@@ -126,9 +126,9 @@ MethodInfo::operator Dictionary() const {
 	return d;
 }
 
-MethodInfo::MethodInfo()
-	: flags(METHOD_FLAG_NORMAL),
-	  id(0) {
+MethodInfo::MethodInfo() :
+		flags(METHOD_FLAG_NORMAL),
+		id(0) {
 }
 
 MethodInfo MethodInfo::from_dict(const Dictionary &p_dict) {
@@ -164,48 +164,48 @@ MethodInfo MethodInfo::from_dict(const Dictionary &p_dict) {
 	return mi;
 }
 
-MethodInfo::MethodInfo(const String &p_name)
-	: name(p_name),
-	  flags(METHOD_FLAG_NORMAL),
-	  id(0) {
+MethodInfo::MethodInfo(const String &p_name) :
+		name(p_name),
+		flags(METHOD_FLAG_NORMAL),
+		id(0) {
 }
-MethodInfo::MethodInfo(const String &p_name, const PropertyInfo &p_param1)
-	: name(p_name),
-	  flags(METHOD_FLAG_NORMAL),
-	  id(0) {
+MethodInfo::MethodInfo(const String &p_name, const PropertyInfo &p_param1) :
+		name(p_name),
+		flags(METHOD_FLAG_NORMAL),
+		id(0) {
 	arguments.push_back(p_param1);
 }
-MethodInfo::MethodInfo(const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2)
-	: name(p_name),
-	  flags(METHOD_FLAG_NORMAL),
-	  id(0) {
+MethodInfo::MethodInfo(const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2) :
+		name(p_name),
+		flags(METHOD_FLAG_NORMAL),
+		id(0) {
 	arguments.push_back(p_param1);
 	arguments.push_back(p_param2);
 }
 
-MethodInfo::MethodInfo(const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3)
-	: name(p_name),
-	  flags(METHOD_FLAG_NORMAL),
-	  id(0) {
+MethodInfo::MethodInfo(const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3) :
+		name(p_name),
+		flags(METHOD_FLAG_NORMAL),
+		id(0) {
 	arguments.push_back(p_param1);
 	arguments.push_back(p_param2);
 	arguments.push_back(p_param3);
 }
 
-MethodInfo::MethodInfo(const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4)
-	: name(p_name),
-	  flags(METHOD_FLAG_NORMAL),
-	  id(0) {
+MethodInfo::MethodInfo(const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4) :
+		name(p_name),
+		flags(METHOD_FLAG_NORMAL),
+		id(0) {
 	arguments.push_back(p_param1);
 	arguments.push_back(p_param2);
 	arguments.push_back(p_param3);
 	arguments.push_back(p_param4);
 }
 
-MethodInfo::MethodInfo(const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4, const PropertyInfo &p_param5)
-	: name(p_name),
-	  flags(METHOD_FLAG_NORMAL),
-	  id(0) {
+MethodInfo::MethodInfo(const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4, const PropertyInfo &p_param5) :
+		name(p_name),
+		flags(METHOD_FLAG_NORMAL),
+		id(0) {
 	arguments.push_back(p_param1);
 	arguments.push_back(p_param2);
 	arguments.push_back(p_param3);
@@ -213,48 +213,48 @@ MethodInfo::MethodInfo(const String &p_name, const PropertyInfo &p_param1, const
 	arguments.push_back(p_param5);
 }
 
-MethodInfo::MethodInfo(Variant::Type ret)
-	: flags(METHOD_FLAG_NORMAL),
-	  id(0) {
+MethodInfo::MethodInfo(Variant::Type ret) :
+		flags(METHOD_FLAG_NORMAL),
+		id(0) {
 	return_val.type = ret;
 }
 
-MethodInfo::MethodInfo(Variant::Type ret, const String &p_name)
-	: name(p_name),
-	  flags(METHOD_FLAG_NORMAL),
-	  id(0) {
+MethodInfo::MethodInfo(Variant::Type ret, const String &p_name) :
+		name(p_name),
+		flags(METHOD_FLAG_NORMAL),
+		id(0) {
 	return_val.type = ret;
 }
-MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1)
-	: name(p_name),
-	  flags(METHOD_FLAG_NORMAL),
-	  id(0) {
+MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1) :
+		name(p_name),
+		flags(METHOD_FLAG_NORMAL),
+		id(0) {
 	return_val.type = ret;
 	arguments.push_back(p_param1);
 }
-MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2)
-	: name(p_name),
-	  flags(METHOD_FLAG_NORMAL),
-	  id(0) {
+MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2) :
+		name(p_name),
+		flags(METHOD_FLAG_NORMAL),
+		id(0) {
 	return_val.type = ret;
 	arguments.push_back(p_param1);
 	arguments.push_back(p_param2);
 }
 
-MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3)
-	: name(p_name),
-	  flags(METHOD_FLAG_NORMAL),
-	  id(0) {
+MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3) :
+		name(p_name),
+		flags(METHOD_FLAG_NORMAL),
+		id(0) {
 	return_val.type = ret;
 	arguments.push_back(p_param1);
 	arguments.push_back(p_param2);
 	arguments.push_back(p_param3);
 }
 
-MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4)
-	: name(p_name),
-	  flags(METHOD_FLAG_NORMAL),
-	  id(0) {
+MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4) :
+		name(p_name),
+		flags(METHOD_FLAG_NORMAL),
+		id(0) {
 	return_val.type = ret;
 	arguments.push_back(p_param1);
 	arguments.push_back(p_param2);
@@ -262,10 +262,10 @@ MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyIn
 	arguments.push_back(p_param4);
 }
 
-MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4, const PropertyInfo &p_param5)
-	: name(p_name),
-	  flags(METHOD_FLAG_NORMAL),
-	  id(0) {
+MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4, const PropertyInfo &p_param5) :
+		name(p_name),
+		flags(METHOD_FLAG_NORMAL),
+		id(0) {
 	return_val.type = ret;
 	arguments.push_back(p_param1);
 	arguments.push_back(p_param2);
@@ -274,56 +274,56 @@ MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyIn
 	arguments.push_back(p_param5);
 }
 
-MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name)
-	: name(p_name),
-	  flags(METHOD_FLAG_NORMAL),
-	  return_val(p_ret),
-	  id(0) {
+MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name) :
+		name(p_name),
+		flags(METHOD_FLAG_NORMAL),
+		return_val(p_ret),
+		id(0) {
 }
 
-MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1)
-	: name(p_name),
-	  return_val(p_ret),
-	  flags(METHOD_FLAG_NORMAL),
-	  id(0) {
+MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1) :
+		name(p_name),
+		return_val(p_ret),
+		flags(METHOD_FLAG_NORMAL),
+		id(0) {
 	arguments.push_back(p_param1);
 }
 
-MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2)
-	: name(p_name),
-	  return_val(p_ret),
-	  flags(METHOD_FLAG_NORMAL),
-	  id(0) {
+MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2) :
+		name(p_name),
+		return_val(p_ret),
+		flags(METHOD_FLAG_NORMAL),
+		id(0) {
 	arguments.push_back(p_param1);
 	arguments.push_back(p_param2);
 }
 
-MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3)
-	: name(p_name),
-	  return_val(p_ret),
-	  flags(METHOD_FLAG_NORMAL),
-	  id(0) {
+MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3) :
+		name(p_name),
+		return_val(p_ret),
+		flags(METHOD_FLAG_NORMAL),
+		id(0) {
 	arguments.push_back(p_param1);
 	arguments.push_back(p_param2);
 	arguments.push_back(p_param3);
 }
 
-MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4)
-	: name(p_name),
-	  return_val(p_ret),
-	  flags(METHOD_FLAG_NORMAL),
-	  id(0) {
+MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4) :
+		name(p_name),
+		return_val(p_ret),
+		flags(METHOD_FLAG_NORMAL),
+		id(0) {
 	arguments.push_back(p_param1);
 	arguments.push_back(p_param2);
 	arguments.push_back(p_param3);
 	arguments.push_back(p_param4);
 }
 
-MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4, const PropertyInfo &p_param5)
-	: name(p_name),
-	  return_val(p_ret),
-	  flags(METHOD_FLAG_NORMAL),
-	  id(0) {
+MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4, const PropertyInfo &p_param5) :
+		name(p_name),
+		return_val(p_ret),
+		flags(METHOD_FLAG_NORMAL),
+		id(0) {
 	arguments.push_back(p_param1);
 	arguments.push_back(p_param2);
 	arguments.push_back(p_param3);

+ 19 - 19
core/object.h

@@ -1,4 +1,4 @@
-/*************************************************************************/
+/*************************************************************************/
 /*  object.h                                                             */
 /*************************************************************************/
 /*                       This file is part of:                           */
@@ -144,18 +144,18 @@ struct PropertyInfo {
 
 	static PropertyInfo from_dict(const Dictionary &p_dict);
 
-	PropertyInfo()
-		: type(Variant::NIL),
-		  hint(PROPERTY_HINT_NONE),
-		  usage(PROPERTY_USAGE_DEFAULT) {
+	PropertyInfo() :
+			type(Variant::NIL),
+			hint(PROPERTY_HINT_NONE),
+			usage(PROPERTY_USAGE_DEFAULT) {
 	}
 
-	PropertyInfo(Variant::Type p_type, const String p_name, PropertyHint p_hint = PROPERTY_HINT_NONE, const String &p_hint_string = "", uint32_t p_usage = PROPERTY_USAGE_DEFAULT, const StringName &p_class_name = StringName())
-		: type(p_type),
-		  name(p_name),
-		  hint(p_hint),
-		  hint_string(p_hint_string),
-		  usage(p_usage) {
+	PropertyInfo(Variant::Type p_type, const String p_name, PropertyHint p_hint = PROPERTY_HINT_NONE, const String &p_hint_string = "", uint32_t p_usage = PROPERTY_USAGE_DEFAULT, const StringName &p_class_name = StringName()) :
+			type(p_type),
+			name(p_name),
+			hint(p_hint),
+			hint_string(p_hint_string),
+			usage(p_usage) {
 
 		if (hint == PROPERTY_HINT_RESOURCE_TYPE) {
 			class_name = hint_string;
@@ -164,11 +164,11 @@ struct PropertyInfo {
 		}
 	}
 
-	PropertyInfo(const StringName &p_class_name)
-		: type(Variant::OBJECT),
-		  class_name(p_class_name),
-		  hint(PROPERTY_HINT_NONE),
-		  usage(PROPERTY_USAGE_DEFAULT) {
+	PropertyInfo(const StringName &p_class_name) :
+			type(Variant::OBJECT),
+			class_name(p_class_name),
+			hint(PROPERTY_HINT_NONE),
+			usage(PROPERTY_USAGE_DEFAULT) {
 	}
 
 	bool operator<(const PropertyInfo &p_info) const {
@@ -428,9 +428,9 @@ private:
 
 			_FORCE_INLINE_ bool operator<(const Target &p_target) const { return (_id == p_target._id) ? (method < p_target.method) : (_id < p_target._id); }
 
-			Target(const ObjectID &p_id, const StringName &p_method)
-				: _id(p_id),
-				  method(p_method) {
+			Target(const ObjectID &p_id, const StringName &p_method) :
+					_id(p_id),
+					method(p_method) {
 			}
 			Target() { _id = 0; }
 		};

+ 14 - 12
core/ordered_hash_map.h

@@ -68,8 +68,10 @@ public:
 		}
 
 	public:
-		_FORCE_INLINE_ Element()
-			: list_element(NULL), prev_element(NULL), next_element(NULL) {
+		_FORCE_INLINE_ Element() :
+				list_element(NULL),
+				prev_element(NULL),
+				next_element(NULL) {
 		}
 
 		Element next() const {
@@ -80,10 +82,10 @@ public:
 			return Element(prev_element);
 		}
 
-		Element(const Element &other)
-			: list_element(other.list_element),
-			  prev_element(other.prev_element),
-			  next_element(other.next_element) {
+		Element(const Element &other) :
+				list_element(other.list_element),
+				prev_element(other.prev_element),
+				next_element(other.next_element) {
 		}
 
 		Element &operator=(const Element &other) {
@@ -135,17 +137,17 @@ public:
 
 		const typename InternalList::Element *list_element;
 
-		ConstElement(const typename InternalList::Element *p_element)
-			: list_element(p_element) {
+		ConstElement(const typename InternalList::Element *p_element) :
+				list_element(p_element) {
 		}
 
 	public:
-		_FORCE_INLINE_ ConstElement()
-			: list_element(NULL) {
+		_FORCE_INLINE_ ConstElement() :
+				list_element(NULL) {
 		}
 
-		ConstElement(const ConstElement &other)
-			: list_element(other.list_element) {
+		ConstElement(const ConstElement &other) :
+				list_element(other.list_element) {
 		}
 
 		ConstElement &operator=(const ConstElement &other) {

+ 1 - 1
core/os/os.h

@@ -195,7 +195,7 @@ public:
 	virtual void set_ime_position(const Point2 &p_pos) {}
 	virtual void set_ime_intermediate_text_callback(ImeCallback p_callback, void *p_inp) {}
 
-	virtual Error open_dynamic_library(const String p_path, void *&p_library_handle,bool p_also_set_library_path=false) { return ERR_UNAVAILABLE; }
+	virtual Error open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path = false) { return ERR_UNAVAILABLE; }
 	virtual Error close_dynamic_library(void *p_library_handle) { return ERR_UNAVAILABLE; }
 	virtual Error get_dynamic_library_symbol_handle(void *p_library_handle, const String p_name, void *&p_symbol_handle, bool p_optional = false) { return ERR_UNAVAILABLE; }
 

+ 3 - 3
core/pair.h

@@ -37,9 +37,9 @@ struct Pair {
 	S second;
 
 	Pair() {}
-	Pair(F p_first, const S &p_second)
-		: first(p_first),
-		  second(p_second) {
+	Pair(F p_first, const S &p_second) :
+			first(p_first),
+			second(p_second) {
 	}
 };
 

+ 11 - 11
core/project_settings.h

@@ -58,18 +58,18 @@ protected:
 		Variant initial;
 		bool hide_from_editor;
 		bool overrided;
-		VariantContainer()
-			: order(0),
-			  persist(false),
-			  hide_from_editor(false),
-			  overrided(false) {
+		VariantContainer() :
+				order(0),
+				persist(false),
+				hide_from_editor(false),
+				overrided(false) {
 		}
-		VariantContainer(const Variant &p_variant, int p_order, bool p_persist = false)
-			: order(p_order),
-			  persist(p_persist),
-			  variant(p_variant),
-			  hide_from_editor(false),
-			  overrided(false) {
+		VariantContainer(const Variant &p_variant, int p_order, bool p_persist = false) :
+				order(p_order),
+				persist(p_persist),
+				variant(p_variant),
+				hide_from_editor(false),
+				overrided(false) {
 		}
 	};
 

+ 2 - 2
core/resource.cpp

@@ -378,8 +378,8 @@ void Resource::_bind_methods() {
 	BIND_VMETHOD(MethodInfo("_setup_local_to_scene"));
 }
 
-Resource::Resource()
-	: remapped_list(this) {
+Resource::Resource() :
+		remapped_list(this) {
 
 #ifdef TOOLS_ENABLED
 	last_modified_time = 0;

+ 4 - 4
core/safe_refcount.cpp

@@ -57,7 +57,7 @@
 			return m_val;                                                                   \
 	}
 
-_ALWAYS_INLINE_ uint32_t _atomic_conditional_increment_impl(register uint32_t *pw) {
+_ALWAYS_INLINE_ uint32_t _atomic_conditional_increment_impl(register uint32_t *pw){
 
 	ATOMIC_CONDITIONAL_INCREMENT_BODY(pw, LONG, InterlockedCompareExchange, uint32_t)
 }
@@ -82,12 +82,12 @@ _ALWAYS_INLINE_ uint32_t _atomic_add_impl(register uint32_t *pw, register uint32
 	return InterlockedAdd((LONG volatile *)pw, val);
 }
 
-_ALWAYS_INLINE_ uint32_t _atomic_exchange_if_greater_impl(register uint32_t *pw, register uint32_t val) {
+_ALWAYS_INLINE_ uint32_t _atomic_exchange_if_greater_impl(register uint32_t *pw, register uint32_t val){
 
 	ATOMIC_EXCHANGE_IF_GREATER_BODY(pw, val, LONG, InterlockedCompareExchange, uint32_t)
 }
 
-_ALWAYS_INLINE_ uint64_t _atomic_conditional_increment_impl(register uint64_t *pw) {
+_ALWAYS_INLINE_ uint64_t _atomic_conditional_increment_impl(register uint64_t *pw){
 
 	ATOMIC_CONDITIONAL_INCREMENT_BODY(pw, LONGLONG, InterlockedCompareExchange64, uint64_t)
 }
@@ -112,7 +112,7 @@ _ALWAYS_INLINE_ uint64_t _atomic_add_impl(register uint64_t *pw, register uint64
 	return InterlockedAdd64((LONGLONG volatile *)pw, val);
 }
 
-_ALWAYS_INLINE_ uint64_t _atomic_exchange_if_greater_impl(register uint64_t *pw, register uint64_t val) {
+_ALWAYS_INLINE_ uint64_t _atomic_exchange_if_greater_impl(register uint64_t *pw, register uint64_t val){
 
 	ATOMIC_EXCHANGE_IF_GREATER_BODY(pw, val, LONGLONG, InterlockedCompareExchange64, uint64_t)
 }

+ 19 - 19
core/script_debugger_remote.cpp

@@ -989,25 +989,25 @@ void ScriptDebuggerRemote::profiling_set_frame_times(float p_frame_time, float p
 
 ScriptDebuggerRemote::ResourceUsageFunc ScriptDebuggerRemote::resource_usage_func = NULL;
 
-ScriptDebuggerRemote::ScriptDebuggerRemote()
-	: profiling(false),
-	  max_frame_functions(16),
-	  skip_profile_frame(false),
-	  reload_all_scripts(false),
-	  tcp_client(StreamPeerTCP::create_ref()),
-	  packet_peer_stream(Ref<PacketPeerStream>(memnew(PacketPeerStream))),
-	  last_perf_time(0),
-	  performance(Engine::get_singleton()->get_singleton_object("Performance")),
-	  requested_quit(false),
-	  mutex(Mutex::create()),
-	  max_cps(GLOBAL_GET("network/limits/debugger_stdout/max_chars_per_second")),
-	  char_count(0),
-	  last_msec(0),
-	  msec_count(0),
-	  locking(false),
-	  poll_every(0),
-	  request_scene_tree(NULL),
-	  live_edit_funcs(NULL) {
+ScriptDebuggerRemote::ScriptDebuggerRemote() :
+		profiling(false),
+		max_frame_functions(16),
+		skip_profile_frame(false),
+		reload_all_scripts(false),
+		tcp_client(StreamPeerTCP::create_ref()),
+		packet_peer_stream(Ref<PacketPeerStream>(memnew(PacketPeerStream))),
+		last_perf_time(0),
+		performance(Engine::get_singleton()->get_singleton_object("Performance")),
+		requested_quit(false),
+		mutex(Mutex::create()),
+		max_cps(GLOBAL_GET("network/limits/debugger_stdout/max_chars_per_second")),
+		char_count(0),
+		last_msec(0),
+		msec_count(0),
+		locking(false),
+		poll_every(0),
+		request_scene_tree(NULL),
+		live_edit_funcs(NULL) {
 
 	packet_peer_stream->set_stream_peer(tcp_client);
 	packet_peer_stream->set_output_buffer_max_size(1024 * 1024 * 8); //8mb should be way more than enough

+ 4 - 4
core/script_language.cpp

@@ -387,10 +387,10 @@ void PlaceHolderScriptInstance::update(const List<PropertyInfo> &p_properties, c
 	//change notify
 }
 
-PlaceHolderScriptInstance::PlaceHolderScriptInstance(ScriptLanguage *p_language, Ref<Script> p_script, Object *p_owner)
-	: owner(p_owner),
-	  language(p_language),
-	  script(p_script) {
+PlaceHolderScriptInstance::PlaceHolderScriptInstance(ScriptLanguage *p_language, Ref<Script> p_script, Object *p_owner) :
+		owner(p_owner),
+		language(p_language),
+		script(p_script) {
 }
 
 PlaceHolderScriptInstance::~PlaceHolderScriptInstance() {

+ 5 - 5
core/translation.cpp

@@ -876,8 +876,8 @@ void Translation::_bind_methods() {
 	ADD_PROPERTY(PropertyInfo(Variant::STRING, "locale"), "set_locale", "get_locale");
 }
 
-Translation::Translation()
-	: locale("en") {
+Translation::Translation() :
+		locale("en") {
 }
 
 ///////////////////////////////////////////////
@@ -1163,9 +1163,9 @@ void TranslationServer::load_translations() {
 	}
 }
 
-TranslationServer::TranslationServer()
-	: locale("en"),
-	  enabled(true) {
+TranslationServer::TranslationServer() :
+		locale("en"),
+		enabled(true) {
 	singleton = this;
 
 	for (int i = 0; locale_list[i]; ++i) {

+ 3 - 3
core/typedefs.h

@@ -73,7 +73,7 @@ T *_nullptr() {
 
 #define OFFSET_OF(st, m) \
 	((size_t)((char *)&(_nullptr<st>()->m) - (char *)0))
-/**
+	/**
  * Some platforms (devices) not define NULL
  */
 
@@ -81,7 +81,7 @@ T *_nullptr() {
 #define NULL 0
 #endif
 
-/**
+	/**
  * Windows defines a lot of badly stuff we'll never ever use. undefine it.
  */
 
@@ -103,7 +103,7 @@ T *_nullptr() {
 #include "error_list.h"
 #include "error_macros.h"
 
-/** Generic ABS function, for math uses please use Math::abs */
+	/** Generic ABS function, for math uses please use Math::abs */
 
 #ifndef ABS
 #define ABS(m_v) ((m_v < 0) ? (-(m_v)) : (m_v))

+ 1 - 5
core/variant.cpp

@@ -67,7 +67,6 @@ String Variant::get_type_name(Variant::Type p_type) {
 		} break;
 
 		// math types
-
 		case VECTOR2: {
 
 			return "Vector2";
@@ -725,7 +724,6 @@ bool Variant::is_zero() const {
 		} break;
 
 		// math types
-
 		case VECTOR2: {
 
 			return *reinterpret_cast<const Vector2 *>(_data._mem) == Vector2();
@@ -934,7 +932,6 @@ void Variant::reference(const Variant &p_variant) {
 		} break;
 
 		// math types
-
 		case VECTOR2: {
 
 			memnew_placement(_data._mem, Vector2(*reinterpret_cast<const Vector2 *>(p_variant._data._mem)));
@@ -2506,7 +2503,6 @@ void Variant::operator=(const Variant &p_variant) {
 		} break;
 
 		// math types
-
 		case VECTOR2: {
 
 			*reinterpret_cast<Vector2 *>(_data._mem) = *reinterpret_cast<const Vector2 *>(p_variant._data._mem);
@@ -2645,8 +2641,8 @@ uint32_t Variant::hash() const {
 
 			return reinterpret_cast<const String *>(_data._mem)->hash();
 		} break;
-		// math types
 
+		// math types
 		case VECTOR2: {
 
 			uint32_t hash = hash_djb2_one_float(reinterpret_cast<const Vector2 *>(_data._mem)->x);

+ 3 - 3
core/variant_call.cpp

@@ -130,9 +130,9 @@ struct _VariantCall {
 		StringName name;
 		Variant::Type type;
 		Arg() { type = Variant::NIL; }
-		Arg(Variant::Type p_type, const StringName &p_name)
-			: name(p_name),
-			  type(p_type) {
+		Arg(Variant::Type p_type, const StringName &p_name) :
+				name(p_name),
+				type(p_type) {
 		}
 	};
 

+ 1 - 1
drivers/convex_decomp/b2d_decompose.cpp

@@ -153,7 +153,7 @@ static Vector<Vector<Vector2> > _b2d_decompose(const Vector<Vector2> &p_polygon)
 	delete p;
 	return res; // pdarray; //needs to be deleted after body is created
 }
-}
+} // namespace b2ConvexDecomp
 
 Vector<Vector<Vector2> > b2d_decompose(const Vector<Vector2> &p_polygon) {
 

+ 0 - 12
drivers/gles3/rasterizer_scene_gles3.cpp

@@ -1134,18 +1134,6 @@ bool RasterizerSceneGLES3::_setup_material(RasterizerStorageGLES3::Material *p_m
 		state.current_depth_draw = p_material->shader->spatial.depth_draw_mode;
 	}
 
-//glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
-
-/*
-	if (p_material->flags[VS::MATERIAL_FLAG_WIREFRAME])
-		glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
-	else
-		glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
-
-	if (p_material->line_width)
-		glLineWidth(p_material->line_width);
-	*/
-
 #if 0
 	//blend mode
 	if (state.current_blend_mode!=p_material->shader->spatial.blend_mode) {

+ 1 - 1
drivers/gles3/rasterizer_scene_gles3.h

@@ -817,7 +817,7 @@ public:
 
 	void _render_list(RenderList::Element **p_elements, int p_element_count, const Transform &p_view_transform, const CameraMatrix &p_projection, GLuint p_base_env, bool p_reverse_cull, bool p_alpha_pass, bool p_shadow, bool p_directional_add, bool p_directional_shadows);
 
-	_FORCE_INLINE_ void _add_geometry(RasterizerStorageGLES3::Geometry *p_geometry, InstanceBase *p_instance, RasterizerStorageGLES3::GeometryOwner *p_owner, int p_material, bool p_depth_pass,bool p_shadow_pass);
+	_FORCE_INLINE_ void _add_geometry(RasterizerStorageGLES3::Geometry *p_geometry, InstanceBase *p_instance, RasterizerStorageGLES3::GeometryOwner *p_owner, int p_material, bool p_depth_pass, bool p_shadow_pass);
 
 	_FORCE_INLINE_ void _add_geometry_with_material(RasterizerStorageGLES3::Geometry *p_geometry, InstanceBase *p_instance, RasterizerStorageGLES3::GeometryOwner *p_owner, RasterizerStorageGLES3::Material *p_material, bool p_depth_pass, bool p_shadow_pass);
 

+ 12 - 10
drivers/gles3/rasterizer_storage_gles3.h

@@ -486,8 +486,8 @@ public:
 		bool uses_vertex_time;
 		bool uses_fragment_time;
 
-		Shader()
-			: dirty_list(this) {
+		Shader() :
+				dirty_list(this) {
 
 			shader = NULL;
 			ubo_size = 0;
@@ -540,8 +540,9 @@ public:
 		bool can_cast_shadow_cache;
 		bool is_animated_cache;
 
-		Material()
-			: list(this), dirty_list(this) {
+		Material() :
+				list(this),
+				dirty_list(this) {
 			can_cast_shadow_cache = false;
 			is_animated_cache = false;
 			shader = NULL;
@@ -764,8 +765,9 @@ public:
 		bool dirty_aabb;
 		bool dirty_data;
 
-		MultiMesh()
-			: update_list(this), mesh_list(this) {
+		MultiMesh() :
+				update_list(this),
+				mesh_list(this) {
 			dirty_aabb = true;
 			dirty_data = true;
 			xform_floats = 0;
@@ -865,8 +867,8 @@ public:
 		SelfList<Skeleton> update_list;
 		Set<RasterizerScene::InstanceBase *> instances; //instances using skeleton
 
-		Skeleton()
-			: update_list(this) {
+		Skeleton() :
+				update_list(this) {
 			size = 0;
 
 			use_2d = false;
@@ -1116,8 +1118,8 @@ public:
 
 		Transform emission_transform;
 
-		Particles()
-			: particle_element(this) {
+		Particles() :
+				particle_element(this) {
 			cycle_number = 0;
 			emitting = false;
 			one_shot = false;

+ 1 - 4
drivers/unix/ip_unix.cpp

@@ -149,10 +149,7 @@ void IP_Unix::get_local_addresses(List<IP_Address> *r_addresses) const {
 	while (true) {
 
 		addrs = (IP_ADAPTER_ADDRESSES *)memalloc(buf_size);
-		int err = GetAdaptersAddresses(AF_UNSPEC, GAA_FLAG_SKIP_ANYCAST |
-														  GAA_FLAG_SKIP_MULTICAST |
-														  GAA_FLAG_SKIP_DNS_SERVER |
-														  GAA_FLAG_SKIP_FRIENDLY_NAME,
+		int err = GetAdaptersAddresses(AF_UNSPEC, GAA_FLAG_SKIP_ANYCAST | GAA_FLAG_SKIP_MULTICAST | GAA_FLAG_SKIP_DNS_SERVER | GAA_FLAG_SKIP_FRIENDLY_NAME,
 				NULL, addrs, &buf_size);
 		if (err == NO_ERROR) {
 			break;

+ 1 - 1
drivers/unix/os_unix.cpp

@@ -391,7 +391,7 @@ String OS_Unix::get_locale() const {
 	return locale;
 }
 
-Error OS_Unix::open_dynamic_library(const String p_path, void *&p_library_handle,bool p_also_set_library_path) {
+Error OS_Unix::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path) {
 	p_library_handle = dlopen(p_path.utf8().get_data(), RTLD_NOW);
 	if (!p_library_handle) {
 		ERR_EXPLAIN("Can't open dynamic library: " + p_path + ". Error: " + dlerror());

+ 1 - 1
drivers/unix/os_unix.h

@@ -77,7 +77,7 @@ public:
 	//virtual VideoMode get_video_mode() const;
 	//virtual void get_fullscreen_mode_list(List<VideoMode> *p_list) const;
 
-	virtual Error open_dynamic_library(const String p_path, void *&p_library_handle,bool p_also_set_library_path=false);
+	virtual Error open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path = false);
 	virtual Error close_dynamic_library(void *p_library_handle);
 	virtual Error get_dynamic_library_symbol_handle(void *p_library_handle, const String p_name, void *&p_symbol_handle, bool p_optional = false);
 

+ 2 - 2
drivers/xaudio2/audio_driver_xaudio2.h

@@ -48,8 +48,8 @@ class AudioDriverXAudio2 : public AudioDriver {
 	struct XAudio2DriverVoiceCallback : public IXAudio2VoiceCallback {
 
 		HANDLE buffer_end_event;
-		XAudio2DriverVoiceCallback()
-			: buffer_end_event(CreateEvent(NULL, FALSE, FALSE, NULL)) {}
+		XAudio2DriverVoiceCallback() :
+				buffer_end_event(CreateEvent(NULL, FALSE, FALSE, NULL)) {}
 		void STDMETHODCALLTYPE OnBufferEnd(void *pBufferContext) { /*print_line("buffer ended");*/
 			SetEvent(buffer_end_event);
 		}

+ 3 - 2
editor/editor_export.h

@@ -122,8 +122,9 @@ struct SharedObject {
 	String path;
 	Vector<String> tags;
 
-	SharedObject(const String &p_path, const Vector<String> &p_tags)
-		: path(p_path), tags(p_tags) {
+	SharedObject(const String &p_path, const Vector<String> &p_tags) :
+			path(p_path),
+			tags(p_tags) {
 	}
 
 	SharedObject() {}

+ 6 - 4
editor/filesystem_dock.h

@@ -128,10 +128,12 @@ private:
 		String path;
 		bool is_file;
 
-		FileOrFolder()
-			: path(""), is_file(false) {}
-		FileOrFolder(const String &p_path, bool p_is_file)
-			: path(p_path), is_file(p_is_file) {}
+		FileOrFolder() :
+				path(""),
+				is_file(false) {}
+		FileOrFolder(const String &p_path, bool p_is_file) :
+				path(p_path),
+				is_file(p_is_file) {}
 	};
 	FileOrFolder to_rename;
 	Vector<FileOrFolder> to_move;

+ 0 - 2
editor/import/editor_import_collada.cpp

@@ -1913,8 +1913,6 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
 /*************************************** SCENE ***********************************/
 /*********************************************************************************/
 
-#define DEBUG_ANIMATION
-
 uint32_t EditorSceneImporterCollada::get_import_flags() const {
 
 	return IMPORT_SCENE | IMPORT_ANIMATION;

+ 15 - 10
editor/plugins/abstract_polygon_2d_editor.cpp

@@ -32,18 +32,21 @@
 #include "canvas_item_editor_plugin.h"
 #include "core/os/keyboard.h"
 
-AbstractPolygon2DEditor::Vertex::Vertex()
-	: polygon(-1), vertex(-1) {
+AbstractPolygon2DEditor::Vertex::Vertex() :
+		polygon(-1),
+		vertex(-1) {
 	// invalid vertex
 }
 
-AbstractPolygon2DEditor::Vertex::Vertex(int p_vertex)
-	: polygon(-1), vertex(p_vertex) {
+AbstractPolygon2DEditor::Vertex::Vertex(int p_vertex) :
+		polygon(-1),
+		vertex(p_vertex) {
 	// vertex p_vertex of current wip polygon
 }
 
-AbstractPolygon2DEditor::Vertex::Vertex(int p_polygon, int p_vertex)
-	: polygon(p_polygon), vertex(p_vertex) {
+AbstractPolygon2DEditor::Vertex::Vertex(int p_polygon, int p_vertex) :
+		polygon(p_polygon),
+		vertex(p_vertex) {
 	// vertex p_vertex of polygon p_polygon
 }
 
@@ -66,12 +69,14 @@ AbstractPolygon2DEditor::PosVertex::PosVertex() {
 	// invalid vertex
 }
 
-AbstractPolygon2DEditor::PosVertex::PosVertex(const Vertex &p_vertex, const Vector2 &p_pos)
-	: Vertex(p_vertex.polygon, p_vertex.vertex), pos(p_pos) {
+AbstractPolygon2DEditor::PosVertex::PosVertex(const Vertex &p_vertex, const Vector2 &p_pos) :
+		Vertex(p_vertex.polygon, p_vertex.vertex),
+		pos(p_pos) {
 }
 
-AbstractPolygon2DEditor::PosVertex::PosVertex(int p_polygon, int p_vertex, const Vector2 &p_pos)
-	: Vertex(p_polygon, p_vertex), pos(p_pos) {
+AbstractPolygon2DEditor::PosVertex::PosVertex(int p_polygon, int p_vertex, const Vector2 &p_pos) :
+		Vertex(p_polygon, p_vertex),
+		pos(p_pos) {
 }
 
 bool AbstractPolygon2DEditor::_is_empty() const {

+ 2 - 2
editor/plugins/canvas_item_editor_plugin.cpp

@@ -69,8 +69,8 @@ class SnapDialog : public ConfirmationDialog {
 	SpinBox *rotation_step;
 
 public:
-	SnapDialog()
-		: ConfirmationDialog() {
+	SnapDialog() :
+			ConfirmationDialog() {
 		const int SPIN_BOX_GRID_RANGE = 256;
 		const int SPIN_BOX_ROTATION_RANGE = 360;
 		Label *label;

+ 4 - 4
editor/plugins/collision_polygon_2d_editor_plugin.cpp

@@ -39,10 +39,10 @@ void CollisionPolygon2DEditor::_set_node(Node *p_polygon) {
 	node = Object::cast_to<CollisionPolygon2D>(p_polygon);
 }
 
-CollisionPolygon2DEditor::CollisionPolygon2DEditor(EditorNode *p_editor)
-	: AbstractPolygon2DEditor(p_editor) {
+CollisionPolygon2DEditor::CollisionPolygon2DEditor(EditorNode *p_editor) :
+		AbstractPolygon2DEditor(p_editor) {
 }
 
-CollisionPolygon2DEditorPlugin::CollisionPolygon2DEditorPlugin(EditorNode *p_node)
-	: AbstractPolygon2DEditorPlugin(p_node, memnew(CollisionPolygon2DEditor(p_node)), "CollisionPolygon2D") {
+CollisionPolygon2DEditorPlugin::CollisionPolygon2DEditorPlugin(EditorNode *p_node) :
+		AbstractPolygon2DEditorPlugin(p_node, memnew(CollisionPolygon2DEditor(p_node)), "CollisionPolygon2D") {
 }

+ 4 - 2
editor/plugins/curve_editor_plugin.cpp

@@ -586,8 +586,10 @@ struct CanvasItemPlotCurve {
 	Color color1;
 	Color color2;
 
-	CanvasItemPlotCurve(CanvasItem &p_ci, Color p_color1, Color p_color2)
-		: ci(p_ci), color1(p_color1), color2(p_color2) {}
+	CanvasItemPlotCurve(CanvasItem &p_ci, Color p_color1, Color p_color2) :
+			ci(p_ci),
+			color1(p_color1),
+			color2(p_color2) {}
 
 	void operator()(Vector2 pos0, Vector2 pos1, bool in_definition) {
 		ci.draw_line(pos0, pos1, in_definition ? color1 : color2);

+ 4 - 4
editor/plugins/line_2d_editor_plugin.cpp

@@ -61,10 +61,10 @@ void Line2DEditor::_action_set_polygon(int p_idx, const Variant &p_previous, con
 	undo_redo->add_undo_method(node, "set_points", p_previous);
 }
 
-Line2DEditor::Line2DEditor(EditorNode *p_editor)
-	: AbstractPolygon2DEditor(p_editor) {
+Line2DEditor::Line2DEditor(EditorNode *p_editor) :
+		AbstractPolygon2DEditor(p_editor) {
 }
 
-Line2DEditorPlugin::Line2DEditorPlugin(EditorNode *p_node)
-	: AbstractPolygon2DEditorPlugin(p_node, memnew(Line2DEditor(p_node)), "Line2D") {
+Line2DEditorPlugin::Line2DEditorPlugin(EditorNode *p_node) :
+		AbstractPolygon2DEditorPlugin(p_node, memnew(Line2DEditor(p_node)), "Line2D") {
 }

+ 4 - 4
editor/plugins/navigation_polygon_editor_plugin.cpp

@@ -120,10 +120,10 @@ void NavigationPolygonEditor::_create_resource() {
 	_menu_option(MODE_CREATE);
 }
 
-NavigationPolygonEditor::NavigationPolygonEditor(EditorNode *p_editor)
-	: AbstractPolygon2DEditor(p_editor) {
+NavigationPolygonEditor::NavigationPolygonEditor(EditorNode *p_editor) :
+		AbstractPolygon2DEditor(p_editor) {
 }
 
-NavigationPolygonEditorPlugin::NavigationPolygonEditorPlugin(EditorNode *p_node)
-	: AbstractPolygon2DEditorPlugin(p_node, memnew(NavigationPolygonEditor(p_node)), "NavigationPolygonInstance") {
+NavigationPolygonEditorPlugin::NavigationPolygonEditorPlugin(EditorNode *p_node) :
+		AbstractPolygon2DEditorPlugin(p_node, memnew(NavigationPolygonEditor(p_node)), "NavigationPolygonInstance") {
 }

+ 4 - 4
editor/plugins/polygon_2d_editor_plugin.cpp

@@ -459,8 +459,8 @@ Vector2 Polygon2DEditor::snap_point(Vector2 p_target) const {
 	return p_target;
 }
 
-Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor)
-	: AbstractPolygon2DEditor(p_editor) {
+Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) :
+		AbstractPolygon2DEditor(p_editor) {
 
 	snap_step = Vector2(10, 10);
 	use_snap = false;
@@ -609,6 +609,6 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor)
 	uv_edit_draw->set_clip_contents(true);
 }
 
-Polygon2DEditorPlugin::Polygon2DEditorPlugin(EditorNode *p_node)
-	: AbstractPolygon2DEditorPlugin(p_node, memnew(Polygon2DEditor(p_node)), "Polygon2D") {
+Polygon2DEditorPlugin::Polygon2DEditorPlugin(EditorNode *p_node) :
+		AbstractPolygon2DEditorPlugin(p_node, memnew(Polygon2DEditor(p_node)), "Polygon2D") {
 }

+ 1 - 1
editor/project_manager.cpp

@@ -508,7 +508,7 @@ public:
 			} else if (current->has_setting("application/config/name")) {
 				project_name->set_text(current->get("application/config/name"));
 			}
-			
+
 			project_name->call_deferred("grab_focus");
 
 			create_dir->hide();

+ 1 - 1
editor/property_editor.cpp

@@ -3740,8 +3740,8 @@ void PropertyEditor::_item_edited() {
 				_edit_set(name, item->get_text(1), refresh_all);
 			}
 		} break;
-		// math types
 
+		// math types
 		case Variant::VECTOR3: {
 
 		} break;

+ 0 - 1
main/main.cpp

@@ -168,7 +168,6 @@ static String get_full_version_string() {
 }
 
 //#define DEBUG_INIT
-
 #ifdef DEBUG_INIT
 #define MAIN_PRINT(m_txt) print_line(m_txt)
 #else

+ 2 - 2
main/tests/test_gdscript.cpp

@@ -1057,7 +1057,7 @@ MainLoop *test(TestType p_type) {
 
 	return NULL;
 }
-}
+} // namespace TestGDScript
 
 #else
 
@@ -1067,6 +1067,6 @@ MainLoop *test(TestType p_type) {
 
 	return NULL;
 }
-}
+} // namespace TestGDScript
 
 #endif

+ 1 - 1
main/tests/test_gdscript.h

@@ -42,6 +42,6 @@ enum TestType {
 };
 
 MainLoop *test(TestType p_type);
-}
+} // namespace TestGDScript
 
 #endif // TEST_GDSCRIPT_H

+ 1 - 1
main/tests/test_image.cpp

@@ -65,4 +65,4 @@ MainLoop *test() {
 
 	return memnew(TestMainLoop);
 }
-}
+} // namespace TestImage

+ 2 - 2
main/tests/test_io.cpp

@@ -118,7 +118,7 @@ MainLoop *test() {
 
 	return memnew(TestMainLoop);
 }
-}
+} // namespace TestIO
 
 #else
 
@@ -128,5 +128,5 @@ MainLoop *test() {
 
 	return NULL;
 }
-}
+} // namespace TestIO
 #endif

+ 1 - 1
main/tests/test_math.cpp

@@ -684,4 +684,4 @@ MainLoop *test() {
 
 	return NULL;
 }
-}
+} // namespace TestMath

+ 1 - 1
main/tests/test_physics.cpp

@@ -435,4 +435,4 @@ MainLoop *test() {
 
 	return memnew(TestPhysicsMainLoop);
 }
-}
+} // namespace TestPhysics

+ 1 - 1
main/tests/test_physics_2d.cpp

@@ -431,4 +431,4 @@ MainLoop *test() {
 
 	return memnew(TestPhysics2DMainLoop);
 }
-}
+} // namespace TestPhysics2D

+ 1 - 1
main/tests/test_render.cpp

@@ -241,4 +241,4 @@ MainLoop *test() {
 
 	return memnew(TestMainLoop);
 }
-}
+} // namespace TestRender

+ 1 - 1
main/tests/test_shader_lang.cpp

@@ -339,4 +339,4 @@ MainLoop *test() {
 
 	return NULL;
 }
-}
+} // namespace TestShaderLang

+ 1 - 1
main/tests/test_string.cpp

@@ -919,4 +919,4 @@ MainLoop *test() {
 
 	return NULL;
 }
-}
+} // namespace TestString

+ 1 - 1
misc/travis/clang-format.sh

@@ -1,6 +1,6 @@
 #!/bin/sh
 
-CLANG_FORMAT=clang-format-3.9
+CLANG_FORMAT=clang-format-5.0
 
 if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
     # Check the whole commit range against $TRAVIS_BRANCH, the base merge branch

+ 13 - 13
modules/bullet/area_bullet.cpp

@@ -37,19 +37,19 @@
 #include "collision_object_bullet.h"
 #include "space_bullet.h"
 
-AreaBullet::AreaBullet()
-	: RigidCollisionObjectBullet(CollisionObjectBullet::TYPE_AREA),
-	  monitorable(true),
-	  isScratched(false),
-	  spOv_mode(PhysicsServer::AREA_SPACE_OVERRIDE_DISABLED),
-	  spOv_gravityPoint(false),
-	  spOv_gravityPointDistanceScale(0),
-	  spOv_gravityPointAttenuation(1),
-	  spOv_gravityVec(0, -1, 0),
-	  spOv_gravityMag(10),
-	  spOv_linearDump(0.1),
-	  spOv_angularDump(1),
-	  spOv_priority(0) {
+AreaBullet::AreaBullet() :
+		RigidCollisionObjectBullet(CollisionObjectBullet::TYPE_AREA),
+		monitorable(true),
+		isScratched(false),
+		spOv_mode(PhysicsServer::AREA_SPACE_OVERRIDE_DISABLED),
+		spOv_gravityPoint(false),
+		spOv_gravityPointDistanceScale(0),
+		spOv_gravityPointAttenuation(1),
+		spOv_gravityVec(0, -1, 0),
+		spOv_gravityMag(10),
+		spOv_linearDump(0.1),
+		spOv_angularDump(1),
+		spOv_priority(0) {
 
 	btGhost = bulletnew(btGhostObject);
 	btGhost->setCollisionShape(compoundShape);

+ 8 - 6
modules/bullet/area_bullet.h

@@ -47,8 +47,8 @@ public:
 		ObjectID event_callback_id;
 		StringName event_callback_method;
 
-		InOutEventCallback()
-			: event_callback_id(0) {}
+		InOutEventCallback() :
+				event_callback_id(0) {}
 	};
 
 	enum OverlapState {
@@ -62,10 +62,12 @@ public:
 		CollisionObjectBullet *object;
 		OverlapState state;
 
-		OverlappingObjectData()
-			: object(NULL), state(OVERLAP_STATE_ENTER) {}
-		OverlappingObjectData(CollisionObjectBullet *p_object, OverlapState p_state)
-			: object(p_object), state(p_state) {}
+		OverlappingObjectData() :
+				object(NULL),
+				state(OVERLAP_STATE_ENTER) {}
+		OverlappingObjectData(CollisionObjectBullet *p_object, OverlapState p_state) :
+				object(p_object),
+				state(p_state) {}
 		OverlappingObjectData(const OverlappingObjectData &other) {
 			operator=(other);
 		}

+ 3 - 3
modules/bullet/btRayShape.cpp

@@ -33,9 +33,9 @@
 #include "LinearMath/btAabbUtil2.h"
 #include "math/math_funcs.h"
 
-btRayShape::btRayShape(btScalar length)
-	: btConvexInternalShape(),
-	  m_shapeAxis(0, 0, 1) {
+btRayShape::btRayShape(btScalar length) :
+		btConvexInternalShape(),
+		m_shapeAxis(0, 0, 1) {
 	m_shapeType = CUSTOM_CONVEX_SHAPE_TYPE;
 	setLength(length);
 }

+ 4 - 4
modules/bullet/bullet_physics_server.cpp

@@ -78,10 +78,10 @@ void BulletPhysicsServer::_bind_methods() {
 	//ClassDB::bind_method(D_METHOD("DoTest"), &BulletPhysicsServer::DoTest);
 }
 
-BulletPhysicsServer::BulletPhysicsServer()
-	: PhysicsServer(),
-	  active(true),
-	  active_spaces_count(0) {}
+BulletPhysicsServer::BulletPhysicsServer() :
+		PhysicsServer(),
+		active(true),
+		active_spaces_count(0) {}
 
 BulletPhysicsServer::~BulletPhysicsServer() {}
 

+ 11 - 4
modules/bullet/collision_object_bullet.cpp

@@ -50,8 +50,14 @@ void CollisionObjectBullet::ShapeWrapper::set_transform(const btTransform &p_tra
 	transform = p_transform;
 }
 
-CollisionObjectBullet::CollisionObjectBullet(Type p_type)
-	: RIDBullet(), space(NULL), type(p_type), collisionsEnabled(true), m_isStatic(false), bt_collision_object(NULL), body_scale(1., 1., 1.) {}
+CollisionObjectBullet::CollisionObjectBullet(Type p_type) :
+		RIDBullet(),
+		space(NULL),
+		type(p_type),
+		collisionsEnabled(true),
+		m_isStatic(false),
+		bt_collision_object(NULL),
+		body_scale(1., 1., 1.) {}
 
 CollisionObjectBullet::~CollisionObjectBullet() {
 	// Remove all overlapping
@@ -165,8 +171,9 @@ const btTransform &CollisionObjectBullet::get_transform__bullet() const {
 	return bt_collision_object->getWorldTransform();
 }
 
-RigidCollisionObjectBullet::RigidCollisionObjectBullet(Type p_type)
-	: CollisionObjectBullet(p_type), compoundShape(bulletnew(btCompoundShape(enableDynamicAabbTree, initialChildCapacity))) {
+RigidCollisionObjectBullet::RigidCollisionObjectBullet(Type p_type) :
+		CollisionObjectBullet(p_type),
+		compoundShape(bulletnew(btCompoundShape(enableDynamicAabbTree, initialChildCapacity))) {
 }
 
 RigidCollisionObjectBullet::~RigidCollisionObjectBullet() {

+ 13 - 7
modules/bullet/collision_object_bullet.h

@@ -70,16 +70,22 @@ public:
 		btTransform transform;
 		bool active;
 
-		ShapeWrapper()
-			: shape(NULL), bt_shape(NULL), active(true) {}
-
-		ShapeWrapper(ShapeBullet *p_shape, const btTransform &p_transform, bool p_active)
-			: shape(p_shape), bt_shape(NULL), active(p_active) {
+		ShapeWrapper() :
+				shape(NULL),
+				bt_shape(NULL),
+				active(true) {}
+
+		ShapeWrapper(ShapeBullet *p_shape, const btTransform &p_transform, bool p_active) :
+				shape(p_shape),
+				bt_shape(NULL),
+				active(p_active) {
 			set_transform(p_transform);
 		}
 
-		ShapeWrapper(ShapeBullet *p_shape, const Transform &p_transform, bool p_active)
-			: shape(p_shape), bt_shape(NULL), active(p_active) {
+		ShapeWrapper(ShapeBullet *p_shape, const Transform &p_transform, bool p_active) :
+				shape(p_shape),
+				bt_shape(NULL),
+				active(p_active) {
 			set_transform(p_transform);
 		}
 		~ShapeWrapper();

+ 2 - 2
modules/bullet/cone_twist_joint_bullet.cpp

@@ -35,8 +35,8 @@
 #include "bullet_utilities.h"
 #include "rigid_body_bullet.h"
 
-ConeTwistJointBullet::ConeTwistJointBullet(RigidBodyBullet *rbA, RigidBodyBullet *rbB, const Transform &rbAFrame, const Transform &rbBFrame)
-	: JointBullet() {
+ConeTwistJointBullet::ConeTwistJointBullet(RigidBodyBullet *rbA, RigidBodyBullet *rbB, const Transform &rbAFrame, const Transform &rbBFrame) :
+		JointBullet() {
 	btTransform btFrameA;
 	G_TO_B(rbAFrame, btFrameA);
 	if (rbB) {

+ 3 - 2
modules/bullet/constraint_bullet.cpp

@@ -33,8 +33,9 @@
 #include "collision_object_bullet.h"
 #include "space_bullet.h"
 
-ConstraintBullet::ConstraintBullet()
-	: space(NULL), constraint(NULL) {}
+ConstraintBullet::ConstraintBullet() :
+		space(NULL),
+		constraint(NULL) {}
 
 void ConstraintBullet::setup(btTypedConstraint *p_constraint) {
 	constraint = p_constraint;

+ 2 - 2
modules/bullet/generic_6dof_joint_bullet.cpp

@@ -35,8 +35,8 @@
 #include "bullet_utilities.h"
 #include "rigid_body_bullet.h"
 
-Generic6DOFJointBullet::Generic6DOFJointBullet(RigidBodyBullet *rbA, RigidBodyBullet *rbB, const Transform &frameInA, const Transform &frameInB, bool useLinearReferenceFrameA)
-	: JointBullet() {
+Generic6DOFJointBullet::Generic6DOFJointBullet(RigidBodyBullet *rbA, RigidBodyBullet *rbB, const Transform &frameInA, const Transform &frameInB, bool useLinearReferenceFrameA) :
+		JointBullet() {
 
 	btTransform btFrameA;
 	G_TO_B(frameInA, btFrameA);

+ 2 - 2
modules/bullet/godot_collision_configuration.cpp

@@ -34,8 +34,8 @@
 #include "BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h"
 #include "godot_ray_world_algorithm.h"
 
-GodotCollisionConfiguration::GodotCollisionConfiguration(const btDiscreteDynamicsWorld *world, const btDefaultCollisionConstructionInfo &constructionInfo)
-	: btDefaultCollisionConfiguration(constructionInfo) {
+GodotCollisionConfiguration::GodotCollisionConfiguration(const btDiscreteDynamicsWorld *world, const btDefaultCollisionConstructionInfo &constructionInfo) :
+		btDefaultCollisionConfiguration(constructionInfo) {
 
 	void *mem = NULL;
 

+ 2 - 2
modules/bullet/godot_collision_dispatcher.cpp

@@ -34,8 +34,8 @@
 
 const int GodotCollisionDispatcher::CASTED_TYPE_AREA = static_cast<int>(CollisionObjectBullet::TYPE_AREA);
 
-GodotCollisionDispatcher::GodotCollisionDispatcher(btCollisionConfiguration *collisionConfiguration)
-	: btCollisionDispatcher(collisionConfiguration) {}
+GodotCollisionDispatcher::GodotCollisionDispatcher(btCollisionConfiguration *collisionConfiguration) :
+		btCollisionDispatcher(collisionConfiguration) {}
 
 bool GodotCollisionDispatcher::needsCollision(const btCollisionObject *body0, const btCollisionObject *body1) {
 	if (body0->getUserIndex() == CASTED_TYPE_AREA || body1->getUserIndex() == CASTED_TYPE_AREA) {

+ 4 - 4
modules/bullet/godot_motion_state.h

@@ -51,10 +51,10 @@ class GodotMotionState : public btMotionState {
 	RigidBodyBullet *owner;
 
 public:
-	GodotMotionState(RigidBodyBullet *p_owner)
-		: bodyKinematicWorldTransf(btMatrix3x3(1., 0., 0., 0., 1., 0., 0., 0., 1.), btVector3(0., 0., 0.)),
-		  bodyCurrentWorldTransform(btMatrix3x3(1., 0., 0., 0., 1., 0., 0., 0., 1.), btVector3(0., 0., 0.)),
-		  owner(p_owner) {}
+	GodotMotionState(RigidBodyBullet *p_owner) :
+			bodyKinematicWorldTransf(btMatrix3x3(1., 0., 0., 0., 1., 0., 0., 0., 1.), btVector3(0., 0., 0.)),
+			bodyCurrentWorldTransform(btMatrix3x3(1., 0., 0., 0., 1., 0., 0., 0., 1.), btVector3(0., 0., 0.)),
+			owner(p_owner) {}
 
 	/// IMPORTANT DON'T USE THIS FUNCTION TO KNOW THE CURRENT BODY TRANSFORM
 	/// This class is used internally by Bullet

+ 12 - 12
modules/bullet/godot_ray_world_algorithm.cpp

@@ -34,18 +34,18 @@
 #include "btRayShape.h"
 #include "collision_object_bullet.h"
 
-GodotRayWorldAlgorithm::CreateFunc::CreateFunc(const btDiscreteDynamicsWorld *world)
-	: m_world(world) {}
-
-GodotRayWorldAlgorithm::SwappedCreateFunc::SwappedCreateFunc(const btDiscreteDynamicsWorld *world)
-	: m_world(world) {}
-
-GodotRayWorldAlgorithm::GodotRayWorldAlgorithm(const btDiscreteDynamicsWorld *world, btPersistentManifold *mf, const btCollisionAlgorithmConstructionInfo &ci, const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, bool isSwapped)
-	: btActivatingCollisionAlgorithm(ci, body0Wrap, body1Wrap),
-	  m_manifoldPtr(mf),
-	  m_ownManifold(false),
-	  m_world(world),
-	  m_isSwapped(isSwapped) {}
+GodotRayWorldAlgorithm::CreateFunc::CreateFunc(const btDiscreteDynamicsWorld *world) :
+		m_world(world) {}
+
+GodotRayWorldAlgorithm::SwappedCreateFunc::SwappedCreateFunc(const btDiscreteDynamicsWorld *world) :
+		m_world(world) {}
+
+GodotRayWorldAlgorithm::GodotRayWorldAlgorithm(const btDiscreteDynamicsWorld *world, btPersistentManifold *mf, const btCollisionAlgorithmConstructionInfo &ci, const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, bool isSwapped) :
+		btActivatingCollisionAlgorithm(ci, body0Wrap, body1Wrap),
+		m_manifoldPtr(mf),
+		m_ownManifold(false),
+		m_world(world),
+		m_isSwapped(isSwapped) {}
 
 GodotRayWorldAlgorithm::~GodotRayWorldAlgorithm() {
 	if (m_ownManifold && m_manifoldPtr) {

+ 40 - 20
modules/bullet/godot_result_callbacks.h

@@ -52,8 +52,10 @@ struct GodotClosestRayResultCallback : public btCollisionWorld::ClosestRayResult
 	bool m_pickRay;
 
 public:
-	GodotClosestRayResultCallback(const btVector3 &rayFromWorld, const btVector3 &rayToWorld, const Set<RID> *p_exclude)
-		: btCollisionWorld::ClosestRayResultCallback(rayFromWorld, rayToWorld), m_exclude(p_exclude), m_pickRay(false) {}
+	GodotClosestRayResultCallback(const btVector3 &rayFromWorld, const btVector3 &rayToWorld, const Set<RID> *p_exclude) :
+			btCollisionWorld::ClosestRayResultCallback(rayFromWorld, rayToWorld),
+			m_exclude(p_exclude),
+			m_pickRay(false) {}
 
 	virtual bool needsCollision(btBroadphaseProxy *proxy0) const;
 };
@@ -66,8 +68,11 @@ public:
 	int count;
 	const Set<RID> *m_exclude;
 
-	GodotAllConvexResultCallback(PhysicsDirectSpaceState::ShapeResult *p_results, int p_resultMax, const Set<RID> *p_exclude)
-		: m_results(p_results), m_exclude(p_exclude), m_resultMax(p_resultMax), count(0) {}
+	GodotAllConvexResultCallback(PhysicsDirectSpaceState::ShapeResult *p_results, int p_resultMax, const Set<RID> *p_exclude) :
+			m_results(p_results),
+			m_exclude(p_exclude),
+			m_resultMax(p_resultMax),
+			count(0) {}
 
 	virtual bool needsCollision(btBroadphaseProxy *proxy0) const;
 
@@ -79,8 +84,10 @@ public:
 	const RigidBodyBullet *m_self_object;
 	const bool m_ignore_areas;
 
-	GodotKinClosestConvexResultCallback(const btVector3 &convexFromWorld, const btVector3 &convexToWorld, const RigidBodyBullet *p_self_object, bool p_ignore_areas)
-		: btCollisionWorld::ClosestConvexResultCallback(convexFromWorld, convexToWorld), m_self_object(p_self_object), m_ignore_areas(p_ignore_areas) {}
+	GodotKinClosestConvexResultCallback(const btVector3 &convexFromWorld, const btVector3 &convexToWorld, const RigidBodyBullet *p_self_object, bool p_ignore_areas) :
+			btCollisionWorld::ClosestConvexResultCallback(convexFromWorld, convexToWorld),
+			m_self_object(p_self_object),
+			m_ignore_areas(p_ignore_areas) {}
 
 	virtual bool needsCollision(btBroadphaseProxy *proxy0) const;
 };
@@ -90,8 +97,9 @@ public:
 	const Set<RID> *m_exclude;
 	int m_shapeId;
 
-	GodotClosestConvexResultCallback(const btVector3 &convexFromWorld, const btVector3 &convexToWorld, const Set<RID> *p_exclude)
-		: btCollisionWorld::ClosestConvexResultCallback(convexFromWorld, convexToWorld), m_exclude(p_exclude) {}
+	GodotClosestConvexResultCallback(const btVector3 &convexFromWorld, const btVector3 &convexToWorld, const Set<RID> *p_exclude) :
+			btCollisionWorld::ClosestConvexResultCallback(convexFromWorld, convexToWorld),
+			m_exclude(p_exclude) {}
 
 	virtual bool needsCollision(btBroadphaseProxy *proxy0) const;
 
@@ -106,8 +114,12 @@ public:
 	int m_count;
 	const Set<RID> *m_exclude;
 
-	GodotAllContactResultCallback(btCollisionObject *p_self_object, PhysicsDirectSpaceState::ShapeResult *p_results, int p_resultMax, const Set<RID> *p_exclude)
-		: m_self_object(p_self_object), m_results(p_results), m_exclude(p_exclude), m_resultMax(p_resultMax), m_count(0) {}
+	GodotAllContactResultCallback(btCollisionObject *p_self_object, PhysicsDirectSpaceState::ShapeResult *p_results, int p_resultMax, const Set<RID> *p_exclude) :
+			m_self_object(p_self_object),
+			m_results(p_results),
+			m_exclude(p_exclude),
+			m_resultMax(p_resultMax),
+			m_count(0) {}
 
 	virtual bool needsCollision(btBroadphaseProxy *proxy0) const;
 
@@ -123,8 +135,12 @@ public:
 	int m_count;
 	const Set<RID> *m_exclude;
 
-	GodotContactPairContactResultCallback(btCollisionObject *p_self_object, Vector3 *p_results, int p_resultMax, const Set<RID> *p_exclude)
-		: m_self_object(p_self_object), m_results(p_results), m_exclude(p_exclude), m_resultMax(p_resultMax), m_count(0) {}
+	GodotContactPairContactResultCallback(btCollisionObject *p_self_object, Vector3 *p_results, int p_resultMax, const Set<RID> *p_exclude) :
+			m_self_object(p_self_object),
+			m_results(p_results),
+			m_exclude(p_exclude),
+			m_resultMax(p_resultMax),
+			m_count(0) {}
 
 	virtual bool needsCollision(btBroadphaseProxy *proxy0) const;
 
@@ -141,8 +157,12 @@ public:
 	btVector3 m_rest_info_bt_point;
 	const Set<RID> *m_exclude;
 
-	GodotRestInfoContactResultCallback(btCollisionObject *p_self_object, PhysicsDirectSpaceState::ShapeRestInfo *p_result, const Set<RID> *p_exclude)
-		: m_self_object(p_self_object), m_result(p_result), m_exclude(p_exclude), m_collided(false), m_min_distance(0) {}
+	GodotRestInfoContactResultCallback(btCollisionObject *p_self_object, PhysicsDirectSpaceState::ShapeRestInfo *p_result, const Set<RID> *p_exclude) :
+			m_self_object(p_self_object),
+			m_result(p_result),
+			m_exclude(p_exclude),
+			m_collided(false),
+			m_min_distance(0) {}
 
 	virtual bool needsCollision(btBroadphaseProxy *proxy0) const;
 
@@ -158,12 +178,12 @@ struct GodotDeepPenetrationContactResultCallback : public btManifoldResult {
 
 	btScalar m_most_penetrated_distance;
 
-	GodotDeepPenetrationContactResultCallback(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap)
-		: btManifoldResult(body0Wrap, body1Wrap),
-		  m_pointCollisionObject(NULL),
-		  m_penetration_distance(0),
-		  m_other_compound_shape_index(0),
-		  m_most_penetrated_distance(1e20) {}
+	GodotDeepPenetrationContactResultCallback(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap) :
+			btManifoldResult(body0Wrap, body1Wrap),
+			m_pointCollisionObject(NULL),
+			m_penetration_distance(0),
+			m_other_compound_shape_index(0),
+			m_most_penetrated_distance(1e20) {}
 
 	void reset() {
 		m_pointCollisionObject = NULL;

+ 4 - 4
modules/bullet/hinge_joint_bullet.cpp

@@ -35,8 +35,8 @@
 #include "bullet_utilities.h"
 #include "rigid_body_bullet.h"
 
-HingeJointBullet::HingeJointBullet(RigidBodyBullet *rbA, RigidBodyBullet *rbB, const Transform &frameA, const Transform &frameB)
-	: JointBullet() {
+HingeJointBullet::HingeJointBullet(RigidBodyBullet *rbA, RigidBodyBullet *rbB, const Transform &frameA, const Transform &frameB) :
+		JointBullet() {
 	btTransform btFrameA;
 	G_TO_B(frameA, btFrameA);
 
@@ -53,8 +53,8 @@ HingeJointBullet::HingeJointBullet(RigidBodyBullet *rbA, RigidBodyBullet *rbB, c
 	setup(hingeConstraint);
 }
 
-HingeJointBullet::HingeJointBullet(RigidBodyBullet *rbA, RigidBodyBullet *rbB, const Vector3 &pivotInA, const Vector3 &pivotInB, const Vector3 &axisInA, const Vector3 &axisInB)
-	: JointBullet() {
+HingeJointBullet::HingeJointBullet(RigidBodyBullet *rbA, RigidBodyBullet *rbB, const Vector3 &pivotInA, const Vector3 &pivotInB, const Vector3 &axisInA, const Vector3 &axisInB) :
+		JointBullet() {
 
 	btVector3 btPivotA;
 	btVector3 btAxisA;

+ 2 - 2
modules/bullet/joint_bullet.cpp

@@ -32,7 +32,7 @@
 #include "joint_bullet.h"
 #include "space_bullet.h"
 
-JointBullet::JointBullet()
-	: ConstraintBullet() {}
+JointBullet::JointBullet() :
+		ConstraintBullet() {}
 
 JointBullet::~JointBullet() {}

+ 2 - 2
modules/bullet/pin_joint_bullet.cpp

@@ -34,8 +34,8 @@
 #include "bullet_types_converter.h"
 #include "rigid_body_bullet.h"
 
-PinJointBullet::PinJointBullet(RigidBodyBullet *p_body_a, const Vector3 &p_pos_a, RigidBodyBullet *p_body_b, const Vector3 &p_pos_b)
-	: JointBullet() {
+PinJointBullet::PinJointBullet(RigidBodyBullet *p_body_a, const Vector3 &p_pos_a, RigidBodyBullet *p_body_b, const Vector3 &p_pos_b) :
+		JointBullet() {
 	if (p_body_b) {
 
 		btVector3 btPivotA;

+ 19 - 19
modules/bullet/rigid_body_bullet.cpp

@@ -176,9 +176,9 @@ PhysicsDirectSpaceState *BulletPhysicsDirectBodyState::get_space_state() {
 	return body->get_space()->get_direct_state();
 }
 
-RigidBodyBullet::KinematicUtilities::KinematicUtilities(RigidBodyBullet *p_owner)
-	: owner(p_owner),
-	  safe_margin(0.001) {
+RigidBodyBullet::KinematicUtilities::KinematicUtilities(RigidBodyBullet *p_owner) :
+		owner(p_owner),
+		safe_margin(0.001) {
 }
 
 RigidBodyBullet::KinematicUtilities::~KinematicUtilities() {
@@ -250,22 +250,22 @@ void RigidBodyBullet::KinematicUtilities::just_delete_shapes(int new_size) {
 	shapes.resize(new_size);
 }
 
-RigidBodyBullet::RigidBodyBullet()
-	: RigidCollisionObjectBullet(CollisionObjectBullet::TYPE_RIGID_BODY),
-	  kinematic_utilities(NULL),
-	  gravity_scale(1),
-	  mass(1),
-	  linearDamp(0),
-	  angularDamp(0),
-	  can_sleep(true),
-	  force_integration_callback(NULL),
-	  isTransformChanged(false),
-	  maxCollisionsDetection(0),
-	  collisionsCount(0),
-	  maxAreasWhereIam(10),
-	  areaWhereIamCount(0),
-	  countGravityPointSpaces(0),
-	  isScratchedSpaceOverrideModificator(false) {
+RigidBodyBullet::RigidBodyBullet() :
+		RigidCollisionObjectBullet(CollisionObjectBullet::TYPE_RIGID_BODY),
+		kinematic_utilities(NULL),
+		gravity_scale(1),
+		mass(1),
+		linearDamp(0),
+		angularDamp(0),
+		can_sleep(true),
+		force_integration_callback(NULL),
+		isTransformChanged(false),
+		maxCollisionsDetection(0),
+		collisionsCount(0),
+		maxAreasWhereIam(10),
+		areaWhereIamCount(0),
+		countGravityPointSpaces(0),
+		isScratchedSpaceOverrideModificator(false) {
 
 	godotMotionState = bulletnew(GodotMotionState(this));
 

+ 2 - 2
modules/bullet/rigid_body_bullet.h

@@ -156,8 +156,8 @@ public:
 		class btConvexShape *shape;
 		btTransform transform;
 
-		KinematicShape()
-			: shape(NULL) {}
+		KinematicShape() :
+				shape(NULL) {}
 		const bool is_active() const { return shape; }
 	};
 

+ 18 - 16
modules/bullet/shape_bullet.cpp

@@ -130,8 +130,8 @@ btRayShape *ShapeBullet::create_shape_ray(real_t p_length) {
 
 /* PLANE */
 
-PlaneShapeBullet::PlaneShapeBullet()
-	: ShapeBullet() {}
+PlaneShapeBullet::PlaneShapeBullet() :
+		ShapeBullet() {}
 
 void PlaneShapeBullet::set_data(const Variant &p_data) {
 	setup(p_data);
@@ -158,8 +158,8 @@ btCollisionShape *PlaneShapeBullet::create_bt_shape() {
 
 /* Sphere */
 
-SphereShapeBullet::SphereShapeBullet()
-	: ShapeBullet() {}
+SphereShapeBullet::SphereShapeBullet() :
+		ShapeBullet() {}
 
 void SphereShapeBullet::set_data(const Variant &p_data) {
 	setup(p_data);
@@ -183,8 +183,8 @@ btCollisionShape *SphereShapeBullet::create_bt_shape() {
 }
 
 /* Box */
-BoxShapeBullet::BoxShapeBullet()
-	: ShapeBullet() {}
+BoxShapeBullet::BoxShapeBullet() :
+		ShapeBullet() {}
 
 void BoxShapeBullet::set_data(const Variant &p_data) {
 	setup(p_data);
@@ -211,8 +211,8 @@ btCollisionShape *BoxShapeBullet::create_bt_shape() {
 
 /* Capsule */
 
-CapsuleShapeBullet::CapsuleShapeBullet()
-	: ShapeBullet() {}
+CapsuleShapeBullet::CapsuleShapeBullet() :
+		ShapeBullet() {}
 
 void CapsuleShapeBullet::set_data(const Variant &p_data) {
 	Dictionary d = p_data;
@@ -244,8 +244,8 @@ btCollisionShape *CapsuleShapeBullet::create_bt_shape() {
 
 /* Convex polygon */
 
-ConvexPolygonShapeBullet::ConvexPolygonShapeBullet()
-	: ShapeBullet() {}
+ConvexPolygonShapeBullet::ConvexPolygonShapeBullet() :
+		ShapeBullet() {}
 
 void ConvexPolygonShapeBullet::set_data(const Variant &p_data) {
 	setup(p_data);
@@ -286,8 +286,9 @@ btCollisionShape *ConvexPolygonShapeBullet::create_bt_shape() {
 
 /* Concave polygon */
 
-ConcavePolygonShapeBullet::ConcavePolygonShapeBullet()
-	: ShapeBullet(), meshShape(NULL) {}
+ConcavePolygonShapeBullet::ConcavePolygonShapeBullet() :
+		ShapeBullet(),
+		meshShape(NULL) {}
 
 ConcavePolygonShapeBullet::~ConcavePolygonShapeBullet() {
 	if (meshShape) {
@@ -359,8 +360,8 @@ btCollisionShape *ConcavePolygonShapeBullet::create_bt_shape() {
 
 /* Height map shape */
 
-HeightMapShapeBullet::HeightMapShapeBullet()
-	: ShapeBullet() {}
+HeightMapShapeBullet::HeightMapShapeBullet() :
+		ShapeBullet() {}
 
 void HeightMapShapeBullet::set_data(const Variant &p_data) {
 	ERR_FAIL_COND(p_data.get_type() != Variant::DICTIONARY);
@@ -411,8 +412,9 @@ btCollisionShape *HeightMapShapeBullet::create_bt_shape() {
 }
 
 /* Ray shape */
-RayShapeBullet::RayShapeBullet()
-	: ShapeBullet(), length(1) {}
+RayShapeBullet::RayShapeBullet() :
+		ShapeBullet(),
+		length(1) {}
 
 void RayShapeBullet::set_data(const Variant &p_data) {
 	setup(p_data);

+ 2 - 2
modules/bullet/slider_joint_bullet.cpp

@@ -35,8 +35,8 @@
 #include "bullet_utilities.h"
 #include "rigid_body_bullet.h"
 
-SliderJointBullet::SliderJointBullet(RigidBodyBullet *rbA, RigidBodyBullet *rbB, const Transform &frameInA, const Transform &frameInB)
-	: JointBullet() {
+SliderJointBullet::SliderJointBullet(RigidBodyBullet *rbA, RigidBodyBullet *rbB, const Transform &frameInA, const Transform &frameInB) :
+		JointBullet() {
 	btTransform btFrameA;
 	G_TO_B(frameInA, btFrameA);
 	if (rbB) {

+ 12 - 2
modules/bullet/soft_body_bullet.cpp

@@ -36,8 +36,18 @@
 
 #include "scene/3d/immediate_geometry.h"
 
-SoftBodyBullet::SoftBodyBullet()
-	: CollisionObjectBullet(CollisionObjectBullet::TYPE_SOFT_BODY), mass(1), simulation_precision(5), stiffness(0.5f), pressure_coefficient(50), damping_coefficient(0.005), drag_coefficient(0.005), bt_soft_body(NULL), soft_shape_type(SOFT_SHAPETYPE_NONE), isScratched(false), soft_body_shape_data(NULL) {
+SoftBodyBullet::SoftBodyBullet() :
+		CollisionObjectBullet(CollisionObjectBullet::TYPE_SOFT_BODY),
+		mass(1),
+		simulation_precision(5),
+		stiffness(0.5f),
+		pressure_coefficient(50),
+		damping_coefficient(0.005),
+		drag_coefficient(0.005),
+		bt_soft_body(NULL),
+		soft_shape_type(SOFT_SHAPETYPE_NONE),
+		isScratched(false),
+		soft_body_shape_data(NULL) {
 
 	test_geometry = memnew(ImmediateGeometry);
 

+ 27 - 26
modules/bullet/space_bullet.cpp

@@ -50,8 +50,9 @@
 #include "ustring.h"
 #include <assert.h>
 
-BulletPhysicsDirectSpaceState::BulletPhysicsDirectSpaceState(SpaceBullet *p_space)
-	: PhysicsDirectSpaceState(), space(p_space) {}
+BulletPhysicsDirectSpaceState::BulletPhysicsDirectSpaceState(SpaceBullet *p_space) :
+		PhysicsDirectSpaceState(),
+		space(p_space) {}
 
 int BulletPhysicsDirectSpaceState::intersect_point(const Vector3 &p_point, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude, uint32_t p_collision_mask) {
 
@@ -330,18 +331,18 @@ Vector3 BulletPhysicsDirectSpaceState::get_closest_point_to_object_volume(RID p_
 	}
 }
 
-SpaceBullet::SpaceBullet(bool p_create_soft_world)
-	: broadphase(NULL),
-	  dispatcher(NULL),
-	  solver(NULL),
-	  collisionConfiguration(NULL),
-	  dynamicsWorld(NULL),
-	  soft_body_world_info(NULL),
-	  ghostPairCallback(NULL),
-	  godotFilterCallback(NULL),
-	  gravityDirection(0, -1, 0),
-	  gravityMagnitude(10),
-	  contactDebugCount(0) {
+SpaceBullet::SpaceBullet(bool p_create_soft_world) :
+		broadphase(NULL),
+		dispatcher(NULL),
+		solver(NULL),
+		collisionConfiguration(NULL),
+		dynamicsWorld(NULL),
+		soft_body_world_info(NULL),
+		ghostPairCallback(NULL),
+		godotFilterCallback(NULL),
+		gravityDirection(0, -1, 0),
+		gravityMagnitude(10),
+		contactDebugCount(0) {
 
 	create_empty_world(p_create_soft_world);
 	direct_access = memnew(BulletPhysicsDirectSpaceState(this));
@@ -939,14 +940,14 @@ bool SpaceBullet::test_body_motion(RigidBodyBullet *p_body, const Transform &p_f
 				r_result->collider_shape = r_recover_result.other_compound_shape_index;
 				r_result->collision_local_shape = r_recover_result.local_shape_most_recovered;
 
-//{ /// Add manifold point to manage collisions
-//    btPersistentManifold* manifold = dynamicsWorld->getDispatcher()->getNewManifold(p_body->getBtBody(), btRigid);
-//    btManifoldPoint manifoldPoint(result_callabck.m_pointWorld, result_callabck.m_pointWorld, result_callabck.m_pointNormalWorld, result_callabck.m_penetration_distance);
-//    manifoldPoint.m_index0 = r_result->collision_local_shape;
-//    manifoldPoint.m_index1 = r_result->collider_shape;
-//    manifold->addManifoldPoint(manifoldPoint);
-//    p_body->get_kinematic_utilities()->m_generatedManifold.push_back(manifold);
-//}
+				//{ /// Add manifold point to manage collisions
+				//    btPersistentManifold* manifold = dynamicsWorld->getDispatcher()->getNewManifold(p_body->getBtBody(), btRigid);
+				//    btManifoldPoint manifoldPoint(result_callabck.m_pointWorld, result_callabck.m_pointWorld, result_callabck.m_pointNormalWorld, result_callabck.m_penetration_distance);
+				//    manifoldPoint.m_index0 = r_result->collision_local_shape;
+				//    manifoldPoint.m_index1 = r_result->collider_shape;
+				//    manifold->addManifoldPoint(manifoldPoint);
+				//    p_body->get_kinematic_utilities()->m_generatedManifold.push_back(manifold);
+				//}
 
 #if debug_test_motion
 				Vector3 sup_line2;
@@ -979,10 +980,10 @@ public:
 	Vector<btCollisionObject *> result_collision_objects;
 
 public:
-	RecoverPenetrationBroadPhaseCallback(const btCollisionObject *p_self_collision_object, uint32_t p_collision_layer, uint32_t p_collision_mask)
-		: self_collision_object(p_self_collision_object),
-		  collision_layer(p_collision_layer),
-		  collision_mask(p_collision_mask) {}
+	RecoverPenetrationBroadPhaseCallback(const btCollisionObject *p_self_collision_object, uint32_t p_collision_layer, uint32_t p_collision_mask) :
+			self_collision_object(p_self_collision_object),
+			collision_layer(p_collision_layer),
+			collision_mask(p_collision_mask) {}
 
 	virtual ~RecoverPenetrationBroadPhaseCallback() {}
 

+ 2 - 2
modules/bullet/space_bullet.h

@@ -185,8 +185,8 @@ private:
 		const btCollisionObject *other_collision_object;
 		int local_shape_most_recovered;
 
-		RecoverResult()
-			: hasPenetration(false) {}
+		RecoverResult() :
+				hasPenetration(false) {}
 	};
 
 	bool recover_from_penetration(RigidBodyBullet *p_body, const btTransform &p_from, btVector3 &r_recover_position, RecoverResult *r_recover_result = NULL);

+ 1 - 1
modules/gdnative/arvr/arvr_interface_gdnative.cpp

@@ -219,7 +219,7 @@ extern "C" {
 void GDAPI godot_arvr_register_interface(const godot_arvr_interface_gdnative *p_interface) {
 	Ref<ARVRInterfaceGDNative> new_interface;
 	new_interface.instance();
-	new_interface->set_interface((godot_arvr_interface_gdnative * const)p_interface);
+	new_interface->set_interface((godot_arvr_interface_gdnative *const)p_interface);
 	ARVRServer::get_singleton()->add_interface(new_interface);
 }
 

+ 1 - 1
modules/gdnative/gdnative.cpp

@@ -144,7 +144,7 @@ bool GDNative::initialize() {
 		}
 	}
 
-	Error err = OS::get_singleton()->open_dynamic_library(path, native_handle,true);
+	Error err = OS::get_singleton()->open_dynamic_library(path, native_handle, true);
 	if (err != OK) {
 		return false;
 	}

+ 2 - 2
modules/gdnative/gdnative.h

@@ -106,8 +106,8 @@ struct GDNativeCallRegistry {
 		return singleton;
 	}
 
-	inline GDNativeCallRegistry()
-		: native_calls() {}
+	inline GDNativeCallRegistry() :
+			native_calls() {}
 
 	Map<StringName, native_call_cb> native_calls;
 

+ 0 - 2
modules/gdnative/nativescript/api_generator.cpp

@@ -468,8 +468,6 @@ static List<String> generate_c_api_json(const List<ClassAPI> &p_api) {
 	return source;
 }
 
-//
-
 #endif
 
 /*

+ 5 - 5
modules/gdnative/nativescript/nativescript.cpp

@@ -437,11 +437,11 @@ NativeScript::~NativeScript() {
 #endif
 }
 
-//
-//
-// ScriptInstance stuff
-//
-//
+	//
+	//
+	// ScriptInstance stuff
+	//
+	//
 
 #define GET_SCRIPT_DESC() script->get_script_desc()
 

+ 6 - 6
modules/gdnative/nativescript/nativescript.h

@@ -76,12 +76,12 @@ struct NativeScriptDesc {
 
 	bool is_tool;
 
-	inline NativeScriptDesc()
-		: methods(),
-		  properties(),
-		  signals_(),
-		  base(),
-		  base_native_type() {
+	inline NativeScriptDesc() :
+			methods(),
+			properties(),
+			signals_(),
+			base(),
+			base_native_type() {
 		zeromem(&create_func, sizeof(godot_instance_create_func));
 		zeromem(&destroy_func, sizeof(godot_instance_destroy_func));
 	}

+ 2 - 2
modules/gdnative/pluginscript/pluginscript_language.cpp

@@ -410,8 +410,8 @@ void PluginScriptLanguage::unlock() {
 #endif
 }
 
-PluginScriptLanguage::PluginScriptLanguage(const godot_pluginscript_language_desc *desc)
-	: _desc(*desc) {
+PluginScriptLanguage::PluginScriptLanguage(const godot_pluginscript_language_desc *desc) :
+		_desc(*desc) {
 	_resource_loader = memnew(ResourceFormatLoaderPluginScript(this));
 	_resource_saver = memnew(ResourceFormatSaverPluginScript(this));
 

+ 5 - 2
modules/gdnative/pluginscript/pluginscript_script.cpp

@@ -423,8 +423,11 @@ ScriptInstance::RPCMode PluginScript::get_rset_mode(const StringName &p_variable
 	}
 }
 
-PluginScript::PluginScript()
-	: _data(NULL), _tool(false), _valid(false), _script_list(this) {
+PluginScript::PluginScript() :
+		_data(NULL),
+		_tool(false),
+		_valid(false),
+		_script_list(this) {
 }
 
 void PluginScript::init(PluginScriptLanguage *language) {

+ 3 - 3
modules/gdscript/gdscript.cpp

@@ -100,7 +100,7 @@ GDScriptInstance *GDScript::_create_instance(const Variant **p_args, int p_argco
 #endif
 	instance->owner->set_script_instance(instance);
 
-/* STEP 2, INITIALIZE AND CONSRTUCT */
+	/* STEP 2, INITIALIZE AND CONSRTUCT */
 
 #ifndef NO_THREADS
 	GDScriptLanguage::singleton->lock->lock();
@@ -876,8 +876,8 @@ void GDScript::get_script_signal_list(List<MethodInfo> *r_signals) const {
 #endif
 }
 
-GDScript::GDScript()
-	: script_list(this) {
+GDScript::GDScript() :
+		script_list(this) {
 
 	_static_ref = this;
 	valid = false;

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