Fixed various clang-tidy messages.
This commit is contained in:
@@ -13,13 +13,6 @@
|
||||
|
||||
struct AnimNode;
|
||||
|
||||
struct NodeInput {
|
||||
AnimNode* m_node;
|
||||
SocketType m_type = SocketType::SocketTypeUndefined;
|
||||
Socket* m_node_output_socket;
|
||||
std::string m_input_name;
|
||||
};
|
||||
|
||||
enum class AnimNodeEvalState {
|
||||
Undefined,
|
||||
Deactivated,
|
||||
@@ -45,13 +38,13 @@ struct AnimNode {
|
||||
AnimNodeEvalState m_state = AnimNodeEvalState::Undefined;
|
||||
SyncTrack m_sync_track;
|
||||
|
||||
virtual ~AnimNode(){};
|
||||
virtual ~AnimNode() = default;
|
||||
|
||||
virtual bool Init(AnimGraphContext& context) { return true; };
|
||||
|
||||
virtual void MarkActiveInputs(const std::vector<AnimGraphConnection>& inputs) {
|
||||
for (size_t i = 0, n = inputs.size(); i < n; i++) {
|
||||
AnimNode* input_node = inputs[i].m_source_node;
|
||||
for (const auto & input : inputs) {
|
||||
AnimNode* input_node = input.m_source_node;
|
||||
if (input_node != nullptr) {
|
||||
input_node->m_state = AnimNodeEvalState::Activated;
|
||||
}
|
||||
@@ -59,10 +52,10 @@ struct AnimNode {
|
||||
}
|
||||
|
||||
virtual void CalcSyncTrack(const std::vector<AnimGraphConnection>& inputs) {
|
||||
for (size_t i = 0, n = inputs.size(); i < n; i++) {
|
||||
AnimNode* input_node = inputs[i].m_source_node;
|
||||
for (const auto & input : inputs) {
|
||||
AnimNode* input_node = input.m_source_node;
|
||||
if (input_node != nullptr
|
||||
&& inputs[i].m_source_socket.m_type == SocketType::SocketTypeAnimation
|
||||
&& input.m_source_socket.m_type == SocketType::SocketTypeAnimation
|
||||
&& input_node->m_state != AnimNodeEvalState::Deactivated) {
|
||||
m_sync_track = input_node->m_sync_track;
|
||||
return;
|
||||
@@ -101,18 +94,18 @@ struct Blend2Node : public AnimNode {
|
||||
bool m_sync_blend = false;
|
||||
|
||||
virtual void MarkActiveInputs(const std::vector<AnimGraphConnection>& inputs) override {
|
||||
for (size_t i = 0, n = inputs.size(); i < n; i++) {
|
||||
AnimNode* input_node = inputs[i].m_source_node;
|
||||
for (const auto & input : inputs) {
|
||||
AnimNode* input_node = input.m_source_node;
|
||||
if (input_node == nullptr) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (inputs[i].m_target_socket.m_name == "Input0" && *i_blend_weight < 0.999) {
|
||||
if (input.m_target_socket.m_name == "Input0" && *i_blend_weight < 0.999) {
|
||||
input_node->m_state = AnimNodeEvalState::Activated;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (inputs[i].m_target_socket.m_name == "Input1" && *i_blend_weight > 0.001) {
|
||||
if (input.m_target_socket.m_name == "Input1" && *i_blend_weight > 0.001) {
|
||||
input_node->m_state = AnimNodeEvalState::Activated;
|
||||
continue;
|
||||
}
|
||||
@@ -138,7 +131,7 @@ struct NodeDescriptor<Blend2Node> : public NodeDescriptorBase {
|
||||
Socket* weight_input_socket = FindSocket("Weight", m_inputs);
|
||||
assert(weight_input_socket != nullptr);
|
||||
|
||||
if (GetProperty<bool>("Sync") == true) {
|
||||
if (GetProperty<bool>("Sync")) {
|
||||
weight_input_socket->m_flags = SocketFlags::SocketFlagAffectsTime;
|
||||
} else {
|
||||
weight_input_socket->m_flags = SocketFlags::SocketFlagNone;
|
||||
@@ -217,10 +210,10 @@ struct NodeDescriptor<AnimSamplerNode> : public NodeDescriptorBase {
|
||||
struct LockTranslationNode : public AnimNode {
|
||||
AnimData* i_input = nullptr;
|
||||
AnimData* o_output = nullptr;
|
||||
int m_locked_bone_index;
|
||||
bool m_lock_x;
|
||||
bool m_lock_y;
|
||||
bool m_lock_z;
|
||||
int m_locked_bone_index = 0;
|
||||
bool m_lock_x = false;
|
||||
bool m_lock_y = false;
|
||||
bool m_lock_z = false;
|
||||
|
||||
virtual void Evaluate(AnimGraphContext& context) override;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user