Ditch use of std::initializer_list, it's more pain than it's worth

This commit is contained in:
baldurk
2018-01-08 15:55:35 +00:00
parent 0f541ea6ee
commit 0a29df1f02
@@ -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<uint32_t> data)
SPIRVOperation(spv::Op op, const std::vector<uint32_t> &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<uint32_t> 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);
}