1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-24 07:53:41 +03:00

better rvalue reference forwarding

This commit is contained in:
Maxime Coste 2011-12-07 18:57:07 +00:00
parent 2239fb6e49
commit e77f58c010
2 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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)