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 --- src/post_mortem.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/post_mortem.cpp') diff --git a/src/post_mortem.cpp b/src/post_mortem.cpp index 2db7ee9..84da809 100644 --- a/src/post_mortem.cpp +++ b/src/post_mortem.cpp @@ -15,13 +15,13 @@ namespace winapi { namespace { -std::string pdb_already_loaded(Address online_base, const std::string& path) { +std::string pdb_already_loaded(Address online_base, std::string_view path) { return std::format("module with online base address {} has already been loaded: {}", address::format(online_base), path); } -std::string pdb_already_loaded(const std::string& path) { +std::string pdb_already_loaded(std::string_view path) { return std::format("module has already been loaded: {}", path); } @@ -77,7 +77,7 @@ const Module& guess_module(const std::map& modules, Address pivo } // namespace -Address PostMortem::add_pdb(Address online_base, const std::string& path) { +Address PostMortem::add_pdb(Address online_base, std::string_view path) { if (online_bases.find(online_base) != online_bases.cend()) throw std::runtime_error{pdb_already_loaded(online_base, path)}; @@ -119,7 +119,7 @@ Symbol PostMortem::resolve_symbol(Address online) const { return symbol_from_buffer(dbghelp.resolve_symbol(address_online_to_offline(online))); } -Symbol PostMortem::resolve_symbol(const std::string& name) const { +Symbol PostMortem::resolve_symbol(std::string_view name) const { return symbol_from_buffer(dbghelp.resolve_symbol(name)); } -- cgit v1.3