diff options
Diffstat (limited to 'utils')
| -rw-r--r-- | utils/name2addr.cpp | 3 | ||||
| -rw-r--r-- | utils/pdb_descr.hpp | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/utils/name2addr.cpp b/utils/name2addr.cpp index 105b94e..d17919b 100644 --- a/utils/name2addr.cpp +++ b/utils/name2addr.cpp @@ -13,6 +13,7 @@ #include <exception> #include <iostream> #include <string> +#include <string_view> #include <vector> namespace { @@ -42,7 +43,7 @@ void dump_error(const std::exception& e) { std::cerr << "error: " << e.what() << '\n'; } -void resolve_symbol(const winapi::PostMortem& analysis, const std::string& name) { +void resolve_symbol(const winapi::PostMortem& analysis, std::string_view name) { try { const auto address = analysis.resolve_symbol(name).get_online_address(); std::cout << winapi::address::format(address) << '\n'; diff --git a/utils/pdb_descr.hpp b/utils/pdb_descr.hpp index fbf0950..3e24f2c 100644 --- a/utils/pdb_descr.hpp +++ b/utils/pdb_descr.hpp @@ -10,13 +10,14 @@ #include <boost/program_options.hpp> #include <string> +#include <string_view> #include <vector> struct PDB { winapi::Address online_base; std::string path; - static PDB parse(std::string src) { + static PDB parse(const std::string& src) { static constexpr auto sep = ','; const auto sep_pos = src.find(sep); |
