summaryrefslogtreecommitdiffstats
path: root/src/config.hpp
diff options
context:
space:
mode:
authorKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-05-30 17:33:48 +0900
committerKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-05-31 15:09:51 +0900
commit2357c437b260d0d8cb927e6878f1226bfafb9d0b (patch)
tree1842573395cb6ec19ed7a89157abbf8e077c1547 /src/config.hpp
parentd50188f726b15a0ae2777bf2d91ee88836feeac5 (diff)
Format source codes
* Format source codes * Change indent spaces to 4 from 3 * Remove trailing spaces in config.xml Change-Id: I745ba6c7cc4dcf4177add81666351c3c01de7d44 Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
Diffstat (limited to 'src/config.hpp')
-rw-r--r--src/config.hpp38
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