summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2011-12-07 18:57:07 +0000
committerMaxime Coste <frrrwww@gmail.com>2011-12-07 18:57:07 +0000
commite77f58c0108c5298581a148d034de9262cb2172f (patch)
tree1725821f1e825382f7a379b2977b037972853ef2 /src
parent2239fb6e4952b9768d4ce155a752719a8a586021 (diff)
better rvalue reference forwarding
Diffstat (limited to 'src')
-rw-r--r--src/idvaluemap.hh2
-rw-r--r--src/window.cc4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/idvaluemap.hh b/src/idvaluemap.hh
index 1396325a..8278b177 100644
--- a/src/idvaluemap.hh
+++ b/src/idvaluemap.hh
@@ -20,7 +20,7 @@ public:
void append(value_type&& value)
{
- m_content.push_back(value);
+ m_content.push_back(std::forward<value_type>(value));
}
iterator find(const _Id& id)
diff --git a/src/window.cc b/src/window.cc
index fc1a6e41..d5c4b666 100644
--- a/src/window.cc
+++ b/src/window.cc
@@ -354,7 +354,7 @@ void Window::add_highlighter(HighlighterAndId&& highlighter)
{
if (m_highlighters.contains(highlighter.first))
throw id_not_unique(highlighter.first);
- m_highlighters.append(highlighter);
+ m_highlighters.append(std::forward<HighlighterAndId>(highlighter));
}
void Window::remove_highlighter(const std::string& id)
@@ -372,7 +372,7 @@ void Window::add_filter(FilterAndId&& filter)
{
if (m_filters.contains(filter.first))
throw id_not_unique(filter.first);
- m_filters.append(filter);
+ m_filters.append(std::forward<FilterAndId>(filter));
}
void Window::remove_filter(const std::string& id)