Skip to content

Commit

Permalink
refactor(pages): string -> string_view
Browse files Browse the repository at this point in the history
  • Loading branch information
mhx committed Nov 19, 2024
1 parent d369818 commit af6bb93
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion include/dwarfs/tool/pager.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <filesystem>
#include <optional>
#include <string>
#include <string_view>
#include <vector>

namespace dwarfs {
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/tool/pager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit af6bb93

Please sign in to comment.