You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Style: prevent bogus macro formatting by clang-format
Also prevent formatting of thirdparty snippet
This commit is contained in:
@@ -14,4 +14,4 @@ are known and expected due to important refactoring work, so no need to report t
|
|||||||
|
|
||||||
|
|
||||||
**Link to minimal example project:**
|
**Link to minimal example project:**
|
||||||
<!-- Optional but very welcome. You can drag and drop a zip archive to upload it. -->:
|
<!-- Optional but very welcome. You can drag and drop a zip archive to upload it. -->
|
||||||
|
|||||||
@@ -40,6 +40,9 @@ Variant fieldwise_assign(const Variant& p_target, const Variant& p_source, const
|
|||||||
|
|
||||||
switch (p_source.get_type()) {
|
switch (p_source.get_type()) {
|
||||||
|
|
||||||
|
/* clang-format makes a mess of this macro usage */
|
||||||
|
/* clang-format off */
|
||||||
|
|
||||||
case Variant::VECTOR2: {
|
case Variant::VECTOR2: {
|
||||||
|
|
||||||
SETUP_TYPE(Vector2)
|
SETUP_TYPE(Vector2)
|
||||||
@@ -165,6 +168,8 @@ Variant fieldwise_assign(const Variant& p_target, const Variant& p_source, const
|
|||||||
default: {
|
default: {
|
||||||
ERR_FAIL_V(p_target);
|
ERR_FAIL_V(p_target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* clang-format on */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,9 @@
|
|||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
#include "gjk_epa.h"
|
#include "gjk_epa.h"
|
||||||
|
|
||||||
|
/* Disabling formatting for thirdparty code snippet */
|
||||||
|
/* clang-format off */
|
||||||
|
|
||||||
/*************** Bullet's GJK-EPA2 IMPLEMENTATION *******************/
|
/*************** Bullet's GJK-EPA2 IMPLEMENTATION *******************/
|
||||||
|
|
||||||
// Config
|
// Config
|
||||||
@@ -879,8 +882,7 @@ bool Penetration( const ShapeSW* shape0,
|
|||||||
|
|
||||||
} // end of namespace
|
} // end of namespace
|
||||||
|
|
||||||
|
/* clang-format on */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool gjk_epa_calculate_distance(const ShapeSW *p_shape_A, const Transform& p_transform_A, const ShapeSW *p_shape_B, const Transform& p_transform_B, Vector3& r_result_A, Vector3& r_result_B) {
|
bool gjk_epa_calculate_distance(const ShapeSW *p_shape_A, const Transform& p_transform_A, const ShapeSW *p_shape_B, const Transform& p_transform_B, Vector3& r_result_A, Vector3& r_result_B) {
|
||||||
@@ -915,4 +917,3 @@ bool gjk_epa_calculate_penetration(const ShapeSW *p_shape_A, const Transform& p_
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user