Merge pull request #11 from baldurk/size-t-int-warning-fixes
Fix warnings compiling on x64 with size_t to int casts
This commit is contained in:
@@ -1099,9 +1099,9 @@ bool TGlslangToSpvTraverser::visitSwitch(glslang::TVisit /* visit */, glslang::T
|
||||
for (glslang::TIntermSequence::iterator c = sequence.begin(); c != sequence.end(); ++c) {
|
||||
TIntermNode* child = *c;
|
||||
if (child->getAsBranchNode() && child->getAsBranchNode()->getFlowOp() == glslang::EOpDefault)
|
||||
defaultSegment = codeSegments.size();
|
||||
defaultSegment = (int)codeSegments.size();
|
||||
else if (child->getAsBranchNode() && child->getAsBranchNode()->getFlowOp() == glslang::EOpCase) {
|
||||
valueIndexToSegment[caseValues.size()] = codeSegments.size();
|
||||
valueIndexToSegment[caseValues.size()] = (int)codeSegments.size();
|
||||
caseValues.push_back(child->getAsBranchNode()->getExpression()->getAsConstantUnion()->getConstArray()[0].getIConst());
|
||||
} else
|
||||
codeSegments.push_back(child);
|
||||
@@ -1115,7 +1115,7 @@ bool TGlslangToSpvTraverser::visitSwitch(glslang::TVisit /* visit */, glslang::T
|
||||
|
||||
// make the switch statement
|
||||
std::vector<spv::Block*> segmentBlocks; // returned, as the blocks allocated in the call
|
||||
builder.makeSwitch(selector, codeSegments.size(), caseValues, valueIndexToSegment, defaultSegment, segmentBlocks);
|
||||
builder.makeSwitch(selector, (int)codeSegments.size(), caseValues, valueIndexToSegment, defaultSegment, segmentBlocks);
|
||||
|
||||
// emit all the code in the segments
|
||||
breakForLoop.push(false);
|
||||
|
||||
Reference in New Issue
Block a user