From dfcebbeae9d982b8e2a42197b2892334b665de2d Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 5 Jun 2026 17:47:31 +0200 Subject: upgrade to std::string_view --- utils/name2addr.cpp | 3 ++- utils/pdb_descr.hpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'utils') 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 #include #include +#include #include 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 #include +#include #include 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); -- cgit v1.3