diff options
author | Kazumasa Mitsunari <knimitz@witz-inc.co.jp> | 2018-05-30 19:06:32 +0900 |
---|---|---|
committer | Kazumasa Mitsunari <knimitz@witz-inc.co.jp> | 2018-05-30 19:06:32 +0900 |
commit | dfe4aee045113eceaeabd327291f94583e7b13d3 (patch) | |
tree | 745826e7154c4d08606456dcef68716e64c70b81 /src/config.hpp | |
parent | 5d91a5ffe0bc614ee79a18818dadf5836ce038d7 (diff) |
Format source codes
Change-Id: I28e99487b814b23fe99aa6bc8ec4538af3940acf
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
Diffstat (limited to 'src/config.hpp')
-rw-r--r-- | src/config.hpp | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/src/config.hpp b/src/config.hpp index 8588d65..43fb67e 100644 --- a/src/config.hpp +++ b/src/config.hpp @@ -20,30 +20,34 @@ #include <experimental/optional> #include <map> -namespace wm { +namespace wm +{ -using std::experimental::optional; using std::experimental::nullopt; +using std::experimental::optional; -struct config { - typedef std::map<std::string, std::string> map; +struct config +{ + typedef std::map<std::string, std::string> map; - map cfg; + map cfg; - config(); + config(); - optional<std::string> get_string(char const *s) { - auto i = this->cfg.find(s); - return i != this->cfg.end() ? optional<std::string>(i->second) : nullopt; - } + optional<std::string> get_string(char const *s) + { + auto i = this->cfg.find(s); + return i != this->cfg.end() ? optional<std::string>(i->second) : nullopt; + } - optional<int> get_int(char const *s) { - auto i = this->cfg.find(s); - return i != this->cfg.end() ? optional<int>(std::stoi(i->second)) - : nullopt; - } + optional<int> get_int(char const *s) + { + auto i = this->cfg.find(s); + return i != this->cfg.end() ? optional<int>(std::stoi(i->second)) + : nullopt; + } }; -} // namespace wm +} // namespace wm -#endif // TMCAGLWM_CONFIG_HPP +#endif // TMCAGLWM_CONFIG_HPP |