Fix compilation on some old C++11 standard libraries.

This commit is contained in:
Corentin Wallez 2016-10-05 13:01:31 -04:00 committed by Corentin Wallez
parent 301e981203
commit ef9ee49276
2 changed files with 3 additions and 3 deletions

View File

@ -1106,8 +1106,8 @@ void Compiler::parse(const Instruction &instruction)
case OpEntryPoint:
{
auto itr = entry_points.emplace(ops[1], SPIREntryPoint(ops[1], static_cast<ExecutionModel>(ops[0]),
extract_string(spirv, instruction.offset + 2)));
auto itr = entry_points.insert(make_pair(ops[1], SPIREntryPoint(ops[1], static_cast<ExecutionModel>(ops[0]),
extract_string(spirv, instruction.offset + 2))));
auto &e = itr.first->second;
// Strings need nul-terminator and consume the whole word.

View File

@ -5354,7 +5354,7 @@ string CompilerGLSL::emit_continue_block(uint32_t continue_block)
for (auto &s : statements)
{
if (!s.empty() && s.back() == ';')
s.pop_back();
s.erase(s.size() - 1, 1);
}
current_continue_block = nullptr;