ksys/gdt: Silence -Wtautological-compare warning

This commit is contained in:
Léo Lam 2021-03-10 15:42:49 +01:00
parent 819798cac1
commit b15b12e7c4
No known key found for this signature in database
GPG Key ID: 0DF30F9081000741
1 changed files with 5 additions and 1 deletions

View File

@ -460,6 +460,10 @@ void addFlagCopyRecord(sead::ObjArray<TriggerParam::FlagCopyRecord>& records, Fl
}
record->bf.makeAllZero();
}
constexpr bool IsString256ArrayType(FlagType::ValueType type) {
return type == FlagType::String256Array;
}
} // namespace
/**
@ -769,7 +773,7 @@ void TriggerParam::initResetData(sead::Heap* heap) {
mResetEntries[reset_entry_idx].type = TYPE; \
\
/* ??? */ \
if constexpr (TYPE == FlagType::String256Array) \
if constexpr (IsString256ArrayType(TYPE)) \
mResetEntries[reset_entry_idx].index = s16(i); \
else \
mResetEntries[reset_entry_idx].index = i; \