refactor(pages): string -> string_view

This commit is contained in:
Marcus Holland-Moritz 2024-11-19 23:23:45 +01:00
parent 56dedbd05e
commit 329d342e7e
2 changed files with 3 additions and 2 deletions

View File

@ -24,6 +24,7 @@
#include <filesystem>
#include <optional>
#include <string>
#include <string_view>
#include <vector>
namespace dwarfs {
@ -38,7 +39,7 @@ struct pager_program {
};
std::optional<pager_program> find_pager_program(os_access const& os);
void show_in_pager(pager_program const& pager, std::string text);
void show_in_pager(pager_program const& pager, std::string_view text);
} // namespace tool

View File

@ -78,7 +78,7 @@ std::optional<pager_program> find_pager_program(os_access const& os) {
return std::nullopt;
}
void show_in_pager(pager_program const& pager, std::string text) {
void show_in_pager(pager_program const& pager, std::string_view text) {
boost::asio::io_context ios;
// NOLINTBEGIN(clang-analyzer-unix.BlockInCriticalSection)
bp::child proc(pager.name.wstring(), bp::args(pager.args),