Skip to content

Commit

Permalink
Fix warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
linuscu committed Oct 1, 2024
1 parent 85ed640 commit 70e30db
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/nodegraph/source/common/core/NodeGraphBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,35 +330,35 @@ namespace l::nodegraph {
}

bool NodeGraphOp::IsDataConstant(int8_t channel) {
if (channel < mDefaultInData.size()) {
if (static_cast<size_t>(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<size_t>(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<size_t>(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<size_t>(inputChannel) < mDefaultInStrings.size()) {
return mDefaultInStrings[inputChannel];
}
return "";
}

std::string_view NodeGraphOp::GetOutputName(int8_t outputChannel) {
if (outputChannel < mDefaultOutStrings.size()) {
if (static_cast<size_t>(outputChannel) < mDefaultOutStrings.size()) {
return mDefaultOutStrings[outputChannel];
}
return "";
Expand All @@ -369,7 +369,7 @@ namespace l::nodegraph {
}

float NodeGraphOp::GetDefaultData(int8_t inputChannel) {
if (inputChannel < mDefaultInData.size()) {
if (static_cast<size_t>(inputChannel) < mDefaultInData.size()) {
return std::get<0>(mDefaultInData.at(inputChannel));
}
return 0.0f;
Expand Down

0 comments on commit 70e30db

Please sign in to comment.