From 70e30dbd3de9b0c7fe772d2ff3a7b068e944c305 Mon Sep 17 00:00:00 2001 From: lnd3 Date: Tue, 1 Oct 2024 05:59:25 +0200 Subject: [PATCH] Fix warning. --- .../nodegraph/source/common/core/NodeGraphBase.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/nodegraph/source/common/core/NodeGraphBase.cpp b/packages/nodegraph/source/common/core/NodeGraphBase.cpp index 9caac2d..b6ba48d 100644 --- a/packages/nodegraph/source/common/core/NodeGraphBase.cpp +++ b/packages/nodegraph/source/common/core/NodeGraphBase.cpp @@ -330,35 +330,35 @@ namespace l::nodegraph { } bool NodeGraphOp::IsDataConstant(int8_t channel) { - if (channel < mDefaultInData.size()) { + if (static_cast(channel) < mDefaultInData.size()) { return std::get<4>(mDefaultInData.at(channel)); } return false; } bool NodeGraphOp::IsDataVisible(int8_t channel) { - if (channel < mDefaultInData.size()) { + if (static_cast(channel) < mDefaultInData.size()) { return std::get<5>(mDefaultInData.at(channel)); } return false; } bool NodeGraphOp::IsDataEditable(int8_t channel) { - if (channel < mDefaultInData.size()) { + if (static_cast(channel) < mDefaultInData.size()) { return std::get<6>(mDefaultInData.at(channel)); } return false; } std::string_view NodeGraphOp::GetInputName(int8_t inputChannel) { - if (inputChannel < mDefaultInStrings.size()) { + if (static_cast(inputChannel) < mDefaultInStrings.size()) { return mDefaultInStrings[inputChannel]; } return ""; } std::string_view NodeGraphOp::GetOutputName(int8_t outputChannel) { - if (outputChannel < mDefaultOutStrings.size()) { + if (static_cast(outputChannel) < mDefaultOutStrings.size()) { return mDefaultOutStrings[outputChannel]; } return ""; @@ -369,7 +369,7 @@ namespace l::nodegraph { } float NodeGraphOp::GetDefaultData(int8_t inputChannel) { - if (inputChannel < mDefaultInData.size()) { + if (static_cast(inputChannel) < mDefaultInData.size()) { return std::get<0>(mDefaultInData.at(inputChannel)); } return 0.0f;