From 6913c6d965d64481ed09fc06a43154f35e8bd914 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 13 Jan 2020 08:39:02 +0300 Subject: clang-format all the code --- server/common/error.hpp | 6 ++---- server/common/log.hpp | 9 +++++---- server/lexer/details/parse.cpp | 38 ++++++++++++++++---------------------- server/lexer/details/parse.hpp | 4 ++-- server/lexer/error.hpp | 6 ++---- server/lexer/input.hpp | 11 +++-------- server/lexer/lexer.cpp | 15 ++++++--------- server/lexer/lexer.hpp | 12 ++++-------- server/lexer/token.cpp | 27 ++++++++++++++------------- server/lexer/token.hpp | 6 ++---- server/lexer/token_type.cpp | 25 +++++++++++-------------- server/lexer/token_type.hpp | 2 +- server/main/server.cpp | 34 +++++++++++++--------------------- server/main/server.hpp | 2 +- server/main/session.cpp | 30 ++++++++++++++++-------------- server/main/session.hpp | 3 +-- server/main/session_manager.cpp | 4 ++-- server/main/session_manager.hpp | 4 ++-- server/main/settings.hpp | 35 +++++++++++++---------------------- server/parser/error.hpp | 6 ++---- server/parser/operator.hpp | 13 ++++--------- server/parser/parser.hpp | 19 ++++++++----------- 22 files changed, 130 insertions(+), 181 deletions(-) (limited to 'server') diff --git a/server/common/error.hpp b/server/common/error.hpp index bdcbd43..8a37175 100644 --- a/server/common/error.hpp +++ b/server/common/error.hpp @@ -12,9 +12,7 @@ namespace math::server { class Error : public std::runtime_error { public: - explicit Error(const std::string& what) - : std::runtime_error{"server error: " + what} - { } + explicit Error(const std::string& what) : std::runtime_error{"server error: " + what} {} }; -} +} // namespace math::server diff --git a/server/common/log.hpp b/server/common/log.hpp index 5b61c58..cfb01a5 100644 --- a/server/common/log.hpp +++ b/server/common/log.hpp @@ -10,7 +10,6 @@ #include #include - #include #include #include @@ -23,7 +22,9 @@ namespace math::server::log { namespace details { -inline std::thread::id get_tid() { return std::this_thread::get_id(); } +inline std::thread::id get_tid() { + return std::this_thread::get_id(); +} inline std::string get_timestamp() { const auto now = boost::posix_time::second_clock::universal_time(); @@ -37,7 +38,7 @@ inline void log(const std::string& msg) { std::clog << get_timestamp() << " | " << get_tid() << " | " << msg << '\n'; } -} +} // namespace details template inline void log(const std::string_view& fmt, Args&&... args) { @@ -53,4 +54,4 @@ inline void error(const boost::system::error_code& ec) { details::log(ec.message()); } -} +} // namespace math::server::log diff --git a/server/lexer/details/parse.cpp b/server/lexer/details/parse.cpp index 15a4428..ccabb7e 100644 --- a/server/lexer/details/parse.cpp +++ b/server/lexer/details/parse.cpp @@ -9,7 +9,6 @@ #include #include - #include #include #include @@ -20,7 +19,7 @@ namespace math::server::lexer::details { namespace { // This approach gives GCC on Travis an "internal compiler error": -//template