summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYunlian Jiang <yunlian@google.com>2015-05-27 15:22:32 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-05-28 19:08:28 +0000
commitcef5cd6acf26b518523511f6d633a730baef4d7e (patch)
tree3470883f96405d90c898a32dddfdcb1e4376e5e0
parent46bd4e20c20d6cb1a2f18d39237b9345d576669e (diff)
update_engine: fix -Wpessimizing-move warning
BUG=chromium:492864 TEST=FEATURES="test" emerge-falco update_engine Change-Id: Ia82d9ba6f65a6ad01e558d914dd2532968fcb97a Reviewed-on: https://chromium-review.googlesource.com/273575 Reviewed-by: Alex Vakulenko <avakulenko@chromium.org> Commit-Queue: Yunlian Jiang <yunlian@chromium.org> Tested-by: Yunlian Jiang <yunlian@chromium.org>
-rw-r--r--update_manager/boxed_value_unittest.cc2
-rw-r--r--update_manager/evaluation_context-inl.h3
2 files changed, 2 insertions, 3 deletions
diff --git a/update_manager/boxed_value_unittest.cc b/update_manager/boxed_value_unittest.cc
index 62f4bfea..4914a235 100644
--- a/update_manager/boxed_value_unittest.cc
+++ b/update_manager/boxed_value_unittest.cc
@@ -86,7 +86,7 @@ TEST(UmBoxedValueTest, MixedList) {
TEST(UmBoxedValueTest, MixedMap) {
map<int, BoxedValue> m;
- m.emplace(42, std::move(BoxedValue(new const string("Hola mundo!"))));
+ m.emplace(42, BoxedValue(new const string("Hola mundo!")));
auto it = m.find(42);
ASSERT_NE(it, m.end());
diff --git a/update_manager/evaluation_context-inl.h b/update_manager/evaluation_context-inl.h
index 32551384..9dfed388 100644
--- a/update_manager/evaluation_context-inl.h
+++ b/update_manager/evaluation_context-inl.h
@@ -34,8 +34,7 @@ const T* EvaluationContext::GetValue(Variable<T>* var) {
// Cache the value for the next time. The map of CachedValues keeps the
// ownership of the pointer until the map is destroyed.
value_cache_.emplace(
- static_cast<BaseVariable*>(var),
- std::move(BoxedValue(result)));
+ static_cast<BaseVariable*>(var), BoxedValue(result));
return result;
}