Skip to content

Commit

Permalink
🧹 tui: use string_view literals in more places
Browse files Browse the repository at this point in the history
  • Loading branch information
vnepogodin committed Jul 28, 2024
1 parent 10b51ac commit eefb1ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ void enable_autologin() {
const auto& content = fmt::format(FMT_COMPILE("\nThis option enables autologin using {}.\n\nProceed?\n"), dm);
/* clang-format off */
if (!detail::yesno_widget(content, size(HEIGHT, LESS_THAN, 15) | size(WIDTH, LESS_THAN, 75))) { return; }
if (gucc::utils::exec("echo /mnt/home/* | xargs -n1 | wc -l") != "1") { return; }
if (gucc::utils::exec("echo /mnt/home/* | xargs -n1 | wc -l") != "1"sv) { return; }
/* clang-format on */

const auto& autologin_user = gucc::utils::exec("echo /mnt/home/* | cut -d/ -f4");
Expand Down Expand Up @@ -1073,7 +1073,7 @@ void make_swap() noexcept {

// Warn user if creating a new swap
const auto& swap_part = gucc::utils::exec(fmt::format(FMT_COMPILE("lsblk -o FSTYPE '{}' | grep -i 'swap'"), partition));
if (swap_part != "swap") {
if (swap_part != "swap"sv) {
const auto& do_swap = detail::yesno_widget(fmt::format(FMT_COMPILE("\nmkswap {}\n"), partition), size(HEIGHT, LESS_THAN, 15) | size(WIDTH, LESS_THAN, 75));
/* clang-format off */
if (!do_swap) { return; }
Expand Down

0 comments on commit eefb1ae

Please sign in to comment.