diff options
author | Andrzej Rybczak <electricityispower@gmail.com> | 2014-11-01 15:41:28 +0100 |
---|---|---|
committer | Andrzej Rybczak <electricityispower@gmail.com> | 2014-11-01 15:41:46 +0100 |
commit | fb9c0ffdf57c8896dbdec265475b3b8ddd9c0cdd (patch) | |
tree | e385743558b7d4b2781ca4296bb0f65995589455 /src/menu.h | |
parent | 9cbcf61faca58f27de3305d7b5786b40ac5297b1 (diff) |
menu: add std::move in a few places
Diffstat (limited to 'src/menu.h')
-rw-r--r-- | src/menu.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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(); } |