From ef9ee49276fa568e909777b5a30ff254530440b6 Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Wed, 5 Oct 2016 13:01:31 -0400 Subject: [PATCH] Fix compilation on some old C++11 standard libraries. --- spirv_cross.cpp | 4 ++-- spirv_glsl.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spirv_cross.cpp b/spirv_cross.cpp index 69320a18..af348c9c 100644 --- a/spirv_cross.cpp +++ b/spirv_cross.cpp @@ -1106,8 +1106,8 @@ void Compiler::parse(const Instruction &instruction) case OpEntryPoint: { - auto itr = entry_points.emplace(ops[1], SPIREntryPoint(ops[1], static_cast(ops[0]), - extract_string(spirv, instruction.offset + 2))); + auto itr = entry_points.insert(make_pair(ops[1], SPIREntryPoint(ops[1], static_cast(ops[0]), + extract_string(spirv, instruction.offset + 2)))); auto &e = itr.first->second; // Strings need nul-terminator and consume the whole word. diff --git a/spirv_glsl.cpp b/spirv_glsl.cpp index c39d4eff..6056d046 100644 --- a/spirv_glsl.cpp +++ b/spirv_glsl.cpp @@ -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;