From 8f0130c8f74482a7d54f9bfb8763f4c6d705765c Mon Sep 17 00:00:00 2001 From: alpine Date: Wed, 24 Jun 2020 13:05:48 +0200 Subject: Added client version control. Reverted back to google formatting. --- server/src/util/commands.h | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'server/src/util/commands.h') diff --git a/server/src/util/commands.h b/server/src/util/commands.h index 547a78c..3648df2 100644 --- a/server/src/util/commands.h +++ b/server/src/util/commands.h @@ -1,19 +1,18 @@ #pragma once class commands { - using func = std::function; - std::unordered_map m_cmds; + using func = std::function; + std::unordered_map m_cmds; -public: - bool parse_input(const std::string_view str) - { - auto it = m_cmds.find(str); - if(it != m_cmds.end()) { - it->second(); - return true; - } - return false; + public: + bool parse_input(const std::string_view str) { + auto it = m_cmds.find(str); + if (it != m_cmds.end()) { + it->second(); + return true; } + return false; + } - void add(const std::string_view cmd, const func& cb) { m_cmds[cmd] = cb; } + void add(const std::string_view cmd, const func& cb) { m_cmds[cmd] = cb; } }; -- cgit v1.2.3