Add missing std::move, avoid a needless string copy

This commit is contained in:
Maxime Coste 2015-08-28 13:54:12 +01:00
parent 1249df9c76
commit ac78cfa11c

View File

@ -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; }