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 --- client/input.hpp | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) (limited to 'client/input.hpp') diff --git a/client/input.hpp b/client/input.hpp index 9c22b03..0295f3b 100644 --- a/client/input.hpp +++ b/client/input.hpp @@ -19,14 +19,12 @@ namespace math::client::input { class Error : public client::Error { public: - explicit Error(const std::string& what) - : client::Error{"input error: " + what} { - } + explicit Error(const std::string& what) : client::Error{"input error: " + what} {} }; class Reader { public: - using InputHandler = std::function; + using InputHandler = std::function; virtual ~Reader() = default; @@ -37,13 +35,9 @@ using ReaderPtr = std::unique_ptr; class FileReader : public Reader { public: - explicit FileReader(const std::string& path) - : m_path{path} - { } + explicit FileReader(const std::string& path) : m_path{path} {} - bool for_each_input(const InputHandler& process) const override { - return enum_lines(process); - } + bool for_each_input(const InputHandler& process) const override { return enum_lines(process); } private: bool enum_lines(const InputHandler& process) const { @@ -73,9 +67,7 @@ private: class MultiFileReader : public Reader { public: - explicit MultiFileReader(const std::vector& paths) - : m_paths{paths} - { } + explicit MultiFileReader(const std::vector& paths) : m_paths{paths} {} bool for_each_input(const InputHandler& process) const override { for (const auto& path : m_paths) { @@ -101,13 +93,9 @@ inline input::ReaderPtr make_file_reader(const std::vector& paths) class StringReader : public Reader { public: - explicit StringReader(const std::string& input) - : m_input{input} - { } + explicit StringReader(const std::string& input) : m_input{input} {} - bool for_each_input(const InputHandler& process) const override { - return process(m_input); - } + bool for_each_input(const InputHandler& process) const override { return process(m_input); } private: const std::string m_input; @@ -141,4 +129,4 @@ inline input::ReaderPtr make_console_reader() { return std::make_unique(); } -} +} // namespace math::client::input -- cgit v1.2.3