summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.clang-format50
-rw-r--r--.travis.yml4
-rw-r--r--core/class_db.h8
-rw-r--r--core/core_string_names.cpp28
-rw-r--r--core/dvector.h2
-rw-r--r--core/engine.h6
-rw-r--r--core/global_constants.cpp14
-rw-r--r--core/hash_map.h6
-rw-r--r--core/helper/math_fieldwise.cpp9
-rw-r--r--core/io/file_access_pack.cpp6
-rw-r--r--core/io/marshalls.cpp4
-rw-r--r--core/io/resource_import.h6
-rw-r--r--core/math/a_star.h4
-rw-r--r--core/math/aabb.h6
-rw-r--r--core/math/bsp_tree.cpp10
-rw-r--r--core/math/face3.cpp3
-rw-r--r--core/math/face3.h2
-rw-r--r--core/math/math_2d.h30
-rw-r--r--core/math/math_funcs.h2
-rw-r--r--core/math/plane.h18
-rw-r--r--core/math/transform.cpp6
-rw-r--r--core/object.cpp168
-rw-r--r--core/object.h38
-rw-r--r--core/ordered_hash_map.h26
-rw-r--r--core/os/os.h2
-rw-r--r--core/pair.h6
-rw-r--r--core/project_settings.h22
-rw-r--r--core/resource.cpp4
-rw-r--r--core/safe_refcount.cpp8
-rw-r--r--core/script_debugger_remote.cpp38
-rw-r--r--core/script_language.cpp8
-rw-r--r--core/translation.cpp10
-rw-r--r--core/typedefs.h6
-rw-r--r--core/variant.cpp6
-rw-r--r--core/variant_call.cpp6
-rw-r--r--drivers/convex_decomp/b2d_decompose.cpp2
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.cpp12
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.h2
-rw-r--r--drivers/gles3/rasterizer_storage_gles3.h22
-rw-r--r--drivers/unix/ip_unix.cpp5
-rw-r--r--drivers/unix/os_unix.cpp2
-rw-r--r--drivers/unix/os_unix.h2
-rw-r--r--drivers/xaudio2/audio_driver_xaudio2.h4
-rw-r--r--editor/editor_export.h5
-rw-r--r--editor/filesystem_dock.h10
-rw-r--r--editor/import/editor_import_collada.cpp2
-rw-r--r--editor/plugins/abstract_polygon_2d_editor.cpp25
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp4
-rw-r--r--editor/plugins/collision_polygon_2d_editor_plugin.cpp8
-rw-r--r--editor/plugins/curve_editor_plugin.cpp6
-rw-r--r--editor/plugins/line_2d_editor_plugin.cpp8
-rw-r--r--editor/plugins/navigation_polygon_editor_plugin.cpp8
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.cpp8
-rw-r--r--editor/project_manager.cpp2
-rw-r--r--editor/property_editor.cpp2
-rw-r--r--[-rwxr-xr-x]main/main.cpp1
-rw-r--r--main/tests/test_gdscript.cpp4
-rw-r--r--main/tests/test_gdscript.h2
-rw-r--r--main/tests/test_image.cpp2
-rw-r--r--main/tests/test_io.cpp4
-rw-r--r--main/tests/test_math.cpp2
-rw-r--r--main/tests/test_physics.cpp2
-rw-r--r--main/tests/test_physics_2d.cpp2
-rw-r--r--main/tests/test_render.cpp2
-rw-r--r--main/tests/test_shader_lang.cpp2
-rw-r--r--main/tests/test_string.cpp2
-rwxr-xr-xmisc/travis/clang-format.sh2
-rw-r--r--modules/bullet/area_bullet.cpp26
-rw-r--r--modules/bullet/area_bullet.h14
-rw-r--r--modules/bullet/btRayShape.cpp6
-rw-r--r--modules/bullet/bullet_physics_server.cpp8
-rw-r--r--modules/bullet/collision_object_bullet.cpp15
-rw-r--r--modules/bullet/collision_object_bullet.h20
-rw-r--r--modules/bullet/cone_twist_joint_bullet.cpp4
-rw-r--r--modules/bullet/constraint_bullet.cpp5
-rw-r--r--modules/bullet/generic_6dof_joint_bullet.cpp4
-rw-r--r--modules/bullet/godot_collision_configuration.cpp4
-rw-r--r--modules/bullet/godot_collision_dispatcher.cpp4
-rw-r--r--modules/bullet/godot_motion_state.h8
-rw-r--r--modules/bullet/godot_ray_world_algorithm.cpp24
-rw-r--r--modules/bullet/godot_result_callbacks.h60
-rw-r--r--modules/bullet/hinge_joint_bullet.cpp8
-rw-r--r--modules/bullet/joint_bullet.cpp4
-rw-r--r--modules/bullet/pin_joint_bullet.cpp4
-rw-r--r--modules/bullet/rigid_body_bullet.cpp38
-rw-r--r--modules/bullet/rigid_body_bullet.h4
-rw-r--r--modules/bullet/shape_bullet.cpp34
-rw-r--r--modules/bullet/slider_joint_bullet.cpp4
-rw-r--r--modules/bullet/soft_body_bullet.cpp14
-rw-r--r--modules/bullet/space_bullet.cpp53
-rw-r--r--modules/bullet/space_bullet.h4
-rw-r--r--modules/gdnative/arvr/arvr_interface_gdnative.cpp2
-rw-r--r--modules/gdnative/gdnative.cpp2
-rw-r--r--modules/gdnative/gdnative.h4
-rw-r--r--modules/gdnative/nativescript/api_generator.cpp2
-rw-r--r--modules/gdnative/nativescript/nativescript.cpp10
-rw-r--r--modules/gdnative/nativescript/nativescript.h12
-rw-r--r--modules/gdnative/pluginscript/pluginscript_language.cpp4
-rw-r--r--modules/gdnative/pluginscript/pluginscript_script.cpp7
-rw-r--r--modules/gdscript/gdscript.cpp6
-rw-r--r--modules/gdscript/gdscript_compiler.cpp2
-rw-r--r--modules/gdscript/gdscript_editor.cpp2
-rw-r--r--modules/gdscript/gdscript_function.cpp6
-rw-r--r--modules/gdscript/gdscript_parser.cpp7
-rw-r--r--modules/mobile_vr/mobile_interface.cpp2
-rw-r--r--modules/mono/csharp_script.cpp4
-rw-r--r--modules/mono/editor/csharp_project.cpp2
-rw-r--r--modules/mono/editor/csharp_project.h2
-rw-r--r--modules/mono/godotsharp_dirs.cpp2
-rw-r--r--modules/mono/godotsharp_dirs.h2
-rw-r--r--modules/mono/mono_gc_handle.cpp4
-rw-r--r--modules/mono/mono_gd/gd_mono_internals.cpp2
-rw-r--r--modules/mono/signal_awaiter_utils.cpp6
-rw-r--r--modules/mono/utils/mono_reg_utils.h2
-rw-r--r--modules/mono/utils/string_utils.cpp2
-rw-r--r--modules/pvr/texture_loader_pvr.cpp6
-rw-r--r--modules/visual_script/visual_script_flow_control.cpp6
-rw-r--r--modules/webm/video_stream_webm.cpp40
-rw-r--r--platform/android/power_android.cpp6
-rw-r--r--platform/haiku/haiku_application.cpp4
-rw-r--r--platform/haiku/haiku_direct_window.cpp4
-rw-r--r--platform/haiku/haiku_gl_view.cpp4
-rw-r--r--platform/haiku/power_haiku.cpp6
-rw-r--r--platform/iphone/export/export.cpp10
-rw-r--r--platform/iphone/os_iphone.cpp12
-rw-r--r--platform/iphone/power_iphone.cpp6
-rw-r--r--platform/javascript/dom_keys.h12
-rw-r--r--platform/javascript/power_javascript.cpp6
-rw-r--r--platform/osx/os_osx.mm2
-rw-r--r--platform/osx/power_osx.cpp6
-rw-r--r--platform/uwp/app.cpp18
-rw-r--r--platform/uwp/gl_context_egl.cpp14
-rw-r--r--platform/uwp/joypad_uwp.cpp6
-rw-r--r--platform/uwp/power_uwp.cpp6
-rw-r--r--platform/windows/crash_handler_win.cpp8
-rw-r--r--platform/windows/power_windows.cpp6
-rw-r--r--platform/x11/context_gl_x11.cpp4
-rw-r--r--platform/x11/os_x11.cpp7
-rw-r--r--platform/x11/power_x11.cpp6
-rw-r--r--scene/2d/area_2d.cpp4
-rw-r--r--scene/2d/canvas_item.cpp8
-rw-r--r--scene/2d/line_2d.cpp4
-rw-r--r--scene/2d/navigation2d.h6
-rw-r--r--scene/2d/physics_body_2d.cpp16
-rw-r--r--scene/2d/tile_map.h8
-rw-r--r--scene/3d/area.cpp4
-rw-r--r--scene/3d/gi_probe.cpp2
-rw-r--r--scene/3d/light.cpp8
-rw-r--r--scene/3d/light.h4
-rw-r--r--scene/3d/navigation.h6
-rw-r--r--scene/3d/particles.cpp4
-rw-r--r--scene/3d/physics_body.cpp16
-rw-r--r--scene/3d/spatial.cpp4
-rw-r--r--scene/3d/vehicle_body.cpp20
-rw-r--r--scene/animation/tween_interpolaters.cpp22
-rw-r--r--scene/gui/box_container.h8
-rw-r--r--scene/gui/check_box.cpp4
-rw-r--r--scene/gui/color_picker.cpp4
-rw-r--r--scene/gui/scroll_bar.h8
-rw-r--r--scene/gui/slider.h8
-rw-r--r--scene/gui/split_container.h8
-rw-r--r--scene/main/scene_tree.cpp2
-rw-r--r--scene/main/scene_tree.h4
-rw-r--r--scene/resources/box_shape.cpp4
-rw-r--r--scene/resources/capsule_shape.cpp4
-rw-r--r--scene/resources/capsule_shape_2d.cpp4
-rw-r--r--scene/resources/circle_shape_2d.cpp4
-rw-r--r--scene/resources/concave_polygon_shape.cpp4
-rw-r--r--scene/resources/concave_polygon_shape_2d.cpp4
-rw-r--r--scene/resources/convex_polygon_shape.cpp4
-rw-r--r--scene/resources/convex_polygon_shape_2d.cpp4
-rw-r--r--scene/resources/material.cpp4
-rw-r--r--scene/resources/plane_shape.cpp4
-rw-r--r--scene/resources/ray_shape.cpp4
-rw-r--r--scene/resources/rectangle_shape_2d.cpp4
-rw-r--r--scene/resources/segment_shape_2d.cpp8
-rw-r--r--scene/resources/shape_line_2d.cpp4
-rw-r--r--scene/resources/sphere_shape.cpp4
-rw-r--r--scene/resources/tile_set.h10
-rw-r--r--servers/audio/effects/audio_effect_eq.h12
-rw-r--r--servers/audio/effects/audio_effect_filter.h28
-rw-r--r--servers/audio/reverb_sw.cpp8
-rw-r--r--servers/physics/area_sw.cpp6
-rw-r--r--servers/physics/body_pair_sw.cpp4
-rw-r--r--servers/physics/body_sw.cpp7
-rw-r--r--servers/physics/collision_object_sw.cpp4
-rw-r--r--servers/physics/collision_solver_sat.cpp3
-rw-r--r--servers/physics/joints/cone_twist_joint_sw.cpp4
-rw-r--r--servers/physics/joints/generic_6dof_joint_sw.cpp8
-rw-r--r--servers/physics/joints/hinge_joint_sw.cpp8
-rw-r--r--servers/physics/joints/jacobian_entry_sw.h18
-rw-r--r--servers/physics/joints/pin_joint_sw.cpp4
-rw-r--r--servers/physics/joints/slider_joint_sw.cpp6
-rw-r--r--servers/physics/joints_sw.h4
-rw-r--r--servers/physics_2d/area_2d_sw.cpp6
-rw-r--r--servers/physics_2d/body_2d_sw.cpp7
-rw-r--r--servers/physics_2d/body_pair_2d_sw.cpp6
-rw-r--r--servers/physics_2d/joints_2d_sw.cpp12
-rw-r--r--servers/physics_2d/joints_2d_sw.h4
-rw-r--r--servers/physics_2d/physics_2d_server_wrap_mt.cpp4
-rw-r--r--servers/physics_2d_server.h15
-rw-r--r--servers/physics_server.h15
-rw-r--r--servers/visual/rasterizer.h4
-rw-r--r--servers/visual/visual_server_raster.h9
-rw-r--r--servers/visual/visual_server_scene.cpp11
-rw-r--r--servers/visual/visual_server_scene.h13
-rw-r--r--servers/visual/visual_server_wrap_mt.cpp4
-rw-r--r--servers/visual/visual_server_wrap_mt.h2
208 files changed, 997 insertions, 903 deletions
diff --git a/.clang-format b/.clang-format
index 0407a7aeb3..bc69a6a3a6 100644
--- a/.clang-format
+++ b/.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
...
diff --git a/.travis.yml b/.travis.yml
index e10497ad7c..c11a21aeef 100644
--- a/.travis.yml
+++ b/.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
diff --git a/core/class_db.h b/core/class_db.h
index 24db4c61bb..b8b681301d 100644
--- a/core/class_db.h
+++ b/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);
diff --git a/core/core_string_names.cpp b/core/core_string_names.cpp
index feee39225f..3091c80607 100644
--- a/core/core_string_names.cpp
+++ b/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");
diff --git a/core/dvector.h b/core/dvector.h
index 1b81ceec5e..66bf0e7862 100644
--- a/core/dvector.h
+++ b/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();
diff --git a/core/engine.h b/core/engine.h
index 4a573c1539..1becebe34a 100644
--- a/core/engine.h
+++ b/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) {
}
};
diff --git a/core/global_constants.cpp b/core/global_constants.cpp
index fb432b85db..a8f6e4da6c 100644
--- a/core/global_constants.cpp
+++ b/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
};
diff --git a/core/hash_map.h b/core/hash_map.h
index e100d7a904..a53cb53c84 100644
--- a/core/hash_map.h
+++ b/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) {
}
};
diff --git a/core/helper/math_fieldwise.cpp b/core/helper/math_fieldwise.cpp
index 2cd8a4f392..9e5eab2ee8 100644
--- a/core/helper/math_fieldwise.cpp
+++ b/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
diff --git a/core/io/file_access_pack.cpp b/core/io/file_access_pack.cpp
index a7eb8ce6a9..c46e645ed8 100644
--- a/core/io/file_access_pack.cpp
+++ b/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);
diff --git a/core/io/marshalls.cpp b/core/io/marshalls.cpp
index 37320d7a77..7dd3468c48 100644
--- a/core/io/marshalls.cpp
+++ b/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) {
diff --git a/core/io/resource_import.h b/core/io/resource_import.h
index 28489b5d34..166fff85cf 100644
--- a/core/io/resource_import.h
+++ b/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() {}
};
diff --git a/core/math/a_star.h b/core/math/a_star.h
index b7b7e54125..1f13f4fae8 100644
--- a/core/math/a_star.h
+++ b/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;
diff --git a/core/math/aabb.h b/core/math/aabb.h
index c60213496a..c5ba79e172 100644
--- a/core/math/aabb.h
+++ b/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) {
}
};
diff --git a/core/math/bsp_tree.cpp b/core/math/bsp_tree.cpp
index bdc040160f..ecda777583 100644
--- a/core/math/bsp_tree.cpp
+++ b/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() {
diff --git a/core/math/face3.cpp b/core/math/face3.cpp
index 070ce77db4..7e586a1fd2 100644
--- a/core/math/face3.cpp
+++ b/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; \
diff --git a/core/math/face3.h b/core/math/face3.h
index 561fa31238..9a1f6b2c2e 100644
--- a/core/math/face3.h
+++ b/core/math/face3.h
@@ -256,6 +256,4 @@ bool Face3::intersects_aabb2(const AABB &p_aabb) const {
return true;
}
- //this sucks...
-
#endif // FACE3_H
diff --git a/core/math/math_2d.h b/core/math/math_2d.h
index d215df8a43..d788318f5e 100644
--- a/core/math/math_2d.h
+++ b/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) {
}
};
diff --git a/core/math/math_funcs.h b/core/math/math_funcs.h
index bc0b3717ed..80e5805451 100644
--- a/core/math/math_funcs.h
+++ b/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__ (
diff --git a/core/math/plane.h b/core/math/plane.h
index 559a735817..1d02b5d523 100644
--- a/core/math/plane.h
+++ b/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) {
diff --git a/core/math/transform.cpp b/core/math/transform.cpp
index 638a39ab73..fb4ca16565 100644
--- a/core/math/transform.cpp
+++ b/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) {
}
diff --git a/core/object.cpp b/core/object.cpp
index 1be7337d96..cf1472243b 100644
--- a/core/object.cpp
+++ b/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);
diff --git a/core/object.h b/core/object.h
index 0a0c781649..3d93953227 100644
--- a/core/object.h
+++ b/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; }
};
diff --git a/core/ordered_hash_map.h b/core/ordered_hash_map.h
index 1ed5a5d369..fed16809e6 100644
--- a/core/ordered_hash_map.h
+++ b/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) {
diff --git a/core/os/os.h b/core/os/os.h
index 91fbf082bf..4f968020cc 100644
--- a/core/os/os.h
+++ b/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; }
diff --git a/core/pair.h b/core/pair.h
index 535c3355b6..aa51b77a4f 100644
--- a/core/pair.h
+++ b/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) {
}
};
diff --git a/core/project_settings.h b/core/project_settings.h
index 1c4078cebb..d8a1ea1f7a 100644
--- a/core/project_settings.h
+++ b/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) {
}
};
diff --git a/core/resource.cpp b/core/resource.cpp
index d339eb78ad..be6da792ad 100644
--- a/core/resource.cpp
+++ b/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;
diff --git a/core/safe_refcount.cpp b/core/safe_refcount.cpp
index c9acdb7970..908c8a34b5 100644
--- a/core/safe_refcount.cpp
+++ b/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)
}
diff --git a/core/script_debugger_remote.cpp b/core/script_debugger_remote.cpp
index 495c99c122..658b72b47a 100644
--- a/core/script_debugger_remote.cpp
+++ b/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
diff --git a/core/script_language.cpp b/core/script_language.cpp
index 384e41e4bd..c1e9d55872 100644
--- a/core/script_language.cpp
+++ b/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() {
diff --git a/core/translation.cpp b/core/translation.cpp
index dcca58692a..515b5f1134 100644
--- a/core/translation.cpp
+++ b/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) {
diff --git a/core/typedefs.h b/core/typedefs.h
index c509edf9fe..889513ddc9 100644
--- a/core/typedefs.h
+++ b/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))
diff --git a/core/variant.cpp b/core/variant.cpp
index 0f97b98a6f..7f0cabbce4 100644
--- a/core/variant.cpp
+++ b/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);
diff --git a/core/variant_call.cpp b/core/variant_call.cpp
index 10f5ca0ce1..991573e8d7 100644
--- a/core/variant_call.cpp
+++ b/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) {
}
};
diff --git a/drivers/convex_decomp/b2d_decompose.cpp b/drivers/convex_decomp/b2d_decompose.cpp
index 97d312983f..c7681ed2ad 100644
--- a/drivers/convex_decomp/b2d_decompose.cpp
+++ b/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) {
diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp
index 3031b70f70..d38ec2a1f9 100644
--- a/drivers/gles3/rasterizer_scene_gles3.cpp
+++ b/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) {
diff --git a/drivers/gles3/rasterizer_scene_gles3.h b/drivers/gles3/rasterizer_scene_gles3.h
index 99c8044e2f..ffbe10fb60 100644
--- a/drivers/gles3/rasterizer_scene_gles3.h
+++ b/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);
diff --git a/drivers/gles3/rasterizer_storage_gles3.h b/drivers/gles3/rasterizer_storage_gles3.h
index d5efd5307c..25327af0a5 100644
--- a/drivers/gles3/rasterizer_storage_gles3.h
+++ b/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;
diff --git a/drivers/unix/ip_unix.cpp b/drivers/unix/ip_unix.cpp
index 77c942c673..6254466efc 100644
--- a/drivers/unix/ip_unix.cpp
+++ b/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;
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp
index fa208f40ec..5a06a58b80 100644
--- a/drivers/unix/os_unix.cpp
+++ b/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());
diff --git a/drivers/unix/os_unix.h b/drivers/unix/os_unix.h
index 325aaf7550..1a4c73ce4c 100644
--- a/drivers/unix/os_unix.h
+++ b/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);
diff --git a/drivers/xaudio2/audio_driver_xaudio2.h b/drivers/xaudio2/audio_driver_xaudio2.h
index 27ef2ebcb8..dd4fc76047 100644
--- a/drivers/xaudio2/audio_driver_xaudio2.h
+++ b/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);
}
diff --git a/editor/editor_export.h b/editor/editor_export.h
index 346c3b58e1..215a770a12 100644
--- a/editor/editor_export.h
+++ b/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() {}
diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h
index f1fd342052..b004b1974d 100644
--- a/editor/filesystem_dock.h
+++ b/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;
diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp
index 3c73411dee..f51bc2d6be 100644
--- a/editor/import/editor_import_collada.cpp
+++ b/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;
diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp
index 95ae3d5aed..ff72a5a25e 100644
--- a/editor/plugins/abstract_polygon_2d_editor.cpp
+++ b/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 {
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index ddcdb5a321..8eee9c7e7c 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/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;
diff --git a/editor/plugins/collision_polygon_2d_editor_plugin.cpp b/editor/plugins/collision_polygon_2d_editor_plugin.cpp
index 00e6d617a1..6ac80caf94 100644
--- a/editor/plugins/collision_polygon_2d_editor_plugin.cpp
+++ b/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") {
}
diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp
index 2754aeed06..f77016c1d6 100644
--- a/editor/plugins/curve_editor_plugin.cpp
+++ b/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);
diff --git a/editor/plugins/line_2d_editor_plugin.cpp b/editor/plugins/line_2d_editor_plugin.cpp
index 51fa488b43..04d8519b2f 100644
--- a/editor/plugins/line_2d_editor_plugin.cpp
+++ b/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") {
}
diff --git a/editor/plugins/navigation_polygon_editor_plugin.cpp b/editor/plugins/navigation_polygon_editor_plugin.cpp
index 6560a8dac7..36c608310b 100644
--- a/editor/plugins/navigation_polygon_editor_plugin.cpp
+++ b/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") {
}
diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp
index ebb5f57e99..25e734187d 100644
--- a/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/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") {
}
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index b4d89526b0..00488a2a88 100644
--- a/editor/project_manager.cpp
+++ b/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();
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index 0c1d7b9d9c..eed1efaf9c 100644
--- a/editor/property_editor.cpp
+++ b/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;
diff --git a/main/main.cpp b/main/main.cpp
index c9b84d2cd1..b2f091e76a 100755..100644
--- a/main/main.cpp
+++ b/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
diff --git a/main/tests/test_gdscript.cpp b/main/tests/test_gdscript.cpp
index b41b5f6452..f99fd5fd88 100644
--- a/main/tests/test_gdscript.cpp
+++ b/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
diff --git a/main/tests/test_gdscript.h b/main/tests/test_gdscript.h
index f37b175913..cbbf7f3ef4 100644
--- a/main/tests/test_gdscript.h
+++ b/main/tests/test_gdscript.h
@@ -42,6 +42,6 @@ enum TestType {
};
MainLoop *test(TestType p_type);
-}
+} // namespace TestGDScript
#endif // TEST_GDSCRIPT_H
diff --git a/main/tests/test_image.cpp b/main/tests/test_image.cpp
index b94d93b2b1..0b7ba0edcc 100644
--- a/main/tests/test_image.cpp
+++ b/main/tests/test_image.cpp
@@ -65,4 +65,4 @@ MainLoop *test() {
return memnew(TestMainLoop);
}
-}
+} // namespace TestImage
diff --git a/main/tests/test_io.cpp b/main/tests/test_io.cpp
index f96c5cfe3c..1477df4415 100644
--- a/main/tests/test_io.cpp
+++ b/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
diff --git a/main/tests/test_math.cpp b/main/tests/test_math.cpp
index 3ba8ef51b4..7d88372ee6 100644
--- a/main/tests/test_math.cpp
+++ b/main/tests/test_math.cpp
@@ -684,4 +684,4 @@ MainLoop *test() {
return NULL;
}
-}
+} // namespace TestMath
diff --git a/main/tests/test_physics.cpp b/main/tests/test_physics.cpp
index 1c50470544..e374113b67 100644
--- a/main/tests/test_physics.cpp
+++ b/main/tests/test_physics.cpp
@@ -435,4 +435,4 @@ MainLoop *test() {
return memnew(TestPhysicsMainLoop);
}
-}
+} // namespace TestPhysics
diff --git a/main/tests/test_physics_2d.cpp b/main/tests/test_physics_2d.cpp
index 7d596fbda3..41b7893032 100644
--- a/main/tests/test_physics_2d.cpp
+++ b/main/tests/test_physics_2d.cpp
@@ -431,4 +431,4 @@ MainLoop *test() {
return memnew(TestPhysics2DMainLoop);
}
-}
+} // namespace TestPhysics2D
diff --git a/main/tests/test_render.cpp b/main/tests/test_render.cpp
index cbf1a57855..9860a4a447 100644
--- a/main/tests/test_render.cpp
+++ b/main/tests/test_render.cpp
@@ -241,4 +241,4 @@ MainLoop *test() {
return memnew(TestMainLoop);
}
-}
+} // namespace TestRender
diff --git a/main/tests/test_shader_lang.cpp b/main/tests/test_shader_lang.cpp
index ddb2ed5e75..679e54451e 100644
--- a/main/tests/test_shader_lang.cpp
+++ b/main/tests/test_shader_lang.cpp
@@ -339,4 +339,4 @@ MainLoop *test() {
return NULL;
}
-}
+} // namespace TestShaderLang
diff --git a/main/tests/test_string.cpp b/main/tests/test_string.cpp
index 88d7702acc..db57788ade 100644
--- a/main/tests/test_string.cpp
+++ b/main/tests/test_string.cpp
@@ -919,4 +919,4 @@ MainLoop *test() {
return NULL;
}
-}
+} // namespace TestString
diff --git a/misc/travis/clang-format.sh b/misc/travis/clang-format.sh
index 741d3bff1b..2b30cf5ada 100755
--- a/misc/travis/clang-format.sh
+++ b/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
diff --git a/modules/bullet/area_bullet.cpp b/modules/bullet/area_bullet.cpp
index 54024b4f90..fad6f52cea 100644
--- a/modules/bullet/area_bullet.cpp
+++ b/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);
diff --git a/modules/bullet/area_bullet.h b/modules/bullet/area_bullet.h
index f6e3b7e902..95ce62bfed 100644
--- a/modules/bullet/area_bullet.h
+++ b/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);
}
diff --git a/modules/bullet/btRayShape.cpp b/modules/bullet/btRayShape.cpp
index ac95faaac6..bbd2b19677 100644
--- a/modules/bullet/btRayShape.cpp
+++ b/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);
}
diff --git a/modules/bullet/bullet_physics_server.cpp b/modules/bullet/bullet_physics_server.cpp
index 6e9ed0e318..26c879fddb 100644
--- a/modules/bullet/bullet_physics_server.cpp
+++ b/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() {}
diff --git a/modules/bullet/collision_object_bullet.cpp b/modules/bullet/collision_object_bullet.cpp
index 5e878b0ee4..da3a4b73cf 100644
--- a/modules/bullet/collision_object_bullet.cpp
+++ b/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() {
diff --git a/modules/bullet/collision_object_bullet.h b/modules/bullet/collision_object_bullet.h
index 153b8ea5bc..51e48909e4 100644
--- a/modules/bullet/collision_object_bullet.h
+++ b/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();
diff --git a/modules/bullet/cone_twist_joint_bullet.cpp b/modules/bullet/cone_twist_joint_bullet.cpp
index f6ac40e001..7ae5e79645 100644
--- a/modules/bullet/cone_twist_joint_bullet.cpp
+++ b/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) {
diff --git a/modules/bullet/constraint_bullet.cpp b/modules/bullet/constraint_bullet.cpp
index 08fc36f274..505579ce9b 100644
--- a/modules/bullet/constraint_bullet.cpp
+++ b/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;
diff --git a/modules/bullet/generic_6dof_joint_bullet.cpp b/modules/bullet/generic_6dof_joint_bullet.cpp
index 647396c24c..28928bd861 100644
--- a/modules/bullet/generic_6dof_joint_bullet.cpp
+++ b/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);
diff --git a/modules/bullet/godot_collision_configuration.cpp b/modules/bullet/godot_collision_configuration.cpp
index 4e4228cc48..136fb2ee74 100644
--- a/modules/bullet/godot_collision_configuration.cpp
+++ b/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;
diff --git a/modules/bullet/godot_collision_dispatcher.cpp b/modules/bullet/godot_collision_dispatcher.cpp
index ea75e4eef4..e0ca29a8f3 100644
--- a/modules/bullet/godot_collision_dispatcher.cpp
+++ b/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) {
diff --git a/modules/bullet/godot_motion_state.h b/modules/bullet/godot_motion_state.h
index 5111807394..62ea472446 100644
--- a/modules/bullet/godot_motion_state.h
+++ b/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
diff --git a/modules/bullet/godot_ray_world_algorithm.cpp b/modules/bullet/godot_ray_world_algorithm.cpp
index 98daf8398e..ba13903548 100644
--- a/modules/bullet/godot_ray_world_algorithm.cpp
+++ b/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) {
diff --git a/modules/bullet/godot_result_callbacks.h b/modules/bullet/godot_result_callbacks.h
index ba5142676b..5750dc2acd 100644
--- a/modules/bullet/godot_result_callbacks.h
+++ b/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;
diff --git a/modules/bullet/hinge_joint_bullet.cpp b/modules/bullet/hinge_joint_bullet.cpp
index bb70babd99..d3288807b3 100644
--- a/modules/bullet/hinge_joint_bullet.cpp
+++ b/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;
diff --git a/modules/bullet/joint_bullet.cpp b/modules/bullet/joint_bullet.cpp
index be544f89bf..c8d91aa257 100644
--- a/modules/bullet/joint_bullet.cpp
+++ b/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() {}
diff --git a/modules/bullet/pin_joint_bullet.cpp b/modules/bullet/pin_joint_bullet.cpp
index cd9e9a4557..8c74fcbc94 100644
--- a/modules/bullet/pin_joint_bullet.cpp
+++ b/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;
diff --git a/modules/bullet/rigid_body_bullet.cpp b/modules/bullet/rigid_body_bullet.cpp
index f5ab8221e3..b134bd3a36 100644
--- a/modules/bullet/rigid_body_bullet.cpp
+++ b/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));
diff --git a/modules/bullet/rigid_body_bullet.h b/modules/bullet/rigid_body_bullet.h
index ab3c3e58b2..c54b5784b5 100644
--- a/modules/bullet/rigid_body_bullet.h
+++ b/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; }
};
diff --git a/modules/bullet/shape_bullet.cpp b/modules/bullet/shape_bullet.cpp
index f51af93a31..572a3b4476 100644
--- a/modules/bullet/shape_bullet.cpp
+++ b/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);
diff --git a/modules/bullet/slider_joint_bullet.cpp b/modules/bullet/slider_joint_bullet.cpp
index 2da65677f5..f1d60679ec 100644
--- a/modules/bullet/slider_joint_bullet.cpp
+++ b/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) {
diff --git a/modules/bullet/soft_body_bullet.cpp b/modules/bullet/soft_body_bullet.cpp
index 64ef7bfad2..ef5c8cac6f 100644
--- a/modules/bullet/soft_body_bullet.cpp
+++ b/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);
diff --git a/modules/bullet/space_bullet.cpp b/modules/bullet/space_bullet.cpp
index d8c8cab17a..c1f6e81734 100644
--- a/modules/bullet/space_bullet.cpp
+++ b/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() {}
diff --git a/modules/bullet/space_bullet.h b/modules/bullet/space_bullet.h
index 99bcfb8563..e5267c01a9 100644
--- a/modules/bullet/space_bullet.h
+++ b/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);
diff --git a/modules/gdnative/arvr/arvr_interface_gdnative.cpp b/modules/gdnative/arvr/arvr_interface_gdnative.cpp
index 9b0d1ebb31..29e4775e62 100644
--- a/modules/gdnative/arvr/arvr_interface_gdnative.cpp
+++ b/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);
}
diff --git a/modules/gdnative/gdnative.cpp b/modules/gdnative/gdnative.cpp
index 21c24fabd8..9c0041cbe0 100644
--- a/modules/gdnative/gdnative.cpp
+++ b/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;
}
diff --git a/modules/gdnative/gdnative.h b/modules/gdnative/gdnative.h
index bb260bdd1b..993cd0ece7 100644
--- a/modules/gdnative/gdnative.h
+++ b/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;
diff --git a/modules/gdnative/nativescript/api_generator.cpp b/modules/gdnative/nativescript/api_generator.cpp
index f9d699fb59..653445c2db 100644
--- a/modules/gdnative/nativescript/api_generator.cpp
+++ b/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
/*
diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp
index c2c7c27f25..965de062e3 100644
--- a/modules/gdnative/nativescript/nativescript.cpp
+++ b/modules/gdnative/nativescript/nativescript.cpp
@@ -437,11 +437,11 @@ NativeScript::~NativeScript() {
#endif
}
-//
-//
-// ScriptInstance stuff
-//
-//
+ //
+ //
+ // ScriptInstance stuff
+ //
+ //
#define GET_SCRIPT_DESC() script->get_script_desc()
diff --git a/modules/gdnative/nativescript/nativescript.h b/modules/gdnative/nativescript/nativescript.h
index f0f14e2f30..30fa400cb0 100644
--- a/modules/gdnative/nativescript/nativescript.h
+++ b/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));
}
diff --git a/modules/gdnative/pluginscript/pluginscript_language.cpp b/modules/gdnative/pluginscript/pluginscript_language.cpp
index 40feb5ae43..e358c2fb69 100644
--- a/modules/gdnative/pluginscript/pluginscript_language.cpp
+++ b/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));
diff --git a/modules/gdnative/pluginscript/pluginscript_script.cpp b/modules/gdnative/pluginscript/pluginscript_script.cpp
index 4169b07f63..0b71b3b10d 100644
--- a/modules/gdnative/pluginscript/pluginscript_script.cpp
+++ b/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) {
diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp
index 9496d0b310..b75f670906 100644
--- a/modules/gdscript/gdscript.cpp
+++ b/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;
diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp
index 4cd6472b7f..f9385d7a11 100644
--- a/modules/gdscript/gdscript_compiler.cpp
+++ b/modules/gdscript/gdscript_compiler.cpp
@@ -806,8 +806,8 @@ int GDScriptCompiler::_parse_expression(CodeGen &codegen, const GDScriptParser::
ERR_FAIL_COND_V(on->arguments.size() != 2, -1);
if (on->arguments[0]->type == GDScriptParser::Node::TYPE_OPERATOR && (static_cast<GDScriptParser::OperatorNode *>(on->arguments[0])->op == GDScriptParser::OperatorNode::OP_INDEX || static_cast<GDScriptParser::OperatorNode *>(on->arguments[0])->op == GDScriptParser::OperatorNode::OP_INDEX_NAMED)) {
-//SET (chained) MODE!!
+ // SET (chained) MODE!
#ifdef DEBUG_ENABLED
if (static_cast<GDScriptParser::OperatorNode *>(on->arguments[0])->op == GDScriptParser::OperatorNode::OP_INDEX_NAMED) {
const GDScriptParser::OperatorNode *inon = static_cast<GDScriptParser::OperatorNode *>(on->arguments[0]);
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp
index e7100d835c..adf6780278 100644
--- a/modules/gdscript/gdscript_editor.cpp
+++ b/modules/gdscript/gdscript_editor.cpp
@@ -1795,8 +1795,8 @@ static void _find_type_arguments(GDScriptCompletionContext &context, const GDScr
}
} else {
-//regular method
+ //regular method
#if defined(DEBUG_METHODS_ENABLED) && defined(TOOLS_ENABLED)
if (p_argidx < m->get_argument_count()) {
PropertyInfo pi = m->get_argument_info(p_argidx);
diff --git a/modules/gdscript/gdscript_function.cpp b/modules/gdscript/gdscript_function.cpp
index 765a76fec4..f00ac1f7e6 100644
--- a/modules/gdscript/gdscript_function.cpp
+++ b/modules/gdscript/gdscript_function.cpp
@@ -250,7 +250,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
#ifdef DEBUG_ENABLED
-//GDScriptLanguage::get_singleton()->calls++;
+ //GDScriptLanguage::get_singleton()->calls++;
#endif
@@ -1432,8 +1432,8 @@ void GDScriptFunction::debug_get_stack_member_state(int p_line, List<Pair<String
}
}
-GDScriptFunction::GDScriptFunction()
- : function_list(this) {
+GDScriptFunction::GDScriptFunction() :
+ function_list(this) {
_stack_size = 0;
_call_size = 0;
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index bee9ef1998..e48b03968b 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -2976,10 +2976,9 @@ void GDScriptParser::_parse_extends(ClassNode *p_class) {
case GDScriptTokenizer::TK_IDENTIFIER: {
- StringName identifier = tokenizer->get_token_identifier();
- p_class->extends_class.push_back(identifier);
- }
- break;
+ StringName identifier = tokenizer->get_token_identifier();
+ p_class->extends_class.push_back(identifier);
+ } break;
case GDScriptTokenizer::TK_PERIOD:
break;
diff --git a/modules/mobile_vr/mobile_interface.cpp b/modules/mobile_vr/mobile_interface.cpp
index 3a0b83d534..35253d5a77 100644
--- a/modules/mobile_vr/mobile_interface.cpp
+++ b/modules/mobile_vr/mobile_interface.cpp
@@ -461,6 +461,7 @@ MobileVRInterface::MobileVRInterface() {
glGenBuffers(1, &half_screen_quad);
glBindBuffer(GL_ARRAY_BUFFER, half_screen_quad);
{
+ /* clang-format off */
const float qv[16] = {
0, -1,
-1, -1,
@@ -471,6 +472,7 @@ MobileVRInterface::MobileVRInterface() {
1, -1,
1, -1,
};
+ /* clang-format on */
glBufferData(GL_ARRAY_BUFFER, sizeof(float) * 16, qv, GL_STATIC_DRAW);
}
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index 6fbc309fa3..af5a0334c3 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -1885,8 +1885,8 @@ StringName CSharpScript::get_script_name() const {
return name;
}
-CSharpScript::CSharpScript()
- : script_list(this) {
+CSharpScript::CSharpScript() :
+ script_list(this) {
_clear();
diff --git a/modules/mono/editor/csharp_project.cpp b/modules/mono/editor/csharp_project.cpp
index bde5f0fd0b..9a1efb4423 100644
--- a/modules/mono/editor/csharp_project.cpp
+++ b/modules/mono/editor/csharp_project.cpp
@@ -117,4 +117,4 @@ void add_item(const String &p_project_path, const String &p_item_type, const Str
ERR_FAIL();
}
}
-} // CSharpProject
+} // namespace CSharpProject
diff --git a/modules/mono/editor/csharp_project.h b/modules/mono/editor/csharp_project.h
index 4832d2251e..44e8325a59 100644
--- a/modules/mono/editor/csharp_project.h
+++ b/modules/mono/editor/csharp_project.h
@@ -39,6 +39,6 @@ String generate_editor_api_project(const String &p_dir, const String &p_core_dll
String generate_game_project(const String &p_dir, const String &p_name, const Vector<String> &p_files = Vector<String>());
void add_item(const String &p_project_path, const String &p_item_type, const String &p_include);
-}
+} // namespace CSharpProject
#endif // CSHARP_PROJECT_H
diff --git a/modules/mono/godotsharp_dirs.cpp b/modules/mono/godotsharp_dirs.cpp
index a0c2508b0d..0f6245a37c 100644
--- a/modules/mono/godotsharp_dirs.cpp
+++ b/modules/mono/godotsharp_dirs.cpp
@@ -192,4 +192,4 @@ String get_project_csproj_path() {
return _GodotSharpDirs::get_singleton().csproj_filepath;
}
#endif
-}
+} // namespace GodotSharpDirs
diff --git a/modules/mono/godotsharp_dirs.h b/modules/mono/godotsharp_dirs.h
index ba2c065210..914df40629 100644
--- a/modules/mono/godotsharp_dirs.h
+++ b/modules/mono/godotsharp_dirs.h
@@ -53,6 +53,6 @@ String get_custom_project_settings_dir();
String get_project_sln_path();
String get_project_csproj_path();
-}
+} // namespace GodotSharpDirs
#endif // GODOTSHARP_DIRS_H
diff --git a/modules/mono/mono_gc_handle.cpp b/modules/mono/mono_gc_handle.cpp
index e10e06df0e..121392b3f8 100644
--- a/modules/mono/mono_gc_handle.cpp
+++ b/modules/mono/mono_gc_handle.cpp
@@ -36,7 +36,7 @@ uint32_t MonoGCHandle::make_strong_handle(MonoObject *p_object) {
return mono_gchandle_new(
p_object,
false /* do not pin the object */
- );
+ );
}
uint32_t MonoGCHandle::make_weak_handle(MonoObject *p_object) {
@@ -44,7 +44,7 @@ uint32_t MonoGCHandle::make_weak_handle(MonoObject *p_object) {
return mono_gchandle_new_weakref(
p_object,
true /* track_resurrection: allows us to invoke _notification(NOTIFICATION_PREDELETE) while disposing */
- );
+ );
}
Ref<MonoGCHandle> MonoGCHandle::create_strong(MonoObject *p_object) {
diff --git a/modules/mono/mono_gd/gd_mono_internals.cpp b/modules/mono/mono_gd/gd_mono_internals.cpp
index cfe2148b80..56e8a01567 100644
--- a/modules/mono/mono_gd/gd_mono_internals.cpp
+++ b/modules/mono/mono_gd/gd_mono_internals.cpp
@@ -63,4 +63,4 @@ void tie_managed_to_unmanaged(MonoObject *managed, Object *unmanaged) {
return;
}
-}
+} // namespace GDMonoInternals
diff --git a/modules/mono/signal_awaiter_utils.cpp b/modules/mono/signal_awaiter_utils.cpp
index 7e99df29a1..47cc11cc0a 100644
--- a/modules/mono/signal_awaiter_utils.cpp
+++ b/modules/mono/signal_awaiter_utils.cpp
@@ -62,7 +62,7 @@ Error connect_signal_awaiter(Object *p_source, const String &p_signal, Object *p
return err;
}
-}
+} // namespace SignalAwaiterUtils
Variant SignalAwaiterHandle::_signal_callback(const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
@@ -116,8 +116,8 @@ void SignalAwaiterHandle::_bind_methods() {
ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "_signal_callback", &SignalAwaiterHandle::_signal_callback, MethodInfo("_signal_callback"));
}
-SignalAwaiterHandle::SignalAwaiterHandle(uint32_t p_managed_handle)
- : MonoGCHandle(p_managed_handle) {
+SignalAwaiterHandle::SignalAwaiterHandle(uint32_t p_managed_handle) :
+ MonoGCHandle(p_managed_handle) {
#ifdef DEBUG_ENABLED
conn_target_id = 0;
diff --git a/modules/mono/utils/mono_reg_utils.h b/modules/mono/utils/mono_reg_utils.h
index 4cc4965acb..599828aa80 100644
--- a/modules/mono/utils/mono_reg_utils.h
+++ b/modules/mono/utils/mono_reg_utils.h
@@ -47,7 +47,7 @@ namespace MonoRegUtils {
MonoRegInfo find_mono();
String find_msbuild_tools_path();
-} // MonoRegUtils
+} // namespace MonoRegUtils
#endif // WINDOWS_ENABLED
diff --git a/modules/mono/utils/string_utils.cpp b/modules/mono/utils/string_utils.cpp
index f26663ea11..8f817771ac 100644
--- a/modules/mono/utils/string_utils.cpp
+++ b/modules/mono/utils/string_utils.cpp
@@ -78,7 +78,7 @@ int sfind(const String &p_text, int p_from) {
return -1;
}
-}
+} // namespace
String sformat(const String &p_text, const Variant &p1, const Variant &p2, const Variant &p3, const Variant &p4, const Variant &p5) {
if (p_text.length() < 2)
diff --git a/modules/pvr/texture_loader_pvr.cpp b/modules/pvr/texture_loader_pvr.cpp
index 03592047ad..4415c888a4 100644
--- a/modules/pvr/texture_loader_pvr.cpp
+++ b/modules/pvr/texture_loader_pvr.cpp
@@ -239,11 +239,11 @@ ResourceFormatPVR::ResourceFormatPVR() {
Image::_image_compress_pvrtc2_func = _compress_pvrtc4;
}
-/////////////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////
-//PVRTC decompressor, Based on PVRTC decompressor by IMGTEC.
+ //PVRTC decompressor, Based on PVRTC decompressor by IMGTEC.
-/////////////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////
#define PT_INDEX 2
#define BLK_Y_SIZE 4
diff --git a/modules/visual_script/visual_script_flow_control.cpp b/modules/visual_script/visual_script_flow_control.cpp
index 59d9540239..a38266acc0 100644
--- a/modules/visual_script/visual_script_flow_control.cpp
+++ b/modules/visual_script/visual_script_flow_control.cpp
@@ -731,9 +731,9 @@ void VisualScriptSwitch::_bind_methods() {
VisualScriptSwitch::VisualScriptSwitch() {
}
-//////////////////////////////////////////
-////////////////EVENT ACTION FILTER///////////
-//////////////////////////////////////////
+ //////////////////////////////////////////
+ ////////////////EVENT ACTION FILTER///////////
+ //////////////////////////////////////////
#if 0
int VisualScriptInputFilter::get_output_sequence_port_count() const {
diff --git a/modules/webm/video_stream_webm.cpp b/modules/webm/video_stream_webm.cpp
index 0fc9df5b58..b055ccf5aa 100644
--- a/modules/webm/video_stream_webm.cpp
+++ b/modules/webm/video_stream_webm.cpp
@@ -92,21 +92,27 @@ private:
/**/
-VideoStreamPlaybackWebm::VideoStreamPlaybackWebm()
- : audio_track(0),
- webm(NULL),
- video(NULL),
- audio(NULL),
- video_frames(NULL), audio_frame(NULL),
- video_frames_pos(0), video_frames_capacity(0),
- num_decoded_samples(0), samples_offset(-1),
- mix_callback(NULL),
- mix_udata(NULL),
- playing(false), paused(false),
- delay_compensation(0.0),
- time(0.0), video_frame_delay(0.0), video_pos(0.0),
- texture(memnew(ImageTexture)),
- pcm(NULL) {}
+VideoStreamPlaybackWebm::VideoStreamPlaybackWebm() :
+ audio_track(0),
+ webm(NULL),
+ video(NULL),
+ audio(NULL),
+ video_frames(NULL),
+ audio_frame(NULL),
+ video_frames_pos(0),
+ video_frames_capacity(0),
+ num_decoded_samples(0),
+ samples_offset(-1),
+ mix_callback(NULL),
+ mix_udata(NULL),
+ playing(false),
+ paused(false),
+ delay_compensation(0.0),
+ time(0.0),
+ video_frame_delay(0.0),
+ video_pos(0.0),
+ texture(memnew(ImageTexture)),
+ pcm(NULL) {}
VideoStreamPlaybackWebm::~VideoStreamPlaybackWebm() {
delete_pointers();
@@ -403,8 +409,8 @@ void VideoStreamPlaybackWebm::delete_pointers() {
/**/
-VideoStreamWebm::VideoStreamWebm()
- : audio_track(0) {}
+VideoStreamWebm::VideoStreamWebm() :
+ audio_track(0) {}
Ref<VideoStreamPlayback> VideoStreamWebm::instance_playback() {
diff --git a/platform/android/power_android.cpp b/platform/android/power_android.cpp
index 48c9377a5a..54fb435b62 100644
--- a/platform/android/power_android.cpp
+++ b/platform/android/power_android.cpp
@@ -245,8 +245,10 @@ int power_android::get_power_percent_left() {
}
}
-power_android::power_android()
- : nsecs_left(-1), percent_left(-1), power_state(OS::POWERSTATE_UNKNOWN) {
+power_android::power_android() :
+ nsecs_left(-1),
+ percent_left(-1),
+ power_state(OS::POWERSTATE_UNKNOWN) {
}
power_android::~power_android() {
diff --git a/platform/haiku/haiku_application.cpp b/platform/haiku/haiku_application.cpp
index d23b9e27d8..e2649b15a4 100644
--- a/platform/haiku/haiku_application.cpp
+++ b/platform/haiku/haiku_application.cpp
@@ -29,6 +29,6 @@
/*************************************************************************/
#include "haiku_application.h"
-HaikuApplication::HaikuApplication()
- : BApplication("application/x-vnd.godot") {
+HaikuApplication::HaikuApplication() :
+ BApplication("application/x-vnd.godot") {
}
diff --git a/platform/haiku/haiku_direct_window.cpp b/platform/haiku/haiku_direct_window.cpp
index 24a8a4b17b..aa25064ccb 100644
--- a/platform/haiku/haiku_direct_window.cpp
+++ b/platform/haiku/haiku_direct_window.cpp
@@ -34,8 +34,8 @@
#include "main/main.h"
#include "os/keyboard.h"
-HaikuDirectWindow::HaikuDirectWindow(BRect p_frame)
- : BDirectWindow(p_frame, "Godot", B_TITLED_WINDOW, B_QUIT_ON_WINDOW_CLOSE) {
+HaikuDirectWindow::HaikuDirectWindow(BRect p_frame) :
+ BDirectWindow(p_frame, "Godot", B_TITLED_WINDOW, B_QUIT_ON_WINDOW_CLOSE) {
last_mouse_pos_valid = false;
last_buttons_state = 0;
last_button_mask = 0;
diff --git a/platform/haiku/haiku_gl_view.cpp b/platform/haiku/haiku_gl_view.cpp
index d898bd1a5d..bb9c439e94 100644
--- a/platform/haiku/haiku_gl_view.cpp
+++ b/platform/haiku/haiku_gl_view.cpp
@@ -30,8 +30,8 @@
#include "haiku_gl_view.h"
#include "main/main.h"
-HaikuGLView::HaikuGLView(BRect frame, uint32 type)
- : BGLView(frame, "GodotGLView", B_FOLLOW_ALL_SIDES, 0, type) {
+HaikuGLView::HaikuGLView(BRect frame, uint32 type) :
+ BGLView(frame, "GodotGLView", B_FOLLOW_ALL_SIDES, 0, type) {
}
void HaikuGLView::AttachedToWindow(void) {
diff --git a/platform/haiku/power_haiku.cpp b/platform/haiku/power_haiku.cpp
index 8718b317a3..73d60e9fec 100644
--- a/platform/haiku/power_haiku.cpp
+++ b/platform/haiku/power_haiku.cpp
@@ -64,8 +64,10 @@ int PowerX11::get_power_percent_left() {
}
}
-PowerHaiku::PowerHaiku()
- : nsecs_left(-1), percent_left(-1), power_state(OS::POWERSTATE_UNKNOWN) {
+PowerHaiku::PowerHaiku() :
+ nsecs_left(-1),
+ percent_left(-1),
+ power_state(OS::POWERSTATE_UNKNOWN) {
}
PowerHaiku::~PowerHaiku() {
diff --git a/platform/iphone/export/export.cpp b/platform/iphone/export/export.cpp
index b05bb9ab09..444c9287ad 100644
--- a/platform/iphone/export/export.cpp
+++ b/platform/iphone/export/export.cpp
@@ -69,8 +69,9 @@ class EditorExportPlatformIOS : public EditorExportPlatform {
String name;
bool is_default;
- ExportArchitecture()
- : name(""), is_default(false) {
+ ExportArchitecture() :
+ name(""),
+ is_default(false) {
}
ExportArchitecture(String p_name, bool p_is_default) {
@@ -453,8 +454,9 @@ struct CodesignData {
const Ref<EditorExportPreset> &preset;
bool debug;
- CodesignData(const Ref<EditorExportPreset> &p_preset, bool p_debug)
- : preset(p_preset), debug(p_debug) {
+ CodesignData(const Ref<EditorExportPreset> &p_preset, bool p_debug) :
+ preset(p_preset),
+ debug(p_debug) {
}
};
diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp
index f06657cd7b..1c7f41b464 100644
--- a/platform/iphone/os_iphone.cpp
+++ b/platform/iphone/os_iphone.cpp
@@ -117,7 +117,7 @@ void OSIPhone::initialize(const VideoMode &p_desired, int p_video_driver, int p_
*/
visual_server->init();
- // visual_server->cursor_set_visible(false, 0);
+ //visual_server->cursor_set_visible(false, 0);
// reset this to what it should be, it will have been set to 0 after visual_server->init() is called
RasterizerStorageGLES3::system_fbo = gl_view_base_fb;
@@ -127,14 +127,6 @@ void OSIPhone::initialize(const VideoMode &p_desired, int p_video_driver, int p_
input = memnew(InputDefault);
-/*
-#ifdef IOS_SCORELOOP_ENABLED
- scoreloop = memnew(ScoreloopIOS);
- Engine::get_singleton()->add_singleton(Engine::Singleton("Scoreloop", scoreloop));
- scoreloop->connect();
-#endif
- */
-
#ifdef GAME_CENTER_ENABLED
game_center = memnew(GameCenter);
Engine::get_singleton()->add_singleton(Engine::Singleton("GameCenter", game_center));
@@ -149,7 +141,7 @@ void OSIPhone::initialize(const VideoMode &p_desired, int p_video_driver, int p_
#ifdef ICLOUD_ENABLED
icloud = memnew(ICloud);
Engine::get_singleton()->add_singleton(Engine::Singleton("ICloud", icloud));
-//icloud->connect();
+ //icloud->connect();
#endif
Engine::get_singleton()->add_singleton(Engine::Singleton("iOS", memnew(iOS)));
};
diff --git a/platform/iphone/power_iphone.cpp b/platform/iphone/power_iphone.cpp
index 055d31ef0a..03afdb15f9 100644
--- a/platform/iphone/power_iphone.cpp
+++ b/platform/iphone/power_iphone.cpp
@@ -58,8 +58,10 @@ int PowerIphone::get_power_percent_left() {
}
}
-PowerIphone::PowerIphone()
- : nsecs_left(-1), percent_left(-1), power_state(OS::POWERSTATE_UNKNOWN) {
+PowerIphone::PowerIphone() :
+ nsecs_left(-1),
+ percent_left(-1),
+ power_state(OS::POWERSTATE_UNKNOWN) {
// TODO Auto-generated constructor stub
}
diff --git a/platform/javascript/dom_keys.h b/platform/javascript/dom_keys.h
index d63f165382..bd15cec603 100644
--- a/platform/javascript/dom_keys.h
+++ b/platform/javascript/dom_keys.h
@@ -262,7 +262,7 @@ int dom2godot_scancode(int dom_keycode) {
case DOM_VK_CAPS_LOCK:
return KEY_CAPSLOCK;
- /*
+ /*
case DOM_VK_KANA: return KEY_UNKNOWN;
case DOM_VK_HANGUL: return KEY_UNKNOWN;
case DOM_VK_EISU: return KEY_UNKNOWN;
@@ -274,7 +274,7 @@ int dom2godot_scancode(int dom_keycode) {
case DOM_VK_ESCAPE:
return KEY_ESCAPE;
- /*
+ /*
case DOM_VK_CONVERT: return KEY_UNKNOWN;
case DOM_VK_NONCONVERT: return KEY_UNKNOWN;
case DOM_VK_ACCEPT: return KEY_UNKNOWN;
@@ -292,7 +292,7 @@ int dom2godot_scancode(int dom_keycode) {
case DOM_VK_DOWN:
return KEY_DOWN;
- //case DOM_VK_SELECT: return KEY_UNKNOWN;
+ //case DOM_VK_SELECT: return KEY_UNKNOWN;
case DOM_VK_PRINTSCREEN: // this is the usual printScreen key
case DOM_VK_PRINT: // maybe for alt+printScreen or physical printers?
@@ -320,7 +320,7 @@ int dom2godot_scancode(int dom_keycode) {
case DOM_VK_DIVIDE:
return KEY_KP_DIVIDE;
- /*
+ /*
case DOM_VK_F17: return KEY_UNKNOWN;
case DOM_VK_F18: return KEY_UNKNOWN;
case DOM_VK_F19: return KEY_UNKNOWN;
@@ -335,7 +335,7 @@ int dom2godot_scancode(int dom_keycode) {
case DOM_VK_SCROLL_LOCK:
return KEY_SCROLLLOCK;
- /*
+ /*
case DOM_VK_WIN_OEM_FJ_JISHO: return KEY_UNKNOWN;
case DOM_VK_WIN_OEM_FJ_MASSHOU: return KEY_UNKNOWN;
case DOM_VK_WIN_OEM_FJ_TOUROKU: return KEY_UNKNOWN;
@@ -375,7 +375,7 @@ int dom2godot_scancode(int dom_keycode) {
case DOM_VK_QUOTE:
return KEY_APOSTROPHE;
- // rest is OEM/unusual
+ // rest is OEM/unusual
default: return KEY_UNKNOWN;
};
diff --git a/platform/javascript/power_javascript.cpp b/platform/javascript/power_javascript.cpp
index 10964502d4..54fceb75f4 100644
--- a/platform/javascript/power_javascript.cpp
+++ b/platform/javascript/power_javascript.cpp
@@ -63,8 +63,10 @@ int PowerJavascript::get_power_percent_left() {
}
}
-PowerJavascript::PowerJavascript()
- : nsecs_left(-1), percent_left(-1), power_state(OS::POWERSTATE_UNKNOWN) {
+PowerJavascript::PowerJavascript() :
+ nsecs_left(-1),
+ percent_left(-1),
+ power_state(OS::POWERSTATE_UNKNOWN) {
}
PowerJavascript::~PowerJavascript() {
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index 732ec910c0..6cc8be250d 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -1028,7 +1028,7 @@ void OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_au
// OS X needs non-zero color size, so set resonable values
int colorBits = 32;
-// Fail if a robustness strategy was requested
+ // Fail if a robustness strategy was requested
#define ADD_ATTR(x) \
{ attributes[attributeCount++] = x; }
diff --git a/platform/osx/power_osx.cpp b/platform/osx/power_osx.cpp
index eed03e63c1..bd5f9fe65f 100644
--- a/platform/osx/power_osx.cpp
+++ b/platform/osx/power_osx.cpp
@@ -242,8 +242,10 @@ int power_osx::get_power_percent_left() {
}
}
-power_osx::power_osx()
- : nsecs_left(-1), percent_left(-1), power_state(OS::POWERSTATE_UNKNOWN) {
+power_osx::power_osx() :
+ nsecs_left(-1),
+ percent_left(-1),
+ power_state(OS::POWERSTATE_UNKNOWN) {
}
power_osx::~power_osx() {
diff --git a/platform/uwp/app.cpp b/platform/uwp/app.cpp
index c565999d82..b47b99744e 100644
--- a/platform/uwp/app.cpp
+++ b/platform/uwp/app.cpp
@@ -77,15 +77,15 @@ public:
return 0;
}
-App::App()
- : mWindowClosed(false),
- mWindowVisible(true),
- mWindowWidth(0),
- mWindowHeight(0),
- mEglDisplay(EGL_NO_DISPLAY),
- mEglContext(EGL_NO_CONTEXT),
- mEglSurface(EGL_NO_SURFACE),
- number_of_contacts(0) {
+App::App() :
+ mWindowClosed(false),
+ mWindowVisible(true),
+ mWindowWidth(0),
+ mWindowHeight(0),
+ mEglDisplay(EGL_NO_DISPLAY),
+ mEglContext(EGL_NO_CONTEXT),
+ mEglSurface(EGL_NO_SURFACE),
+ number_of_contacts(0) {
}
// The first method called when the IFrameworkView is being created.
diff --git a/platform/uwp/gl_context_egl.cpp b/platform/uwp/gl_context_egl.cpp
index dafe5d5e25..2130af6d60 100644
--- a/platform/uwp/gl_context_egl.cpp
+++ b/platform/uwp/gl_context_egl.cpp
@@ -108,7 +108,8 @@ Error ContextEGL::initialize() {
EGL_NONE,*/
// These are the default display attributes, used to request ANGLE's D3D11 renderer.
// eglInitialize will only succeed with these attributes if the hardware supports D3D11 Feature Level 10_0+.
- EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
+ EGL_PLATFORM_ANGLE_TYPE_ANGLE,
+ EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
// EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER is an optimization that can have large performance benefits on mobile devices.
// Its syntax is subject to change, though. Please update your Visual Studio templates if you experience compilation issues with it.
@@ -117,7 +118,8 @@ Error ContextEGL::initialize() {
// EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE is an option that enables ANGLE to automatically call
// the IDXGIDevice3::Trim method on behalf of the application when it gets suspended.
// Calling IDXGIDevice3::Trim when an application is suspended is a Windows Store application certification requirement.
- EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE, EGL_TRUE,
+ EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE,
+ EGL_TRUE,
EGL_NONE,
};
@@ -190,10 +192,10 @@ void ContextEGL::cleanup() {
}
};
-ContextEGL::ContextEGL(CoreWindow ^ p_window)
- : mEglDisplay(EGL_NO_DISPLAY),
- mEglContext(EGL_NO_CONTEXT),
- mEglSurface(EGL_NO_SURFACE) {
+ContextEGL::ContextEGL(CoreWindow ^ p_window) :
+ mEglDisplay(EGL_NO_DISPLAY),
+ mEglContext(EGL_NO_CONTEXT),
+ mEglSurface(EGL_NO_SURFACE) {
window = p_window;
};
diff --git a/platform/uwp/joypad_uwp.cpp b/platform/uwp/joypad_uwp.cpp
index 0f84bd55a3..088d232e04 100644
--- a/platform/uwp/joypad_uwp.cpp
+++ b/platform/uwp/joypad_uwp.cpp
@@ -54,7 +54,7 @@ void JoypadUWP::process_controllers() {
case ControllerType::GAMEPAD_CONTROLLER: {
- GamepadReading reading = ((Gamepad ^)joy.controller_reference)->GetCurrentReading();
+ GamepadReading reading = ((Gamepad ^) joy.controller_reference)->GetCurrentReading();
int button_mask = (int)GamepadButtons::Menu;
for (int j = 0; j < 14; j++) {
@@ -161,7 +161,7 @@ void JoypadUWP::joypad_vibration_start(int p_device, float p_weak_magnitude, flo
GamepadVibration vibration;
vibration.LeftMotor = p_strong_magnitude;
vibration.RightMotor = p_weak_magnitude;
- ((Gamepad ^)joy.controller_reference)->Vibration = vibration;
+ ((Gamepad ^) joy.controller_reference)->Vibration = vibration;
joy.ff_timestamp = p_timestamp;
joy.ff_end_timestamp = p_duration == 0 ? 0 : p_timestamp + (uint64_t)(p_duration * 1000000.0);
@@ -175,7 +175,7 @@ void JoypadUWP::joypad_vibration_stop(int p_device, uint64_t p_timestamp) {
GamepadVibration vibration;
vibration.LeftMotor = 0.0;
vibration.RightMotor = 0.0;
- ((Gamepad ^)joy.controller_reference)->Vibration = vibration;
+ ((Gamepad ^) joy.controller_reference)->Vibration = vibration;
joy.ff_timestamp = p_timestamp;
joy.vibrating = false;
diff --git a/platform/uwp/power_uwp.cpp b/platform/uwp/power_uwp.cpp
index 81e97b1391..14fce8b133 100644
--- a/platform/uwp/power_uwp.cpp
+++ b/platform/uwp/power_uwp.cpp
@@ -30,8 +30,10 @@
#include "power_uwp.h"
-PowerUWP::PowerUWP()
- : nsecs_left(-1), percent_left(-1), power_state(OS::POWERSTATE_UNKNOWN) {
+PowerUWP::PowerUWP() :
+ nsecs_left(-1),
+ percent_left(-1),
+ power_state(OS::POWERSTATE_UNKNOWN) {
}
PowerUWP::~PowerUWP() {
diff --git a/platform/windows/crash_handler_win.cpp b/platform/windows/crash_handler_win.cpp
index feea3911b2..5657036693 100644
--- a/platform/windows/crash_handler_win.cpp
+++ b/platform/windows/crash_handler_win.cpp
@@ -61,8 +61,8 @@ class symbol {
static const int max_name_len = 1024;
public:
- symbol(HANDLE process, DWORD64 address)
- : sym((sym_type *)::operator new(sizeof(*sym) + max_name_len)) {
+ symbol(HANDLE process, DWORD64 address) :
+ sym((sym_type *)::operator new(sizeof(*sym) + max_name_len)) {
memset(sym, '\0', sizeof(*sym) + max_name_len);
sym->SizeOfStruct = sizeof(*sym);
sym->MaxNameLength = max_name_len;
@@ -85,8 +85,8 @@ class get_mod_info {
HANDLE process;
public:
- get_mod_info(HANDLE h)
- : process(h) {}
+ get_mod_info(HANDLE h) :
+ process(h) {}
module_data operator()(HMODULE module) {
module_data ret;
diff --git a/platform/windows/power_windows.cpp b/platform/windows/power_windows.cpp
index 8d86f160f1..cc452d774d 100644
--- a/platform/windows/power_windows.cpp
+++ b/platform/windows/power_windows.cpp
@@ -121,8 +121,10 @@ int PowerWindows::get_power_percent_left() {
}
}
-PowerWindows::PowerWindows()
- : nsecs_left(-1), percent_left(-1), power_state(OS::POWERSTATE_UNKNOWN) {
+PowerWindows::PowerWindows() :
+ nsecs_left(-1),
+ percent_left(-1),
+ power_state(OS::POWERSTATE_UNKNOWN) {
}
PowerWindows::~PowerWindows() {
diff --git a/platform/x11/context_gl_x11.cpp b/platform/x11/context_gl_x11.cpp
index 4f9d4a84b9..61c6b3c9dd 100644
--- a/platform/x11/context_gl_x11.cpp
+++ b/platform/x11/context_gl_x11.cpp
@@ -228,8 +228,8 @@ bool ContextGL_X11::is_using_vsync() const {
return use_vsync;
}
-ContextGL_X11::ContextGL_X11(::Display *p_x11_display, ::Window &p_x11_window, const OS::VideoMode &p_default_video_mode, bool p_opengl_3_context)
- : x11_window(p_x11_window) {
+ContextGL_X11::ContextGL_X11(::Display *p_x11_display, ::Window &p_x11_window, const OS::VideoMode &p_default_video_mode, bool p_opengl_3_context) :
+ x11_window(p_x11_window) {
default_video_mode = p_default_video_mode;
x11_display = p_x11_display;
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index bf63921b06..c210a03688 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -132,10 +132,9 @@ void OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_au
// Try to support IME if detectable auto-repeat is supported
if (xkb_dar == True) {
-// Xutf8LookupString will be used later instead of XmbLookupString before
-// the multibyte sequences can be converted to unicode string.
-
#ifdef X_HAVE_UTF8_STRING
+ // Xutf8LookupString will be used later instead of XmbLookupString before
+ // the multibyte sequences can be converted to unicode string.
modifiers = XSetLocaleModifiers("");
#endif
}
@@ -548,7 +547,7 @@ void OS_X11::finalize() {
memdelete(main_loop);
main_loop = NULL;
-/*
+ /*
if (debugger_connection_console) {
memdelete(debugger_connection_console);
}
diff --git a/platform/x11/power_x11.cpp b/platform/x11/power_x11.cpp
index 76ff7f91fb..0ef2629cb0 100644
--- a/platform/x11/power_x11.cpp
+++ b/platform/x11/power_x11.cpp
@@ -542,8 +542,10 @@ bool PowerX11::UpdatePowerInfo() {
return false;
}
-PowerX11::PowerX11()
- : nsecs_left(-1), percent_left(-1), power_state(OS::POWERSTATE_UNKNOWN) {
+PowerX11::PowerX11() :
+ nsecs_left(-1),
+ percent_left(-1),
+ power_state(OS::POWERSTATE_UNKNOWN) {
}
PowerX11::~PowerX11() {
diff --git a/scene/2d/area_2d.cpp b/scene/2d/area_2d.cpp
index 9ee77a710c..80f9bf0f9f 100644
--- a/scene/2d/area_2d.cpp
+++ b/scene/2d/area_2d.cpp
@@ -688,8 +688,8 @@ void Area2D::_bind_methods() {
BIND_ENUM_CONSTANT(SPACE_OVERRIDE_REPLACE_COMBINE);
}
-Area2D::Area2D()
- : CollisionObject2D(Physics2DServer::get_singleton()->area_create(), true) {
+Area2D::Area2D() :
+ CollisionObject2D(Physics2DServer::get_singleton()->area_create(), true) {
space_override = SPACE_OVERRIDE_DISABLED;
set_gravity(98);
diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp
index 9a3debbe90..768d5185d7 100644
--- a/scene/2d/canvas_item.cpp
+++ b/scene/2d/canvas_item.cpp
@@ -211,8 +211,8 @@ void CanvasItemMaterial::_bind_methods() {
BIND_ENUM_CONSTANT(LIGHT_MODE_LIGHT_ONLY);
}
-CanvasItemMaterial::CanvasItemMaterial()
- : element(this) {
+CanvasItemMaterial::CanvasItemMaterial() :
+ element(this) {
blend_mode = BLEND_MODE_MIX;
light_mode = LIGHT_MODE_NORMAL;
@@ -1131,8 +1131,8 @@ Rect2 CanvasItem::_edit_get_item_and_children_rect() const {
return rect;
}
-CanvasItem::CanvasItem()
- : xform_change(this) {
+CanvasItem::CanvasItem() :
+ xform_change(this) {
canvas_item = VisualServer::get_singleton()->canvas_item_create();
visible = true;
diff --git a/scene/2d/line_2d.cpp b/scene/2d/line_2d.cpp
index 9131223ff3..57a0e15447 100644
--- a/scene/2d/line_2d.cpp
+++ b/scene/2d/line_2d.cpp
@@ -37,8 +37,8 @@ VARIANT_ENUM_CAST(Line2D::LineJointMode)
VARIANT_ENUM_CAST(Line2D::LineCapMode)
VARIANT_ENUM_CAST(Line2D::LineTextureMode)
-Line2D::Line2D()
- : Node2D() {
+Line2D::Line2D() :
+ Node2D() {
_joint_mode = LINE_JOINT_SHARP;
_begin_cap_mode = LINE_CAP_NONE;
_end_cap_mode = LINE_CAP_NONE;
diff --git a/scene/2d/navigation2d.h b/scene/2d/navigation2d.h
index e87b01f7c5..bb97e1a9a9 100644
--- a/scene/2d/navigation2d.h
+++ b/scene/2d/navigation2d.h
@@ -57,9 +57,9 @@ class Navigation2D : public Node2D {
return (a.key == p_key.a.key) ? (b.key < p_key.b.key) : (a.key < p_key.a.key);
};
- EdgeKey(const Point &p_a = Point(), const Point &p_b = Point())
- : a(p_a),
- b(p_b) {
+ EdgeKey(const Point &p_a = Point(), const Point &p_b = Point()) :
+ a(p_a),
+ b(p_b) {
if (a.key > b.key) {
SWAP(a, b);
}
diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp
index 1f6127e6eb..a1a1101b11 100644
--- a/scene/2d/physics_body_2d.cpp
+++ b/scene/2d/physics_body_2d.cpp
@@ -132,8 +132,8 @@ bool PhysicsBody2D::get_collision_layer_bit(int p_bit) const {
return get_collision_layer() & (1 << p_bit);
}
-PhysicsBody2D::PhysicsBody2D(Physics2DServer::BodyMode p_mode)
- : CollisionObject2D(Physics2DServer::get_singleton()->body_create(), false) {
+PhysicsBody2D::PhysicsBody2D(Physics2DServer::BodyMode p_mode) :
+ CollisionObject2D(Physics2DServer::get_singleton()->body_create(), false) {
Physics2DServer::get_singleton()->body_set_mode(get_rid(), p_mode);
collision_layer = 1;
@@ -226,8 +226,8 @@ void StaticBody2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::REAL, "bounce", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_bounce", "get_bounce");
}
-StaticBody2D::StaticBody2D()
- : PhysicsBody2D(Physics2DServer::BODY_MODE_STATIC) {
+StaticBody2D::StaticBody2D() :
+ PhysicsBody2D(Physics2DServer::BODY_MODE_STATIC) {
constant_angular_velocity = 0;
bounce = 0;
@@ -921,8 +921,8 @@ void RigidBody2D::_bind_methods() {
BIND_ENUM_CONSTANT(CCD_MODE_CAST_SHAPE);
}
-RigidBody2D::RigidBody2D()
- : PhysicsBody2D(Physics2DServer::BODY_MODE_RIGID) {
+RigidBody2D::RigidBody2D() :
+ PhysicsBody2D(Physics2DServer::BODY_MODE_RIGID) {
mode = MODE_RIGID;
@@ -1144,8 +1144,8 @@ void KinematicBody2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::REAL, "collision/safe_margin", PROPERTY_HINT_RANGE, "0.001,256,0.001"), "set_safe_margin", "get_safe_margin");
}
-KinematicBody2D::KinematicBody2D()
- : PhysicsBody2D(Physics2DServer::BODY_MODE_KINEMATIC) {
+KinematicBody2D::KinematicBody2D() :
+ PhysicsBody2D(Physics2DServer::BODY_MODE_KINEMATIC) {
margin = 0.08;
diff --git a/scene/2d/tile_map.h b/scene/2d/tile_map.h
index 8eecf48df2..edc9de0543 100644
--- a/scene/2d/tile_map.h
+++ b/scene/2d/tile_map.h
@@ -147,8 +147,8 @@ private:
navpoly_ids = q.navpoly_ids;
occluder_instances = q.occluder_instances;
}
- Quadrant(const Quadrant &q)
- : dirty_list(this) {
+ Quadrant(const Quadrant &q) :
+ dirty_list(this) {
pos = q.pos;
canvas_items = q.canvas_items;
body = q.body;
@@ -156,8 +156,8 @@ private:
occluder_instances = q.occluder_instances;
navpoly_ids = q.navpoly_ids;
}
- Quadrant()
- : dirty_list(this) {}
+ Quadrant() :
+ dirty_list(this) {}
};
Map<PosKey, Quadrant> quadrant_map;
diff --git a/scene/3d/area.cpp b/scene/3d/area.cpp
index 266bc5e381..422aa556f9 100644
--- a/scene/3d/area.cpp
+++ b/scene/3d/area.cpp
@@ -737,8 +737,8 @@ void Area::_bind_methods() {
BIND_ENUM_CONSTANT(SPACE_OVERRIDE_REPLACE_COMBINE);
}
-Area::Area()
- : CollisionObject(PhysicsServer::get_singleton()->area_create(), true) {
+Area::Area() :
+ CollisionObject(PhysicsServer::get_singleton()->area_create(), true) {
space_override = SPACE_OVERRIDE_DISABLED;
set_gravity(9.8);
diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp
index 2754d56a05..8e2f87738a 100644
--- a/scene/3d/gi_probe.cpp
+++ b/scene/3d/gi_probe.cpp
@@ -410,7 +410,7 @@ static bool planeBoxOverlap(Vector3 normal, float d, Vector3 maxbox) {
rad = fa * boxhalfsize.x + fb * boxhalfsize.z; \
if (min > rad || max < -rad) return false;
-/*======================== Z-tests ========================*/
+ /*======================== Z-tests ========================*/
#define AXISTEST_Z12(a, b, fa, fb) \
p1 = a * v1.x - b * v1.y; \
diff --git a/scene/3d/light.cpp b/scene/3d/light.cpp
index 126c07f0be..1fc4e932e8 100644
--- a/scene/3d/light.cpp
+++ b/scene/3d/light.cpp
@@ -367,8 +367,8 @@ void DirectionalLight::_bind_methods() {
BIND_ENUM_CONSTANT(SHADOW_DEPTH_RANGE_OPTIMIZED);
}
-DirectionalLight::DirectionalLight()
- : Light(VisualServer::LIGHT_DIRECTIONAL) {
+DirectionalLight::DirectionalLight() :
+ Light(VisualServer::LIGHT_DIRECTIONAL) {
set_param(PARAM_SHADOW_NORMAL_BIAS, 0.8);
set_param(PARAM_SHADOW_BIAS, 0.1);
@@ -422,8 +422,8 @@ void OmniLight::_bind_methods() {
BIND_ENUM_CONSTANT(SHADOW_DETAIL_HORIZONTAL);
}
-OmniLight::OmniLight()
- : Light(VisualServer::LIGHT_OMNI) {
+OmniLight::OmniLight() :
+ Light(VisualServer::LIGHT_OMNI) {
set_shadow_mode(SHADOW_CUBE);
set_shadow_detail(SHADOW_DETAIL_HORIZONTAL);
diff --git a/scene/3d/light.h b/scene/3d/light.h
index 8514b429ec..33e62214b1 100644
--- a/scene/3d/light.h
+++ b/scene/3d/light.h
@@ -208,8 +208,8 @@ protected:
static void _bind_methods();
public:
- SpotLight()
- : Light(VisualServer::LIGHT_SPOT) {}
+ SpotLight() :
+ Light(VisualServer::LIGHT_SPOT) {}
};
#endif
diff --git a/scene/3d/navigation.h b/scene/3d/navigation.h
index 010d16dedd..d9a38f7b00 100644
--- a/scene/3d/navigation.h
+++ b/scene/3d/navigation.h
@@ -58,9 +58,9 @@ class Navigation : public Spatial {
return (a.key == p_key.a.key) ? (b.key < p_key.b.key) : (a.key < p_key.a.key);
};
- EdgeKey(const Point &p_a = Point(), const Point &p_b = Point())
- : a(p_a),
- b(p_b) {
+ EdgeKey(const Point &p_a = Point(), const Point &p_b = Point()) :
+ a(p_a),
+ b(p_b) {
if (a.key > b.key) {
SWAP(a, b);
}
diff --git a/scene/3d/particles.cpp b/scene/3d/particles.cpp
index f8685a7b7c..ea8e617adc 100644
--- a/scene/3d/particles.cpp
+++ b/scene/3d/particles.cpp
@@ -1523,8 +1523,8 @@ void ParticlesMaterial::_bind_methods() {
BIND_ENUM_CONSTANT(EMISSION_SHAPE_DIRECTED_POINTS);
}
-ParticlesMaterial::ParticlesMaterial()
- : element(this) {
+ParticlesMaterial::ParticlesMaterial() :
+ element(this) {
set_spread(45);
set_flatness(0);
diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp
index 4e06b272e2..f2f00bb617 100644
--- a/scene/3d/physics_body.cpp
+++ b/scene/3d/physics_body.cpp
@@ -166,8 +166,8 @@ void PhysicsBody::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_mask", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collision_mask", "get_collision_mask");
}
-PhysicsBody::PhysicsBody(PhysicsServer::BodyMode p_mode)
- : CollisionObject(PhysicsServer::get_singleton()->body_create(p_mode), false) {
+PhysicsBody::PhysicsBody(PhysicsServer::BodyMode p_mode) :
+ CollisionObject(PhysicsServer::get_singleton()->body_create(p_mode), false) {
collision_layer = 1;
collision_mask = 1;
@@ -241,8 +241,8 @@ void StaticBody::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "constant_angular_velocity"), "set_constant_angular_velocity", "get_constant_angular_velocity");
}
-StaticBody::StaticBody()
- : PhysicsBody(PhysicsServer::BODY_MODE_STATIC) {
+StaticBody::StaticBody() :
+ PhysicsBody(PhysicsServer::BODY_MODE_STATIC) {
bounce = 0;
friction = 1;
@@ -881,8 +881,8 @@ void RigidBody::_bind_methods() {
BIND_ENUM_CONSTANT(AXIS_LOCK_Z);
}
-RigidBody::RigidBody()
- : PhysicsBody(PhysicsServer::BODY_MODE_RIGID) {
+RigidBody::RigidBody() :
+ PhysicsBody(PhysicsServer::BODY_MODE_RIGID) {
mode = MODE_RIGID;
@@ -1104,8 +1104,8 @@ void KinematicBody::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::REAL, "collision/safe_margin", PROPERTY_HINT_RANGE, "0.001,256,0.001"), "set_safe_margin", "get_safe_margin");
}
-KinematicBody::KinematicBody()
- : PhysicsBody(PhysicsServer::BODY_MODE_KINEMATIC) {
+KinematicBody::KinematicBody() :
+ PhysicsBody(PhysicsServer::BODY_MODE_KINEMATIC) {
margin = 0.001;
diff --git a/scene/3d/spatial.cpp b/scene/3d/spatial.cpp
index 588aa2881a..d9f88ac693 100644
--- a/scene/3d/spatial.cpp
+++ b/scene/3d/spatial.cpp
@@ -756,8 +756,8 @@ void Spatial::_bind_methods() {
ADD_SIGNAL(MethodInfo("visibility_changed"));
}
-Spatial::Spatial()
- : xform_change(this) {
+Spatial::Spatial() :
+ xform_change(this) {
data.dirty = DIRTY_NONE;
data.children_lock = 0;
diff --git a/scene/3d/vehicle_body.cpp b/scene/3d/vehicle_body.cpp
index a072572142..2e3e179a7b 100644
--- a/scene/3d/vehicle_body.cpp
+++ b/scene/3d/vehicle_body.cpp
@@ -54,8 +54,8 @@ public:
const Vector3 &inertiaInvA,
const real_t massInvA,
const Vector3 &inertiaInvB,
- const real_t massInvB)
- : m_linearJointAxis(jointAxis) {
+ const real_t massInvB) :
+ m_linearJointAxis(jointAxis) {
m_aJ = world2A.xform(rel_pos1.cross(m_linearJointAxis));
m_bJ = world2B.xform(rel_pos2.cross(-m_linearJointAxis));
m_0MinvJt = inertiaInvA * m_aJ;
@@ -593,12 +593,12 @@ void VehicleBody::_resolve_single_bilateral(PhysicsDirectBodyState *s, const Vec
#endif
}
-VehicleBody::btVehicleWheelContactPoint::btVehicleWheelContactPoint(PhysicsDirectBodyState *s, PhysicsBody *body1, const Vector3 &frictionPosWorld, const Vector3 &frictionDirectionWorld, real_t maxImpulse)
- : m_s(s),
- m_body1(body1),
- m_frictionPositionWorld(frictionPosWorld),
- m_frictionDirectionWorld(frictionDirectionWorld),
- m_maxImpulse(maxImpulse) {
+VehicleBody::btVehicleWheelContactPoint::btVehicleWheelContactPoint(PhysicsDirectBodyState *s, PhysicsBody *body1, const Vector3 &frictionPosWorld, const Vector3 &frictionDirectionWorld, real_t maxImpulse) :
+ m_s(s),
+ m_body1(body1),
+ m_frictionPositionWorld(frictionPosWorld),
+ m_frictionDirectionWorld(frictionDirectionWorld),
+ m_maxImpulse(maxImpulse) {
float denom0 = 0;
float denom1 = 0;
@@ -969,8 +969,8 @@ void VehicleBody::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::REAL, "friction", PROPERTY_HINT_RANGE, "0.01,1,0.01"), "set_friction", "get_friction");
}
-VehicleBody::VehicleBody()
- : PhysicsBody(PhysicsServer::BODY_MODE_RIGID) {
+VehicleBody::VehicleBody() :
+ PhysicsBody(PhysicsServer::BODY_MODE_RIGID) {
m_pitchControl = 0;
m_currentVehicleSpeedKmHour = real_t(0.);
diff --git a/scene/animation/tween_interpolaters.cpp b/scene/animation/tween_interpolaters.cpp
index 8f543a575a..cbf941f3ed 100644
--- a/scene/animation/tween_interpolaters.cpp
+++ b/scene/animation/tween_interpolaters.cpp
@@ -50,7 +50,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
return c * t / d + b;
}
-};
+}; // namespace linear
///////////////////////////////////////////////////////////////////////////
// sine
///////////////////////////////////////////////////////////////////////////
@@ -70,7 +70,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d);
}
-};
+}; // namespace sine
///////////////////////////////////////////////////////////////////////////
// quint
///////////////////////////////////////////////////////////////////////////
@@ -92,7 +92,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d);
}
-};
+}; // namespace quint
///////////////////////////////////////////////////////////////////////////
// quart
///////////////////////////////////////////////////////////////////////////
@@ -114,7 +114,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d);
}
-};
+}; // namespace quart
///////////////////////////////////////////////////////////////////////////
// quad
///////////////////////////////////////////////////////////////////////////
@@ -137,7 +137,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d);
}
-};
+}; // namespace quad
///////////////////////////////////////////////////////////////////////////
// expo
///////////////////////////////////////////////////////////////////////////
@@ -163,7 +163,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d);
}
-};
+}; // namespace expo
///////////////////////////////////////////////////////////////////////////
// elastic
///////////////////////////////////////////////////////////////////////////
@@ -205,7 +205,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d);
}
-};
+}; // namespace elastic
///////////////////////////////////////////////////////////////////////////
// cubic
///////////////////////////////////////////////////////////////////////////
@@ -227,7 +227,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d);
}
-};
+}; // namespace cubic
///////////////////////////////////////////////////////////////////////////
// circ
///////////////////////////////////////////////////////////////////////////
@@ -248,7 +248,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d);
}
-};
+}; // namespace circ
///////////////////////////////////////////////////////////////////////////
// bounce
///////////////////////////////////////////////////////////////////////////
@@ -281,7 +281,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d);
}
-};
+}; // namespace bounce
///////////////////////////////////////////////////////////////////////////
// back
///////////////////////////////////////////////////////////////////////////
@@ -307,7 +307,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d);
}
-};
+}; // namespace back
Tween::interpolater Tween::interpolaters[Tween::TRANS_COUNT][Tween::EASE_COUNT] = {
{ &linear::in, &linear::out, &linear::in_out, &linear::out_in },
diff --git a/scene/gui/box_container.h b/scene/gui/box_container.h
index 4d00a2011f..ebbbbed1f9 100644
--- a/scene/gui/box_container.h
+++ b/scene/gui/box_container.h
@@ -70,8 +70,8 @@ class HBoxContainer : public BoxContainer {
GDCLASS(HBoxContainer, BoxContainer);
public:
- HBoxContainer()
- : BoxContainer(false) {}
+ HBoxContainer() :
+ BoxContainer(false) {}
};
class MarginContainer;
@@ -82,8 +82,8 @@ class VBoxContainer : public BoxContainer {
public:
MarginContainer *add_margin_child(const String &p_label, Control *p_control, bool p_expand = false);
- VBoxContainer()
- : BoxContainer(true) {}
+ VBoxContainer() :
+ BoxContainer(true) {}
};
VARIANT_ENUM_CAST(BoxContainer::AlignMode);
diff --git a/scene/gui/check_box.cpp b/scene/gui/check_box.cpp
index e2b10a948f..00f6153062 100644
--- a/scene/gui/check_box.cpp
+++ b/scene/gui/check_box.cpp
@@ -56,8 +56,8 @@ bool CheckBox::is_radio() {
return get_button_group().is_valid();
}
-CheckBox::CheckBox(const String &p_text)
- : Button(p_text) {
+CheckBox::CheckBox(const String &p_text) :
+ Button(p_text) {
set_toggle_mode(true);
set_text_align(ALIGN_LEFT);
}
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp
index 7a0593bc87..cb6283507e 100644
--- a/scene/gui/color_picker.cpp
+++ b/scene/gui/color_picker.cpp
@@ -486,8 +486,8 @@ void ColorPicker::_bind_methods() {
ADD_SIGNAL(MethodInfo("color_changed", PropertyInfo(Variant::COLOR, "color")));
}
-ColorPicker::ColorPicker()
- : BoxContainer(true) {
+ColorPicker::ColorPicker() :
+ BoxContainer(true) {
updating = true;
edit_alpha = true;
diff --git a/scene/gui/scroll_bar.h b/scene/gui/scroll_bar.h
index 373483a8a0..753bd35de7 100644
--- a/scene/gui/scroll_bar.h
+++ b/scene/gui/scroll_bar.h
@@ -117,8 +117,8 @@ class HScrollBar : public ScrollBar {
GDCLASS(HScrollBar, ScrollBar);
public:
- HScrollBar()
- : ScrollBar(HORIZONTAL) { set_v_size_flags(0); }
+ HScrollBar() :
+ ScrollBar(HORIZONTAL) { set_v_size_flags(0); }
};
class VScrollBar : public ScrollBar {
@@ -126,8 +126,8 @@ class VScrollBar : public ScrollBar {
GDCLASS(VScrollBar, ScrollBar);
public:
- VScrollBar()
- : ScrollBar(VERTICAL) { set_h_size_flags(0); }
+ VScrollBar() :
+ ScrollBar(VERTICAL) { set_h_size_flags(0); }
};
#endif
diff --git a/scene/gui/slider.h b/scene/gui/slider.h
index a2334a69fc..95ae429d63 100644
--- a/scene/gui/slider.h
+++ b/scene/gui/slider.h
@@ -77,8 +77,8 @@ class HSlider : public Slider {
GDCLASS(HSlider, Slider);
public:
- HSlider()
- : Slider(HORIZONTAL) { set_v_size_flags(0); }
+ HSlider() :
+ Slider(HORIZONTAL) { set_v_size_flags(0); }
};
class VSlider : public Slider {
@@ -86,8 +86,8 @@ class VSlider : public Slider {
GDCLASS(VSlider, Slider);
public:
- VSlider()
- : Slider(VERTICAL) { set_h_size_flags(0); }
+ VSlider() :
+ Slider(VERTICAL) { set_h_size_flags(0); }
};
#endif // SLIDER_H
diff --git a/scene/gui/split_container.h b/scene/gui/split_container.h
index 8ec21b5eaa..c7a484c4c5 100644
--- a/scene/gui/split_container.h
+++ b/scene/gui/split_container.h
@@ -87,8 +87,8 @@ class HSplitContainer : public SplitContainer {
GDCLASS(HSplitContainer, SplitContainer);
public:
- HSplitContainer()
- : SplitContainer(false) { set_default_cursor_shape(CURSOR_HSPLIT); }
+ HSplitContainer() :
+ SplitContainer(false) { set_default_cursor_shape(CURSOR_HSPLIT); }
};
class VSplitContainer : public SplitContainer {
@@ -96,8 +96,8 @@ class VSplitContainer : public SplitContainer {
GDCLASS(VSplitContainer, SplitContainer);
public:
- VSplitContainer()
- : SplitContainer(true) { set_default_cursor_shape(CURSOR_VSPLIT); }
+ VSplitContainer() :
+ SplitContainer(true) { set_default_cursor_shape(CURSOR_VSPLIT); }
};
#endif // SPLIT_CONTAINER_H
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index 5ee286c2d5..deb40800bc 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -794,6 +794,7 @@ Ref<ArrayMesh> SceneTree::get_debug_contact_mesh() {
Vector3(0, 0, 1)
};
+ /* clang-format off */
int diamond_faces[8 * 3] = {
0, 2, 4,
0, 3, 4,
@@ -804,6 +805,7 @@ Ref<ArrayMesh> SceneTree::get_debug_contact_mesh() {
1, 2, 5,
1, 3, 5,
};
+ /* clang-format on */
PoolVector<int> indices;
for (int i = 0; i < 8 * 3; i++)
diff --git a/scene/main/scene_tree.h b/scene/main/scene_tree.h
index 7898dc065a..244fc8da62 100644
--- a/scene/main/scene_tree.h
+++ b/scene/main/scene_tree.h
@@ -420,8 +420,8 @@ public:
void set_screen_stretch(StretchMode p_mode, StretchAspect p_aspect, const Size2 p_minsize, real_t p_shrink = 1);
-//void change_scene(const String& p_path);
-//Node *get_loaded_scene();
+ //void change_scene(const String& p_path);
+ //Node *get_loaded_scene();
#ifdef TOOLS_ENABLED
void set_edited_scene_root(Node *p_node);
diff --git a/scene/resources/box_shape.cpp b/scene/resources/box_shape.cpp
index 4b9843f3f5..858e19c9a6 100644
--- a/scene/resources/box_shape.cpp
+++ b/scene/resources/box_shape.cpp
@@ -73,8 +73,8 @@ void BoxShape::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "extents"), "set_extents", "get_extents");
}
-BoxShape::BoxShape()
- : Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_BOX)) {
+BoxShape::BoxShape() :
+ Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_BOX)) {
set_extents(Vector3(1, 1, 1));
}
diff --git a/scene/resources/capsule_shape.cpp b/scene/resources/capsule_shape.cpp
index e11b98f82e..f0eb8232e5 100644
--- a/scene/resources/capsule_shape.cpp
+++ b/scene/resources/capsule_shape.cpp
@@ -113,8 +113,8 @@ void CapsuleShape::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_RANGE, "0.01,4096,0.01"), "set_height", "get_height");
}
-CapsuleShape::CapsuleShape()
- : Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_CAPSULE)) {
+CapsuleShape::CapsuleShape() :
+ Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_CAPSULE)) {
radius = 1.0;
height = 1.0;
diff --git a/scene/resources/capsule_shape_2d.cpp b/scene/resources/capsule_shape_2d.cpp
index 912150b939..3caf12feb8 100644
--- a/scene/resources/capsule_shape_2d.cpp
+++ b/scene/resources/capsule_shape_2d.cpp
@@ -97,8 +97,8 @@ void CapsuleShape2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::REAL, "height"), "set_height", "get_height");
}
-CapsuleShape2D::CapsuleShape2D()
- : Shape2D(Physics2DServer::get_singleton()->capsule_shape_create()) {
+CapsuleShape2D::CapsuleShape2D() :
+ Shape2D(Physics2DServer::get_singleton()->capsule_shape_create()) {
radius = 10;
height = 20;
diff --git a/scene/resources/circle_shape_2d.cpp b/scene/resources/circle_shape_2d.cpp
index 287bde4bfb..bff3ed4d67 100644
--- a/scene/resources/circle_shape_2d.cpp
+++ b/scene/resources/circle_shape_2d.cpp
@@ -76,8 +76,8 @@ void CircleShape2D::draw(const RID &p_to_rid, const Color &p_color) {
VisualServer::get_singleton()->canvas_item_add_polygon(p_to_rid, points, col);
}
-CircleShape2D::CircleShape2D()
- : Shape2D(Physics2DServer::get_singleton()->circle_shape_create()) {
+CircleShape2D::CircleShape2D() :
+ Shape2D(Physics2DServer::get_singleton()->circle_shape_create()) {
radius = 10;
_update_shape();
diff --git a/scene/resources/concave_polygon_shape.cpp b/scene/resources/concave_polygon_shape.cpp
index 6ae4fde85e..1c48f0c30b 100644
--- a/scene/resources/concave_polygon_shape.cpp
+++ b/scene/resources/concave_polygon_shape.cpp
@@ -106,8 +106,8 @@ void ConcavePolygonShape::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_faces"), &ConcavePolygonShape::get_faces);
}
-ConcavePolygonShape::ConcavePolygonShape()
- : Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_CONCAVE_POLYGON)) {
+ConcavePolygonShape::ConcavePolygonShape() :
+ Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_CONCAVE_POLYGON)) {
//set_planes(Vector3(1,1,1));
}
diff --git a/scene/resources/concave_polygon_shape_2d.cpp b/scene/resources/concave_polygon_shape_2d.cpp
index bb91e33ec2..e90046fd28 100644
--- a/scene/resources/concave_polygon_shape_2d.cpp
+++ b/scene/resources/concave_polygon_shape_2d.cpp
@@ -84,6 +84,6 @@ void ConcavePolygonShape2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "segments"), "set_segments", "get_segments");
}
-ConcavePolygonShape2D::ConcavePolygonShape2D()
- : Shape2D(Physics2DServer::get_singleton()->concave_polygon_shape_create()) {
+ConcavePolygonShape2D::ConcavePolygonShape2D() :
+ Shape2D(Physics2DServer::get_singleton()->concave_polygon_shape_create()) {
}
diff --git a/scene/resources/convex_polygon_shape.cpp b/scene/resources/convex_polygon_shape.cpp
index bba52bd5ff..31c4ea55e9 100644
--- a/scene/resources/convex_polygon_shape.cpp
+++ b/scene/resources/convex_polygon_shape.cpp
@@ -81,8 +81,8 @@ void ConvexPolygonShape::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "points"), "set_points", "get_points");
}
-ConvexPolygonShape::ConvexPolygonShape()
- : Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_CONVEX_POLYGON)) {
+ConvexPolygonShape::ConvexPolygonShape() :
+ Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_CONVEX_POLYGON)) {
//set_points(Vector3(1,1,1));
}
diff --git a/scene/resources/convex_polygon_shape_2d.cpp b/scene/resources/convex_polygon_shape_2d.cpp
index a76b6a7cf4..9c25b6b467 100644
--- a/scene/resources/convex_polygon_shape_2d.cpp
+++ b/scene/resources/convex_polygon_shape_2d.cpp
@@ -86,8 +86,8 @@ Rect2 ConvexPolygonShape2D::get_rect() const {
return rect;
}
-ConvexPolygonShape2D::ConvexPolygonShape2D()
- : Shape2D(Physics2DServer::get_singleton()->convex_polygon_shape_create()) {
+ConvexPolygonShape2D::ConvexPolygonShape2D() :
+ Shape2D(Physics2DServer::get_singleton()->convex_polygon_shape_create()) {
int pcount = 3;
for (int i = 0; i < pcount; i++)
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp
index a6f301af1e..c8ab7c2a04 100644
--- a/scene/resources/material.cpp
+++ b/scene/resources/material.cpp
@@ -2066,8 +2066,8 @@ void SpatialMaterial::_bind_methods() {
BIND_ENUM_CONSTANT(EMISSION_OP_MULTIPLY);
}
-SpatialMaterial::SpatialMaterial()
- : element(this) {
+SpatialMaterial::SpatialMaterial() :
+ element(this) {
//initialize to right values
set_albedo(Color(1.0, 1.0, 1.0, 1.0));
diff --git a/scene/resources/plane_shape.cpp b/scene/resources/plane_shape.cpp
index 2b1e890a5d..2eb2ceff24 100644
--- a/scene/resources/plane_shape.cpp
+++ b/scene/resources/plane_shape.cpp
@@ -86,8 +86,8 @@ void PlaneShape::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::PLANE, "plane"), "set_plane", "get_plane");
}
-PlaneShape::PlaneShape()
- : Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_PLANE)) {
+PlaneShape::PlaneShape() :
+ Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_PLANE)) {
set_plane(Plane(0, 1, 0, 0));
}
diff --git a/scene/resources/ray_shape.cpp b/scene/resources/ray_shape.cpp
index ccce7660c6..b03a81b6bd 100644
--- a/scene/resources/ray_shape.cpp
+++ b/scene/resources/ray_shape.cpp
@@ -66,8 +66,8 @@ void RayShape::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::REAL, "length", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_length", "get_length");
}
-RayShape::RayShape()
- : Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_RAY)) {
+RayShape::RayShape() :
+ Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_RAY)) {
set_length(1.0);
}
diff --git a/scene/resources/rectangle_shape_2d.cpp b/scene/resources/rectangle_shape_2d.cpp
index 69dbb76744..202024aa96 100644
--- a/scene/resources/rectangle_shape_2d.cpp
+++ b/scene/resources/rectangle_shape_2d.cpp
@@ -66,8 +66,8 @@ void RectangleShape2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "extents"), "set_extents", "get_extents");
}
-RectangleShape2D::RectangleShape2D()
- : Shape2D(Physics2DServer::get_singleton()->rectangle_shape_create()) {
+RectangleShape2D::RectangleShape2D() :
+ Shape2D(Physics2DServer::get_singleton()->rectangle_shape_create()) {
extents = Vector2(10, 10);
_update_shape();
diff --git a/scene/resources/segment_shape_2d.cpp b/scene/resources/segment_shape_2d.cpp
index 7c7ec0d112..e8ef448e23 100644
--- a/scene/resources/segment_shape_2d.cpp
+++ b/scene/resources/segment_shape_2d.cpp
@@ -86,8 +86,8 @@ void SegmentShape2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "b"), "set_b", "get_b");
}
-SegmentShape2D::SegmentShape2D()
- : Shape2D(Physics2DServer::get_singleton()->segment_shape_create()) {
+SegmentShape2D::SegmentShape2D() :
+ Shape2D(Physics2DServer::get_singleton()->segment_shape_create()) {
a = Vector2();
b = Vector2(0, 10);
@@ -145,8 +145,8 @@ real_t RayShape2D::get_length() const {
return length;
}
-RayShape2D::RayShape2D()
- : Shape2D(Physics2DServer::get_singleton()->ray_shape_create()) {
+RayShape2D::RayShape2D() :
+ Shape2D(Physics2DServer::get_singleton()->ray_shape_create()) {
length = 20;
_update_shape();
diff --git a/scene/resources/shape_line_2d.cpp b/scene/resources/shape_line_2d.cpp
index d046ce876c..512ff3bc56 100644
--- a/scene/resources/shape_line_2d.cpp
+++ b/scene/resources/shape_line_2d.cpp
@@ -95,8 +95,8 @@ void LineShape2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::REAL, "d"), "set_d", "get_d");
}
-LineShape2D::LineShape2D()
- : Shape2D(Physics2DServer::get_singleton()->line_shape_create()) {
+LineShape2D::LineShape2D() :
+ Shape2D(Physics2DServer::get_singleton()->line_shape_create()) {
normal = Vector2(0, -1);
d = 0;
diff --git a/scene/resources/sphere_shape.cpp b/scene/resources/sphere_shape.cpp
index 00203c2b4b..042988dcd3 100644
--- a/scene/resources/sphere_shape.cpp
+++ b/scene/resources/sphere_shape.cpp
@@ -80,8 +80,8 @@ void SphereShape::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_radius", "get_radius");
}
-SphereShape::SphereShape()
- : Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_SPHERE)) {
+SphereShape::SphereShape() :
+ Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_SPHERE)) {
set_radius(1.0);
}
diff --git a/scene/resources/tile_set.h b/scene/resources/tile_set.h
index 18b62c778d..4d2b02f54b 100644
--- a/scene/resources/tile_set.h
+++ b/scene/resources/tile_set.h
@@ -81,8 +81,9 @@ public:
Map<Vector2, int> priority_map;
// Default size to prevent invalid value
- explicit AutotileData()
- : size(64, 64), icon_coord(0, 0) {
+ explicit AutotileData() :
+ size(64, 64),
+ icon_coord(0, 0) {
bitmask_mode = BITMASK_2X2;
}
};
@@ -106,8 +107,9 @@ private:
AutotileData autotile_data;
// Default modulate for back-compat
- explicit TileData()
- : modulate(1, 1, 1), is_autotile(false) {}
+ explicit TileData() :
+ modulate(1, 1, 1),
+ is_autotile(false) {}
};
Map<int, TileData> tile_map;
diff --git a/servers/audio/effects/audio_effect_eq.h b/servers/audio/effects/audio_effect_eq.h
index 440f46c0c2..5d0c3d9729 100644
--- a/servers/audio/effects/audio_effect_eq.h
+++ b/servers/audio/effects/audio_effect_eq.h
@@ -76,22 +76,22 @@ public:
class AudioEffectEQ6 : public AudioEffectEQ {
GDCLASS(AudioEffectEQ6, AudioEffectEQ)
public:
- AudioEffectEQ6()
- : AudioEffectEQ(EQ::PRESET_6_BANDS) {}
+ AudioEffectEQ6() :
+ AudioEffectEQ(EQ::PRESET_6_BANDS) {}
};
class AudioEffectEQ10 : public AudioEffectEQ {
GDCLASS(AudioEffectEQ10, AudioEffectEQ)
public:
- AudioEffectEQ10()
- : AudioEffectEQ(EQ::PRESET_10_BANDS) {}
+ AudioEffectEQ10() :
+ AudioEffectEQ(EQ::PRESET_10_BANDS) {}
};
class AudioEffectEQ21 : public AudioEffectEQ {
GDCLASS(AudioEffectEQ21, AudioEffectEQ)
public:
- AudioEffectEQ21()
- : AudioEffectEQ(EQ::PRESET_21_BANDS) {}
+ AudioEffectEQ21() :
+ AudioEffectEQ(EQ::PRESET_21_BANDS) {}
};
#endif // AUDIOEFFECTEQ_H
diff --git a/servers/audio/effects/audio_effect_filter.h b/servers/audio/effects/audio_effect_filter.h
index 903977cb97..7fb5ba4c83 100644
--- a/servers/audio/effects/audio_effect_filter.h
+++ b/servers/audio/effects/audio_effect_filter.h
@@ -96,50 +96,50 @@ VARIANT_ENUM_CAST(AudioEffectFilter::FilterDB)
class AudioEffectLowPassFilter : public AudioEffectFilter {
GDCLASS(AudioEffectLowPassFilter, AudioEffectFilter)
public:
- AudioEffectLowPassFilter()
- : AudioEffectFilter(AudioFilterSW::LOWPASS) {}
+ AudioEffectLowPassFilter() :
+ AudioEffectFilter(AudioFilterSW::LOWPASS) {}
};
class AudioEffectHighPassFilter : public AudioEffectFilter {
GDCLASS(AudioEffectHighPassFilter, AudioEffectFilter)
public:
- AudioEffectHighPassFilter()
- : AudioEffectFilter(AudioFilterSW::HIGHPASS) {}
+ AudioEffectHighPassFilter() :
+ AudioEffectFilter(AudioFilterSW::HIGHPASS) {}
};
class AudioEffectBandPassFilter : public AudioEffectFilter {
GDCLASS(AudioEffectBandPassFilter, AudioEffectFilter)
public:
- AudioEffectBandPassFilter()
- : AudioEffectFilter(AudioFilterSW::BANDPASS) {}
+ AudioEffectBandPassFilter() :
+ AudioEffectFilter(AudioFilterSW::BANDPASS) {}
};
class AudioEffectNotchFilter : public AudioEffectFilter {
GDCLASS(AudioEffectNotchFilter, AudioEffectFilter)
public:
- AudioEffectNotchFilter()
- : AudioEffectFilter(AudioFilterSW::NOTCH) {}
+ AudioEffectNotchFilter() :
+ AudioEffectFilter(AudioFilterSW::NOTCH) {}
};
class AudioEffectBandLimitFilter : public AudioEffectFilter {
GDCLASS(AudioEffectBandLimitFilter, AudioEffectFilter)
public:
- AudioEffectBandLimitFilter()
- : AudioEffectFilter(AudioFilterSW::BANDLIMIT) {}
+ AudioEffectBandLimitFilter() :
+ AudioEffectFilter(AudioFilterSW::BANDLIMIT) {}
};
class AudioEffectLowShelfFilter : public AudioEffectFilter {
GDCLASS(AudioEffectLowShelfFilter, AudioEffectFilter)
public:
- AudioEffectLowShelfFilter()
- : AudioEffectFilter(AudioFilterSW::LOWSHELF) {}
+ AudioEffectLowShelfFilter() :
+ AudioEffectFilter(AudioFilterSW::LOWSHELF) {}
};
class AudioEffectHighShelfFilter : public AudioEffectFilter {
GDCLASS(AudioEffectHighShelfFilter, AudioEffectFilter)
public:
- AudioEffectHighShelfFilter()
- : AudioEffectFilter(AudioFilterSW::HIGHSHELF) {}
+ AudioEffectHighShelfFilter() :
+ AudioEffectFilter(AudioFilterSW::HIGHSHELF) {}
};
#endif // AUDIOEFFECTFILTER_H
diff --git a/servers/audio/reverb_sw.cpp b/servers/audio/reverb_sw.cpp
index 96d2ad848b..e2bb04c213 100644
--- a/servers/audio/reverb_sw.cpp
+++ b/servers/audio/reverb_sw.cpp
@@ -252,15 +252,13 @@ static ReverbParamsSW *reverb_param_modes[] = {
bool ReverbSW::process(int *p_input, int *p_output, int p_frames, int p_stereo_stride) {
+ // p_input must point to a non-looping buffer.
+ // BOTH p_input and p_output must be touched (use ClearModuleBuffer).
+
if (!reverb_buffer)
return false;
-//
-// p_input must point to a non-looping buffer.
-// BOTH p_input and p_output must be touched (use ClearModuleBuffer).
-
// LOCAL MACROS
-
#undef LM_SETSRCOFFSET
#define LM_SETSRCOFFSET(x) \
(x) = current_params->x + Offset; \
diff --git a/servers/physics/area_sw.cpp b/servers/physics/area_sw.cpp
index 387230a478..9615708f1d 100644
--- a/servers/physics/area_sw.cpp
+++ b/servers/physics/area_sw.cpp
@@ -237,8 +237,10 @@ void AreaSW::call_queries() {
//get_space()->area_remove_from_monitor_query_list(&monitor_query_list);
}
-AreaSW::AreaSW()
- : CollisionObjectSW(TYPE_AREA), monitor_query_list(this), moved_list(this) {
+AreaSW::AreaSW() :
+ CollisionObjectSW(TYPE_AREA),
+ monitor_query_list(this),
+ moved_list(this) {
_set_static(true); //areas are never active
space_override_mode = PhysicsServer::AREA_SPACE_OVERRIDE_DISABLED;
diff --git a/servers/physics/body_pair_sw.cpp b/servers/physics/body_pair_sw.cpp
index ef54eb58cf..80e0ad1b07 100644
--- a/servers/physics/body_pair_sw.cpp
+++ b/servers/physics/body_pair_sw.cpp
@@ -464,8 +464,8 @@ void BodyPairSW::solve(real_t p_step) {
}
}
-BodyPairSW::BodyPairSW(BodySW *p_A, int p_shape_A, BodySW *p_B, int p_shape_B)
- : ConstraintSW(_arr, 2) {
+BodyPairSW::BodyPairSW(BodySW *p_A, int p_shape_A, BodySW *p_B, int p_shape_B) :
+ ConstraintSW(_arr, 2) {
A = p_A;
B = p_B;
diff --git a/servers/physics/body_sw.cpp b/servers/physics/body_sw.cpp
index f8cd6ca858..5057c6ab9d 100644
--- a/servers/physics/body_sw.cpp
+++ b/servers/physics/body_sw.cpp
@@ -740,8 +740,11 @@ void BodySW::set_kinematic_margin(real_t p_margin) {
kinematic_safe_margin = p_margin;
}
-BodySW::BodySW()
- : CollisionObjectSW(TYPE_BODY), active_list(this), inertia_update_list(this), direct_state_query_list(this) {
+BodySW::BodySW() :
+ CollisionObjectSW(TYPE_BODY),
+ active_list(this),
+ inertia_update_list(this),
+ direct_state_query_list(this) {
mode = PhysicsServer::BODY_MODE_RIGID;
active = true;
diff --git a/servers/physics/collision_object_sw.cpp b/servers/physics/collision_object_sw.cpp
index 126f8141ff..ef7cd0780f 100644
--- a/servers/physics/collision_object_sw.cpp
+++ b/servers/physics/collision_object_sw.cpp
@@ -217,8 +217,8 @@ void CollisionObjectSW::_shape_changed() {
_shapes_changed();
}
-CollisionObjectSW::CollisionObjectSW(Type p_type)
- : pending_shape_update_list(this) {
+CollisionObjectSW::CollisionObjectSW(Type p_type) :
+ pending_shape_update_list(this) {
_static = true;
type = p_type;
diff --git a/servers/physics/collision_solver_sat.cpp b/servers/physics/collision_solver_sat.cpp
index a044df7f31..f56d311a59 100644
--- a/servers/physics/collision_solver_sat.cpp
+++ b/servers/physics/collision_solver_sat.cpp
@@ -255,7 +255,8 @@ static void _generate_contacts_from_supports(const Vector3 *p_points_A, int p_po
_generate_contacts_face_face,
},
{
- 0, 0,
+ 0,
+ 0,
_generate_contacts_face_face,
}
};
diff --git a/servers/physics/joints/cone_twist_joint_sw.cpp b/servers/physics/joints/cone_twist_joint_sw.cpp
index 3c900d4fbe..617ce125b3 100644
--- a/servers/physics/joints/cone_twist_joint_sw.cpp
+++ b/servers/physics/joints/cone_twist_joint_sw.cpp
@@ -85,8 +85,8 @@ static _FORCE_INLINE_ real_t atan2fast(real_t y, real_t x) {
return (y < 0.0f) ? -angle : angle;
}
-ConeTwistJointSW::ConeTwistJointSW(BodySW *rbA, BodySW *rbB, const Transform &rbAFrame, const Transform &rbBFrame)
- : JointSW(_arr, 2) {
+ConeTwistJointSW::ConeTwistJointSW(BodySW *rbA, BodySW *rbB, const Transform &rbAFrame, const Transform &rbBFrame) :
+ JointSW(_arr, 2) {
A = rbA;
B = rbB;
diff --git a/servers/physics/joints/generic_6dof_joint_sw.cpp b/servers/physics/joints/generic_6dof_joint_sw.cpp
index 1e323be36c..b8234be4d9 100644
--- a/servers/physics/joints/generic_6dof_joint_sw.cpp
+++ b/servers/physics/joints/generic_6dof_joint_sw.cpp
@@ -209,9 +209,11 @@ real_t G6DOFTranslationalLimitMotorSW::solveLinearAxis(
//////////////////////////// G6DOFTranslationalLimitMotorSW ////////////////////////////////////
-Generic6DOFJointSW::Generic6DOFJointSW(BodySW *rbA, BodySW *rbB, const Transform &frameInA, const Transform &frameInB, bool useLinearReferenceFrameA)
- : JointSW(_arr, 2), m_frameInA(frameInA), m_frameInB(frameInB),
- m_useLinearReferenceFrameA(useLinearReferenceFrameA) {
+Generic6DOFJointSW::Generic6DOFJointSW(BodySW *rbA, BodySW *rbB, const Transform &frameInA, const Transform &frameInB, bool useLinearReferenceFrameA) :
+ JointSW(_arr, 2),
+ m_frameInA(frameInA),
+ m_frameInB(frameInB),
+ m_useLinearReferenceFrameA(useLinearReferenceFrameA) {
A = rbA;
B = rbB;
A->add_constraint(this, 0);
diff --git a/servers/physics/joints/hinge_joint_sw.cpp b/servers/physics/joints/hinge_joint_sw.cpp
index fe20a55b60..2edccc26c2 100644
--- a/servers/physics/joints/hinge_joint_sw.cpp
+++ b/servers/physics/joints/hinge_joint_sw.cpp
@@ -68,8 +68,8 @@ static void plane_space(const Vector3 &n, Vector3 &p, Vector3 &q) {
}
}
-HingeJointSW::HingeJointSW(BodySW *rbA, BodySW *rbB, const Transform &frameA, const Transform &frameB)
- : JointSW(_arr, 2) {
+HingeJointSW::HingeJointSW(BodySW *rbA, BodySW *rbB, const Transform &frameA, const Transform &frameB) :
+ JointSW(_arr, 2) {
A = rbA;
B = rbB;
@@ -101,8 +101,8 @@ HingeJointSW::HingeJointSW(BodySW *rbA, BodySW *rbB, const Transform &frameA, co
}
HingeJointSW::HingeJointSW(BodySW *rbA, BodySW *rbB, const Vector3 &pivotInA, const Vector3 &pivotInB,
- const Vector3 &axisInA, const Vector3 &axisInB)
- : JointSW(_arr, 2) {
+ const Vector3 &axisInA, const Vector3 &axisInB) :
+ JointSW(_arr, 2) {
A = rbA;
B = rbB;
diff --git a/servers/physics/joints/jacobian_entry_sw.h b/servers/physics/joints/jacobian_entry_sw.h
index 79ce0e6157..7aeb06ddd8 100644
--- a/servers/physics/joints/jacobian_entry_sw.h
+++ b/servers/physics/joints/jacobian_entry_sw.h
@@ -64,8 +64,8 @@ public:
const Vector3 &inertiaInvA,
const real_t massInvA,
const Vector3 &inertiaInvB,
- const real_t massInvB)
- : m_linearJointAxis(jointAxis) {
+ const real_t massInvB) :
+ m_linearJointAxis(jointAxis) {
m_aJ = world2A.xform(rel_pos1.cross(m_linearJointAxis));
m_bJ = world2B.xform(rel_pos2.cross(-m_linearJointAxis));
m_0MinvJt = inertiaInvA * m_aJ;
@@ -80,8 +80,8 @@ public:
const Basis &world2A,
const Basis &world2B,
const Vector3 &inertiaInvA,
- const Vector3 &inertiaInvB)
- : m_linearJointAxis(Vector3(real_t(0.), real_t(0.), real_t(0.))) {
+ const Vector3 &inertiaInvB) :
+ m_linearJointAxis(Vector3(real_t(0.), real_t(0.), real_t(0.))) {
m_aJ = world2A.xform(jointAxis);
m_bJ = world2B.xform(-jointAxis);
m_0MinvJt = inertiaInvA * m_aJ;
@@ -95,8 +95,10 @@ public:
JacobianEntrySW(const Vector3 &axisInA,
const Vector3 &axisInB,
const Vector3 &inertiaInvA,
- const Vector3 &inertiaInvB)
- : m_linearJointAxis(Vector3(real_t(0.), real_t(0.), real_t(0.))), m_aJ(axisInA), m_bJ(-axisInB) {
+ const Vector3 &inertiaInvB) :
+ m_linearJointAxis(Vector3(real_t(0.), real_t(0.), real_t(0.))),
+ m_aJ(axisInA),
+ m_bJ(-axisInB) {
m_0MinvJt = inertiaInvA * m_aJ;
m_1MinvJt = inertiaInvB * m_bJ;
m_Adiag = m_0MinvJt.dot(m_aJ) + m_1MinvJt.dot(m_bJ);
@@ -110,8 +112,8 @@ public:
const Vector3 &rel_pos1, const Vector3 &rel_pos2,
const Vector3 &jointAxis,
const Vector3 &inertiaInvA,
- const real_t massInvA)
- : m_linearJointAxis(jointAxis) {
+ const real_t massInvA) :
+ m_linearJointAxis(jointAxis) {
m_aJ = world2A.xform(rel_pos1.cross(jointAxis));
m_bJ = world2A.xform(rel_pos2.cross(-jointAxis));
m_0MinvJt = inertiaInvA * m_aJ;
diff --git a/servers/physics/joints/pin_joint_sw.cpp b/servers/physics/joints/pin_joint_sw.cpp
index 779e086858..ab2ab2299a 100644
--- a/servers/physics/joints/pin_joint_sw.cpp
+++ b/servers/physics/joints/pin_joint_sw.cpp
@@ -146,8 +146,8 @@ real_t PinJointSW::get_param(PhysicsServer::PinJointParam p_param) const {
return 0;
}
-PinJointSW::PinJointSW(BodySW *p_body_a, const Vector3 &p_pos_a, BodySW *p_body_b, const Vector3 &p_pos_b)
- : JointSW(_arr, 2) {
+PinJointSW::PinJointSW(BodySW *p_body_a, const Vector3 &p_pos_a, BodySW *p_body_b, const Vector3 &p_pos_b) :
+ JointSW(_arr, 2) {
A = p_body_a;
B = p_body_b;
diff --git a/servers/physics/joints/slider_joint_sw.cpp b/servers/physics/joints/slider_joint_sw.cpp
index 66585f2605..7777de0324 100644
--- a/servers/physics/joints/slider_joint_sw.cpp
+++ b/servers/physics/joints/slider_joint_sw.cpp
@@ -112,8 +112,10 @@ void SliderJointSW::initParams() {
//-----------------------------------------------------------------------------
-SliderJointSW::SliderJointSW(BodySW *rbA, BodySW *rbB, const Transform &frameInA, const Transform &frameInB)
- : JointSW(_arr, 2), m_frameInA(frameInA), m_frameInB(frameInB) {
+SliderJointSW::SliderJointSW(BodySW *rbA, BodySW *rbB, const Transform &frameInA, const Transform &frameInB) :
+ JointSW(_arr, 2),
+ m_frameInA(frameInA),
+ m_frameInB(frameInB) {
A = rbA;
B = rbB;
diff --git a/servers/physics/joints_sw.h b/servers/physics/joints_sw.h
index b15ae08049..29581c7337 100644
--- a/servers/physics/joints_sw.h
+++ b/servers/physics/joints_sw.h
@@ -37,8 +37,8 @@ class JointSW : public ConstraintSW {
public:
virtual PhysicsServer::JointType get_type() const = 0;
- _FORCE_INLINE_ JointSW(BodySW **p_body_ptr = NULL, int p_body_count = 0)
- : ConstraintSW(p_body_ptr, p_body_count) {
+ _FORCE_INLINE_ JointSW(BodySW **p_body_ptr = NULL, int p_body_count = 0) :
+ ConstraintSW(p_body_ptr, p_body_count) {
}
};
diff --git a/servers/physics_2d/area_2d_sw.cpp b/servers/physics_2d/area_2d_sw.cpp
index 6c0bc2c186..d73619ba13 100644
--- a/servers/physics_2d/area_2d_sw.cpp
+++ b/servers/physics_2d/area_2d_sw.cpp
@@ -238,8 +238,10 @@ void Area2DSW::call_queries() {
//get_space()->area_remove_from_monitor_query_list(&monitor_query_list);
}
-Area2DSW::Area2DSW()
- : CollisionObject2DSW(TYPE_AREA), monitor_query_list(this), moved_list(this) {
+Area2DSW::Area2DSW() :
+ CollisionObject2DSW(TYPE_AREA),
+ monitor_query_list(this),
+ moved_list(this) {
_set_static(true); //areas are not active by default
space_override_mode = Physics2DServer::AREA_SPACE_OVERRIDE_DISABLED;
diff --git a/servers/physics_2d/body_2d_sw.cpp b/servers/physics_2d/body_2d_sw.cpp
index eb5fb5a729..2bdde244df 100644
--- a/servers/physics_2d/body_2d_sw.cpp
+++ b/servers/physics_2d/body_2d_sw.cpp
@@ -650,8 +650,11 @@ void Body2DSW::set_force_integration_callback(ObjectID p_id, const StringName &p
}
}
-Body2DSW::Body2DSW()
- : CollisionObject2DSW(TYPE_BODY), active_list(this), inertia_update_list(this), direct_state_query_list(this) {
+Body2DSW::Body2DSW() :
+ CollisionObject2DSW(TYPE_BODY),
+ active_list(this),
+ inertia_update_list(this),
+ direct_state_query_list(this) {
mode = Physics2DServer::BODY_MODE_RIGID;
active = true;
diff --git a/servers/physics_2d/body_pair_2d_sw.cpp b/servers/physics_2d/body_pair_2d_sw.cpp
index 828b90e5d0..b106b37db0 100644
--- a/servers/physics_2d/body_pair_2d_sw.cpp
+++ b/servers/physics_2d/body_pair_2d_sw.cpp
@@ -417,7 +417,7 @@ bool BodyPair2DSW::setup(real_t p_step) {
c.bias = -bias * inv_dt * MIN(0.0f, -depth + max_penetration);
c.depth = depth;
-//c.acc_bias_impulse=0;
+ //c.acc_bias_impulse=0;
#ifdef ACCUMULATE_IMPULSES
{
@@ -500,8 +500,8 @@ void BodyPair2DSW::solve(real_t p_step) {
}
}
-BodyPair2DSW::BodyPair2DSW(Body2DSW *p_A, int p_shape_A, Body2DSW *p_B, int p_shape_B)
- : Constraint2DSW(_arr, 2) {
+BodyPair2DSW::BodyPair2DSW(Body2DSW *p_A, int p_shape_A, Body2DSW *p_B, int p_shape_B) :
+ Constraint2DSW(_arr, 2) {
A = p_A;
B = p_B;
diff --git a/servers/physics_2d/joints_2d_sw.cpp b/servers/physics_2d/joints_2d_sw.cpp
index 897e145a3e..caeb62d74f 100644
--- a/servers/physics_2d/joints_2d_sw.cpp
+++ b/servers/physics_2d/joints_2d_sw.cpp
@@ -178,8 +178,8 @@ real_t PinJoint2DSW::get_param(Physics2DServer::PinJointParam p_param) const {
ERR_FAIL_V(0);
}
-PinJoint2DSW::PinJoint2DSW(const Vector2 &p_pos, Body2DSW *p_body_a, Body2DSW *p_body_b)
- : Joint2DSW(_arr, p_body_b ? 2 : 1) {
+PinJoint2DSW::PinJoint2DSW(const Vector2 &p_pos, Body2DSW *p_body_a, Body2DSW *p_body_b) :
+ Joint2DSW(_arr, p_body_b ? 2 : 1) {
A = p_body_a;
B = p_body_b;
@@ -323,8 +323,8 @@ void GrooveJoint2DSW::solve(real_t p_step) {
B->apply_impulse(rB, j);
}
-GrooveJoint2DSW::GrooveJoint2DSW(const Vector2 &p_a_groove1, const Vector2 &p_a_groove2, const Vector2 &p_b_anchor, Body2DSW *p_body_a, Body2DSW *p_body_b)
- : Joint2DSW(_arr, 2) {
+GrooveJoint2DSW::GrooveJoint2DSW(const Vector2 &p_a_groove1, const Vector2 &p_a_groove2, const Vector2 &p_b_anchor, Body2DSW *p_body_a, Body2DSW *p_body_b) :
+ Joint2DSW(_arr, 2) {
A = p_body_a;
B = p_body_b;
@@ -432,8 +432,8 @@ real_t DampedSpringJoint2DSW::get_param(Physics2DServer::DampedStringParam p_par
ERR_FAIL_V(0);
}
-DampedSpringJoint2DSW::DampedSpringJoint2DSW(const Vector2 &p_anchor_a, const Vector2 &p_anchor_b, Body2DSW *p_body_a, Body2DSW *p_body_b)
- : Joint2DSW(_arr, 2) {
+DampedSpringJoint2DSW::DampedSpringJoint2DSW(const Vector2 &p_anchor_a, const Vector2 &p_anchor_b, Body2DSW *p_body_a, Body2DSW *p_body_b) :
+ Joint2DSW(_arr, 2) {
A = p_body_a;
B = p_body_b;
diff --git a/servers/physics_2d/joints_2d_sw.h b/servers/physics_2d/joints_2d_sw.h
index 11cb41d9d1..0e5e8012b6 100644
--- a/servers/physics_2d/joints_2d_sw.h
+++ b/servers/physics_2d/joints_2d_sw.h
@@ -50,8 +50,8 @@ public:
_FORCE_INLINE_ real_t get_max_bias() const { return max_bias; }
virtual Physics2DServer::JointType get_type() const = 0;
- Joint2DSW(Body2DSW **p_body_ptr = NULL, int p_body_count = 0)
- : Constraint2DSW(p_body_ptr, p_body_count) {
+ Joint2DSW(Body2DSW **p_body_ptr = NULL, int p_body_count = 0) :
+ Constraint2DSW(p_body_ptr, p_body_count) {
bias = 0;
max_force = max_bias = 3.40282e+38;
};
diff --git a/servers/physics_2d/physics_2d_server_wrap_mt.cpp b/servers/physics_2d/physics_2d_server_wrap_mt.cpp
index f92ed18de2..0e5bd82599 100644
--- a/servers/physics_2d/physics_2d_server_wrap_mt.cpp
+++ b/servers/physics_2d/physics_2d_server_wrap_mt.cpp
@@ -151,8 +151,8 @@ void Physics2DServerWrapMT::finish() {
memdelete(step_sem);
}
-Physics2DServerWrapMT::Physics2DServerWrapMT(Physics2DServer *p_contained, bool p_create_thread)
- : command_queue(p_create_thread) {
+Physics2DServerWrapMT::Physics2DServerWrapMT(Physics2DServer *p_contained, bool p_create_thread) :
+ command_queue(p_create_thread) {
physics_2d_server = p_contained;
create_thread = p_create_thread;
diff --git a/servers/physics_2d_server.h b/servers/physics_2d_server.h
index d6a988f512..c57503f06e 100644
--- a/servers/physics_2d_server.h
+++ b/servers/physics_2d_server.h
@@ -589,14 +589,17 @@ class Physics2DServerManager {
String name;
CreatePhysics2DServerCallback create_callback;
- ClassInfo()
- : name(""), create_callback(NULL) {}
+ ClassInfo() :
+ name(""),
+ create_callback(NULL) {}
- ClassInfo(String p_name, CreatePhysics2DServerCallback p_create_callback)
- : name(p_name), create_callback(p_create_callback) {}
+ ClassInfo(String p_name, CreatePhysics2DServerCallback p_create_callback) :
+ name(p_name),
+ create_callback(p_create_callback) {}
- ClassInfo(const ClassInfo &p_ci)
- : name(p_ci.name), create_callback(p_ci.create_callback) {}
+ ClassInfo(const ClassInfo &p_ci) :
+ name(p_ci.name),
+ create_callback(p_ci.create_callback) {}
};
static Vector<ClassInfo> physics_2d_servers;
diff --git a/servers/physics_server.h b/servers/physics_server.h
index 9a4155dd8b..4886317224 100644
--- a/servers/physics_server.h
+++ b/servers/physics_server.h
@@ -652,14 +652,17 @@ class PhysicsServerManager {
String name;
CreatePhysicsServerCallback create_callback;
- ClassInfo()
- : name(""), create_callback(NULL) {}
+ ClassInfo() :
+ name(""),
+ create_callback(NULL) {}
- ClassInfo(String p_name, CreatePhysicsServerCallback p_create_callback)
- : name(p_name), create_callback(p_create_callback) {}
+ ClassInfo(String p_name, CreatePhysicsServerCallback p_create_callback) :
+ name(p_name),
+ create_callback(p_create_callback) {}
- ClassInfo(const ClassInfo &p_ci)
- : name(p_ci.name), create_callback(p_ci.create_callback) {}
+ ClassInfo(const ClassInfo &p_ci) :
+ name(p_ci.name),
+ create_callback(p_ci.create_callback) {}
};
static Vector<ClassInfo> physics_servers;
diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h
index 4bb34af241..0ee70878dc 100644
--- a/servers/visual/rasterizer.h
+++ b/servers/visual/rasterizer.h
@@ -116,8 +116,8 @@ public:
virtual void base_changed() = 0;
virtual void base_material_changed() = 0;
- InstanceBase()
- : dependency_item(this) {
+ InstanceBase() :
+ dependency_item(this) {
base_type = VS::INSTANCE_NONE;
cast_shadows = VS::SHADOW_CASTING_SETTING_ON;
diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h
index 91542625e0..9223d81e32 100644
--- a/servers/visual/visual_server_raster.h
+++ b/servers/visual/visual_server_raster.h
@@ -77,8 +77,8 @@ class VisualServerRaster : public VisualServer {
static void _changes_changed() {}
public:
-//if editor is redrawing when it shouldn't, enable this and put a breakpoint in _changes_changed()
-//#define DEBUG_CHANGES
+ //if editor is redrawing when it shouldn't, enable this and put a breakpoint in _changes_changed()
+ //#define DEBUG_CHANGES
#ifdef DEBUG_CHANGES
_FORCE_INLINE_ static void redraw_request() {
@@ -96,7 +96,6 @@ public:
#define DISPLAY_CHANGED \
changes++;
#endif
-// print_line(String("CHANGED: ") + __FUNCTION__);
#define BIND0R(m_r, m_name) \
m_r m_name() { return BINDBASE->m_name(); }
@@ -451,7 +450,7 @@ public:
BIND2R(int, viewport_get_render_info, RID, ViewportRenderInfo)
BIND2(viewport_set_debug_draw, RID, ViewportDebugDraw)
-/* ENVIRONMENT API */
+ /* ENVIRONMENT API */
#undef BINDBASE
//from now on, calls forwarded to this singleton
@@ -481,7 +480,7 @@ public:
BIND6(environment_set_fog_depth, RID, bool, float, float, bool, float)
BIND5(environment_set_fog_height, RID, bool, float, float, float)
-/* SCENARIO API */
+ /* SCENARIO API */
#undef BINDBASE
#define BINDBASE VSG::scene
diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp
index 72fb1df94b..eef4720d22 100644
--- a/servers/visual/visual_server_scene.cpp
+++ b/servers/visual/visual_server_scene.cpp
@@ -1333,9 +1333,7 @@ void VisualServerScene::render_camera(RID p_camera, RID p_scenario, Size2 p_view
p_viewport_size.width / (float)p_viewport_size.height,
camera->znear,
camera->zfar,
- camera->vaspect
-
- );
+ camera->vaspect);
ortho = true;
} break;
case Camera::PERSPECTIVE: {
@@ -1345,9 +1343,7 @@ void VisualServerScene::render_camera(RID p_camera, RID p_scenario, Size2 p_view
p_viewport_size.width / (float)p_viewport_size.height,
camera->znear,
camera->zfar,
- camera->vaspect
-
- );
+ camera->vaspect);
ortho = false;
} break;
@@ -2742,8 +2738,7 @@ void VisualServerScene::render_probes() {
switch (probe->dynamic.updating_stage) {
case GI_UPDATE_STAGE_CHECK: {
- if (_check_gi_probe(instance_probe) || force_lighting) {
-//send to lighting thread
+ if (_check_gi_probe(instance_probe) || force_lighting) { //send to lighting thread
#ifndef NO_THREADS
probe_bake_mutex->lock();
diff --git a/servers/visual/visual_server_scene.h b/servers/visual/visual_server_scene.h
index bc5d266113..9e4701de65 100644
--- a/servers/visual/visual_server_scene.h
+++ b/servers/visual/visual_server_scene.h
@@ -229,8 +229,9 @@ public:
singleton->_instance_queue_update(this, false, true);
}
- Instance()
- : scenario_item(this), update_item(this) {
+ Instance() :
+ scenario_item(this),
+ update_item(this) {
octree_id = 0;
scenario = NULL;
@@ -305,8 +306,8 @@ public:
int render_step;
- InstanceReflectionProbeData()
- : update_list(this) {
+ InstanceReflectionProbeData() :
+ update_list(this) {
reflection_dirty = true;
render_step = -1;
@@ -434,8 +435,8 @@ public:
SelfList<InstanceGIProbeData> update_element;
- InstanceGIProbeData()
- : update_element(this) {
+ InstanceGIProbeData() :
+ update_element(this) {
invalid = true;
base_version = 0;
dynamic.updating_stage = GI_UPDATE_STAGE_CHECK;
diff --git a/servers/visual/visual_server_wrap_mt.cpp b/servers/visual/visual_server_wrap_mt.cpp
index 03c68ab454..b86a0ae3f6 100644
--- a/servers/visual/visual_server_wrap_mt.cpp
+++ b/servers/visual/visual_server_wrap_mt.cpp
@@ -158,8 +158,8 @@ void VisualServerWrapMT::finish() {
canvas_occluder_polygon_free_cached_ids();
}
-VisualServerWrapMT::VisualServerWrapMT(VisualServer *p_contained, bool p_create_thread)
- : command_queue(p_create_thread) {
+VisualServerWrapMT::VisualServerWrapMT(VisualServer *p_contained, bool p_create_thread) :
+ command_queue(p_create_thread) {
visual_server = p_contained;
create_thread = p_create_thread;
diff --git a/servers/visual/visual_server_wrap_mt.h b/servers/visual/visual_server_wrap_mt.h
index 1c3b34d16f..b58b1d917e 100644
--- a/servers/visual/visual_server_wrap_mt.h
+++ b/servers/visual/visual_server_wrap_mt.h
@@ -62,7 +62,7 @@ class VisualServerWrapMT : public VisualServer {
int pool_max_size;
-//#define DEBUG_SYNC
+ //#define DEBUG_SYNC
#ifdef DEBUG_SYNC
#define SYNC_DEBUG print_line("sync on: " + String(__FUNCTION__));