зеркало из https://github.com/stride3d/xkslang.git
Fix mismatched integer comparison (size_t/unsigned int vs int)
This commit is contained in:
Родитель
c9e03360e2
Коммит
332b173c82
|
@ -222,7 +222,7 @@ void Builder::postProcess(Instruction& inst)
|
|||
Instruction *idx = module.getInstruction(accessChain->getIdOperand(i));
|
||||
if (type->getOpCode() == OpTypeStruct) {
|
||||
assert(idx->getOpCode() == OpConstant);
|
||||
int c = idx->getImmediateOperand(0);
|
||||
unsigned int c = idx->getImmediateOperand(0);
|
||||
|
||||
const auto function = [&](const std::unique_ptr<Instruction>& decoration) {
|
||||
if (decoration.get()->getOpCode() == OpMemberDecorate &&
|
||||
|
|
|
@ -297,7 +297,7 @@ TVariable::TVariable(const TVariable& copyOf) : TSymbol(copyOf)
|
|||
if (copyOf.getNumExtensions() > 0)
|
||||
setExtensions(copyOf.getNumExtensions(), copyOf.getExtensions());
|
||||
if (copyOf.hasMemberExtensions()) {
|
||||
for (int m = 0; m < copyOf.type.getStruct()->size(); ++m) {
|
||||
for (int m = 0; m < (int)copyOf.type.getStruct()->size(); ++m) {
|
||||
if (copyOf.getNumMemberExtensions(m) > 0)
|
||||
setMemberExtensions(m, copyOf.getNumMemberExtensions(m), copyOf.getMemberExtensions(m));
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче