aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/utils/pdb_descr.hpp
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-01-14 19:36:53 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-01-14 20:07:47 +0300
commit0bff1d2776e0da589dd98eca69e7f04fb07dfd02 (patch)
treef7f8b905a34133d80e93d20770bdb092c04e247d /utils/pdb_descr.hpp
parentclang-format: don't BinPackArguments (diff)
downloadwinapi-debug-0bff1d2776e0da589dd98eca69e7f04fb07dfd02.tar.gz
winapi-debug-0bff1d2776e0da589dd98eca69e7f04fb07dfd02.zip
clang-format all the code
Diffstat (limited to '')
-rw-r--r--utils/pdb_descr.hpp59
1 files changed, 26 insertions, 33 deletions
diff --git a/utils/pdb_descr.hpp b/utils/pdb_descr.hpp
index cde815a..f2e6f38 100644
--- a/utils/pdb_descr.hpp
+++ b/utils/pdb_descr.hpp
@@ -15,13 +15,11 @@
#include <string>
#include <vector>
-struct PDB
-{
+struct PDB {
pdb::Address online_base;
std::string path;
- static PDB parse(std::string src)
- {
+ static PDB parse(std::string src) {
static constexpr auto sep = ',';
const auto sep_pos = src.find(sep);
@@ -35,8 +33,7 @@ struct PDB
return {online_base, src.substr(sep_pos + 1)};
}
- static pdb::Address parse_address(const std::string& src)
- {
+ 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});
@@ -44,32 +41,28 @@ struct PDB
}
};
-namespace boost
-{
- namespace program_options
- {
- template <typename charT>
- void validate(
- boost::any& dest,
- const std::vector<std::basic_string<charT>>& src_tokens,
- PDB*,
- int)
- {
- validators::check_first_occurrence(dest);
- const auto& src_token = validators::get_single_string(src_tokens);
- dest = any{PDB::parse(src_token)};
- }
+namespace boost {
+namespace program_options {
- template <typename charT>
- void validate(
- boost::any& dest,
- const std::vector<std::basic_string<charT>>& src_tokens,
- pdb::Address*,
- int)
- {
- validators::check_first_occurrence(dest);
- const auto& src_token = validators::get_single_string(src_tokens);
- dest = any{PDB::parse_address(src_token)};
- }
- }
+template <typename charT>
+void validate(boost::any& dest,
+ const std::vector<std::basic_string<charT>>& src_tokens,
+ PDB*,
+ int) {
+ validators::check_first_occurrence(dest);
+ const auto& src_token = validators::get_single_string(src_tokens);
+ dest = any{PDB::parse(src_token)};
+}
+
+template <typename charT>
+void validate(boost::any& dest,
+ const std::vector<std::basic_string<charT>>& src_tokens,
+ pdb::Address*,
+ int) {
+ validators::check_first_occurrence(dest);
+ const auto& src_token = validators::get_single_string(src_tokens);
+ dest = any{PDB::parse_address(src_token)};
}
+
+} // namespace program_options
+} // namespace boost