From befbeba512701bbed29dc3cf7e630789d0600822 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Mon, 6 Jul 2015 09:22:09 +0200 Subject: [PATCH] Fix up rvalue references. Avoid a copy of an EVM code in ExtVM. --- TestHelper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TestHelper.cpp b/TestHelper.cpp index b3dee72ec..9a1b16935 100644 --- a/TestHelper.cpp +++ b/TestHelper.cpp @@ -199,10 +199,10 @@ void ImportTest::importState(json_spirit::mObject& _o, State& _state, stateOptio stateOptions.m_bHasCode = true; } - if (code.size()) + if (!code.empty()) { _state.m_cache[address] = Account(balance, Account::ContractConception); - _state.m_cache[address].setCode(code); + _state.m_cache[address].setCode(std::move(code)); } else _state.m_cache[address] = Account(balance, Account::NormalCreation);