diff options
| author | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-04-17 17:43:38 +0200 | 
|---|---|---|
| committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-04-17 17:43:38 +0200 | 
| commit | e4ffd8374040d36c22125eeb534d884f56978592 (patch) | |
| tree | 1917ed64bf8e6e391ebf46de79a6fea41e0dcf68 /lib/configuration | |
| parent | Hovering over links shows them in the status bar again (diff) | |
| download | smolbote-e4ffd8374040d36c22125eeb534d884f56978592.tar.xz | |
Style pass
Diffstat (limited to 'lib/configuration')
| -rw-r--r-- | lib/configuration/configuration.h | 16 | 
1 files changed, 8 insertions, 8 deletions
| diff --git a/lib/configuration/configuration.h b/lib/configuration/configuration.h index 1c919b0..c5e044f 100644 --- a/lib/configuration/configuration.h +++ b/lib/configuration/configuration.h @@ -9,13 +9,13 @@  #ifndef SMOLBOTE_CONFIGURATION_H  #define SMOLBOTE_CONFIGURATION_H -#include <optional> -#include <string> -#include <vector>  #include <QString> -#include <boost/program_options.hpp>  #include <QStringList>  #include <QVariant> +#include <boost/program_options.hpp> +#include <optional> +#include <string> +#include <vector>  class Configuration  { @@ -43,16 +43,15 @@ public:              std::string r;              try {                  r = vm[path].as<std::string>(); -            } catch (boost::bad_any_cast &) { +            } catch(boost::bad_any_cast &) {                  // try int                  try {                      r = std::to_string(vm[path].as<int>()); -                } catch (boost::bad_any_cast &) { +                } catch(boost::bad_any_cast &) {                      // try bool, and crash if not that either                      r = vm[path].as<bool>() ? "true" : "false";                  } -              }              // check if it's a path @@ -65,7 +64,8 @@ public:              return std::optional<T>(vm[path].as<T>());      } -    const std::vector<boost::shared_ptr<boost::program_options::option_description>> & options() { +    const std::vector<boost::shared_ptr<boost::program_options::option_description>> &options() +    {          return desc.options();      } | 
