From c14966b882070f4078e26fb0beae11dacabf4810 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Tue, 27 Jun 2017 14:21:00 -0700 Subject: [PATCH] Move spv_instruction_t's into vector No need to incur another copy here. These guys have embedded vectors we'd rather not copy. --- source/validate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/validate.cpp b/source/validate.cpp index cf86478..ad0fbb9 100644 --- a/source/validate.cpp +++ b/source/validate.cpp @@ -328,7 +328,7 @@ spv_result_t ValidateBinaryUsingContextAndValidationState( spv_instruction_t inst; spvInstructionCopy(&binary->code[index], static_cast(opcode), wordCount, endian, &inst); - instructions.push_back(inst); + instructions.emplace_back(std::move(inst)); index += wordCount; } -- 2.7.4