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)); } 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(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(filter)); } void Window::remove_filter(const std::string& id)