summaryrefslogtreecommitdiff
path: root/src/menu.h
diff options
context:
space:
mode:
authorAndrzej Rybczak <electricityispower@gmail.com>2014-11-01 15:41:28 +0100
committerAndrzej Rybczak <electricityispower@gmail.com>2014-11-01 15:41:46 +0100
commitfb9c0ffdf57c8896dbdec265475b3b8ddd9c0cdd (patch)
treee385743558b7d4b2781ca4296bb0f65995589455 /src/menu.h
parent9cbcf61faca58f27de3305d7b5786b40ac5297b1 (diff)
menu: add std::move in a few places
Diffstat (limited to 'src/menu.h')
-rw-r--r--src/menu.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/menu.h b/src/menu.h
index 2321953e..55c11b82 100644
--- a/src/menu.h
+++ b/src/menu.h
@@ -84,7 +84,7 @@ public:
friend class Menu<ItemT>;
BaseIterator m_it;
- explicit ItemIterator(BaseIterator it) : m_it(it) { }
+ explicit ItemIterator(BaseIterator it) : m_it(std::move(it)) { }
// base iterator's value_type doesn't change between const and non-const
// version, so we need to strip const off ValueT too for proper template
@@ -394,7 +394,7 @@ private:
typedef Item element_type;
ItemProxy() { }
- ItemProxy(Item item) : m_ptr(std::make_shared<Item>(item)) { }
+ ItemProxy(Item item) : m_ptr(std::make_shared<Item>(std::move(item))) { }
Item &operator*() const { return *m_ptr; }
Item *operator->() const { return m_ptr.get(); }