mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
clang-format: Enable BreakBeforeTernaryOperators
clang-format keeps breaking the way it handles break *after* ternary operators, so I give up and go with the only style they seem to actually test.
This commit is contained in:
parent
1b65550ec7
commit
87c80f529f
13 changed files with 54 additions and 64 deletions
|
@ -264,8 +264,7 @@ public:
|
|||
}
|
||||
|
||||
int32_t get_sign() const {
|
||||
return ((int64_t)high < 0) ? -1 : (high || low) ? 1 :
|
||||
0;
|
||||
return ((int64_t)high < 0) ? -1 : ((high || low) ? 1 : 0);
|
||||
}
|
||||
|
||||
bool operator<(const Int128 &b) const {
|
||||
|
@ -791,8 +790,7 @@ int32_t ConvexHullInternal::Rational128::compare(const Rational128 &b) const {
|
|||
int32_t ConvexHullInternal::Rational128::compare(int64_t b) const {
|
||||
if (is_int_64) {
|
||||
int64_t a = sign * (int64_t)numerator.low;
|
||||
return (a > b) ? 1 : (a < b) ? -1 :
|
||||
0;
|
||||
return (a > b) ? 1 : ((a < b) ? -1 : 0);
|
||||
}
|
||||
if (b > 0) {
|
||||
if (sign <= 0) {
|
||||
|
@ -1444,8 +1442,7 @@ void ConvexHullInternal::merge(IntermediateHull &p_h0, IntermediateHull &p_h1) {
|
|||
c1->edges = e;
|
||||
return;
|
||||
} else {
|
||||
int32_t cmp = !min0 ? 1 : !min1 ? -1 :
|
||||
min_cot0.compare(min_cot1);
|
||||
int32_t cmp = !min0 ? 1 : (!min1 ? -1 : min_cot0.compare(min_cot1));
|
||||
#ifdef DEBUG_CONVEX_HULL
|
||||
printf(" -> Result %d\n", cmp);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue