From: Chris Forbes Date: Tue, 27 Jun 2017 21:21:00 +0000 (-0700) Subject: Move spv_instruction_t's into vector X-Git-Tag: upstream/2018.6~871 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c14966b882070f4078e26fb0beae11dacabf4810;p=platform%2Fupstream%2FSPIRV-Tools.git Move spv_instruction_t's into vector No need to incur another copy here. These guys have embedded vectors we'd rather not copy. --- 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; }