diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2017-06-25 19:27:58 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2017-06-25 19:27:58 +0300 |
commit | be0973bb367c5644e9ecc57043f2b6aa49a3dcb9 (patch) | |
tree | 061223783abb5ebc98bfc9d115a97ed6bd04c268 /utils/pdb_descr.hpp | |
parent | refactor command-line parameters parsing (diff) | |
download | winapi-debug-be0973bb367c5644e9ecc57043f2b6aa49a3dcb9.tar.gz winapi-debug-be0973bb367c5644e9ecc57043f2b6aa49a3dcb9.zip |
code style
Diffstat (limited to 'utils/pdb_descr.hpp')
-rw-r--r-- | utils/pdb_descr.hpp | 47 |
1 files changed, 22 insertions, 25 deletions
diff --git a/utils/pdb_descr.hpp b/utils/pdb_descr.hpp index 58261a0..cde815a 100644 --- a/utils/pdb_descr.hpp +++ b/utils/pdb_descr.hpp @@ -15,37 +15,34 @@ #include <string> #include <vector> -namespace +struct PDB { - struct PDB - { - pdb::Address online_base; - std::string path; + pdb::Address online_base; + std::string path; - static PDB parse(std::string src) - { - static constexpr auto sep = ','; + static PDB parse(std::string src) + { + static constexpr auto sep = ','; - const auto sep_pos = src.find(sep); - if (sep_pos == std::string::npos) - boost::throw_exception(boost::program_options::invalid_option_value{src}); + const auto sep_pos = src.find(sep); + if (sep_pos == std::string::npos) + boost::throw_exception(boost::program_options::invalid_option_value{src}); - pdb::Address online_base; - if (!pdb::parse_address(online_base, src.substr(0, sep_pos))) - boost::throw_exception(boost::program_options::invalid_option_value{src}); + pdb::Address online_base; + if (!pdb::parse_address(online_base, src.substr(0, sep_pos))) + boost::throw_exception(boost::program_options::invalid_option_value{src}); - return {online_base, src.substr(sep_pos + 1)}; - } + return {online_base, src.substr(sep_pos + 1)}; + } - static pdb::Address parse_address(const std::string& src) - { - pdb::Address dest; - if (!pdb::parse_address(dest, src)) - boost::throw_exception(boost::program_options::invalid_option_value{src}); - return dest; - } - }; -} + static pdb::Address parse_address(const std::string& src) + { + pdb::Address dest; + if (!pdb::parse_address(dest, src)) + boost::throw_exception(boost::program_options::invalid_option_value{src}); + return dest; + } +}; namespace boost { |