From ac78cfa11c12cd16b9370d029308cd96b539c37c Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 28 Aug 2015 13:54:12 +0100 Subject: [PATCH] Add missing std::move, avoid a needless string copy --- src/command_manager.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command_manager.cc b/src/command_manager.cc index b0c14a7c..d6b56bc7 100644 --- a/src/command_manager.cc +++ b/src/command_manager.cc @@ -58,7 +58,7 @@ struct Token Token() : m_type(Type::Raw) {} Token(Type type, ByteCount b, ByteCount e, CharCoord coord, String str = "") - : m_type(type), m_begin(b), m_end(e), m_coord(coord), m_content(str) {} + : m_type(type), m_begin(b), m_end(e), m_coord(coord), m_content(std::move(str)) {} Type type() const { return m_type; } ByteCount begin() const { return m_begin; }