Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
This commit is contained in:
@@ -34,7 +34,6 @@
|
||||
#include "core/resource.h"
|
||||
|
||||
class Animation : public Resource {
|
||||
|
||||
GDCLASS(Animation, Resource);
|
||||
RES_BASE_EXTENSION("anim");
|
||||
|
||||
@@ -64,7 +63,6 @@ public:
|
||||
|
||||
private:
|
||||
struct Track {
|
||||
|
||||
TrackType type;
|
||||
InterpolationType interpolation;
|
||||
bool loop_wrap;
|
||||
@@ -81,7 +79,6 @@ private:
|
||||
};
|
||||
|
||||
struct Key {
|
||||
|
||||
float transition;
|
||||
float time; // time in secs
|
||||
Key() {
|
||||
@@ -93,12 +90,10 @@ private:
|
||||
// transform key holds either Vector3 or Quaternion
|
||||
template <class T>
|
||||
struct TKey : public Key {
|
||||
|
||||
T value;
|
||||
};
|
||||
|
||||
struct TransformKey {
|
||||
|
||||
Vector3 loc;
|
||||
Quat rot;
|
||||
Vector3 scale;
|
||||
@@ -107,7 +102,6 @@ private:
|
||||
/* TRANSFORM TRACK */
|
||||
|
||||
struct TransformTrack : public Track {
|
||||
|
||||
Vector<TKey<TransformKey>> transforms;
|
||||
|
||||
TransformTrack() { type = TYPE_TRANSFORM; }
|
||||
@@ -116,7 +110,6 @@ private:
|
||||
/* PROPERTY VALUE TRACK */
|
||||
|
||||
struct ValueTrack : public Track {
|
||||
|
||||
UpdateMode update_mode;
|
||||
bool update_on_seek;
|
||||
Vector<TKey<Variant>> values;
|
||||
@@ -130,13 +123,11 @@ private:
|
||||
/* METHOD TRACK */
|
||||
|
||||
struct MethodKey : public Key {
|
||||
|
||||
StringName method;
|
||||
Vector<Variant> params;
|
||||
};
|
||||
|
||||
struct MethodTrack : public Track {
|
||||
|
||||
Vector<MethodKey> methods;
|
||||
MethodTrack() { type = TYPE_METHOD; }
|
||||
};
|
||||
@@ -150,7 +141,6 @@ private:
|
||||
};
|
||||
|
||||
struct BezierTrack : public Track {
|
||||
|
||||
Vector<TKey<BezierKey>> values;
|
||||
|
||||
BezierTrack() {
|
||||
@@ -171,7 +161,6 @@ private:
|
||||
};
|
||||
|
||||
struct AudioTrack : public Track {
|
||||
|
||||
Vector<TKey<AudioKey>> values;
|
||||
|
||||
AudioTrack() {
|
||||
@@ -182,7 +171,6 @@ private:
|
||||
/* AUDIO TRACK */
|
||||
|
||||
struct AnimationTrack : public Track {
|
||||
|
||||
Vector<TKey<StringName>> values;
|
||||
|
||||
AnimationTrack() {
|
||||
@@ -246,25 +234,21 @@ private:
|
||||
}
|
||||
|
||||
Vector<int> _value_track_get_key_indices(int p_track, float p_time, float p_delta) const {
|
||||
|
||||
List<int> idxs;
|
||||
value_track_get_key_indices(p_track, p_time, p_delta, &idxs);
|
||||
Vector<int> idxr;
|
||||
|
||||
for (List<int>::Element *E = idxs.front(); E; E = E->next()) {
|
||||
|
||||
idxr.push_back(E->get());
|
||||
}
|
||||
return idxr;
|
||||
}
|
||||
Vector<int> _method_track_get_key_indices(int p_track, float p_time, float p_delta) const {
|
||||
|
||||
List<int> idxs;
|
||||
method_track_get_key_indices(p_track, p_time, p_delta, &idxs);
|
||||
Vector<int> idxr;
|
||||
|
||||
for (List<int>::Element *E = idxs.front(); E; E = E->next()) {
|
||||
|
||||
idxr.push_back(E->get());
|
||||
}
|
||||
return idxr;
|
||||
|
||||
Reference in New Issue
Block a user