From 0a29df1f02069c120b89f7796040c3b4c483433d Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 8 Jan 2018 15:55:35 +0000 Subject: [PATCH] Ditch use of std::initializer_list, it's more pain than it's worth --- renderdoc/driver/shaders/spirv/spirv_editor.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/renderdoc/driver/shaders/spirv/spirv_editor.h b/renderdoc/driver/shaders/spirv/spirv_editor.h index ce901fcbd..0db1b9b19 100644 --- a/renderdoc/driver/shaders/spirv/spirv_editor.h +++ b/renderdoc/driver/shaders/spirv/spirv_editor.h @@ -95,17 +95,17 @@ class SPIRVOperation public: // constructor of a synthetic operation, from an operation & subsequent words, calculates the // length then constructs the first word with opcode + length. - SPIRVOperation(spv::Op op, std::initializer_list data) + SPIRVOperation(spv::Op op, const std::vector &data) { words.push_back(MakeHeader(op, data.size() + 1)); words.insert(words.begin() + 1, data.begin(), data.end()); iter = SPIRVIterator(words, 0); } - SPIRVOperation(spv::Op op, std::vector data) + + SPIRVOperation(const SPIRVOperation &op) { - words.push_back(MakeHeader(op, data.size() + 1)); - words.insert(words.begin() + 1, data.begin(), data.end()); + words = op.words; iter = SPIRVIterator(words, 0); }