From 64183b1e4c32b83433ea480043445c672870b079 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 1 Sep 2017 17:09:34 +0700 Subject: Make Token a simple aggregate --- src/command_manager.hh | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'src/command_manager.hh') diff --git a/src/command_manager.hh b/src/command_manager.hh index 1337a190..eb1fadb3 100644 --- a/src/command_manager.hh +++ b/src/command_manager.hh @@ -53,23 +53,12 @@ struct Token ArgExpand, CommandSeparator }; - Token() : m_type(Type::Raw) {} - Token(Type type, ByteCount b, ByteCount e, DisplayCoord coord, String 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; } - ByteCount end() const { return m_end; } - DisplayCoord coord() const { return m_coord; } - const String& content() const { return m_content; } - -private: - Type m_type; - ByteCount m_begin; - ByteCount m_end; - DisplayCoord m_coord; - String m_content; + Type type; + ByteCount begin; + ByteCount end; + DisplayCoord coord; + String content; }; using TokenList = Vector; -- cgit v1.2.3