From 658eac5c4603aac37e2a21333d511526155d48af Mon Sep 17 00:00:00 2001 From: junior rantila Date: Sun, 3 Oct 2021 01:04:34 +0200 Subject: Utilities: Change watch utility to use eastconst style --- Userland/Utilities/watch.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Userland') diff --git a/Userland/Utilities/watch.cpp b/Userland/Utilities/watch.cpp index aa96f360ea..71e94cefb6 100644 --- a/Userland/Utilities/watch.cpp +++ b/Userland/Utilities/watch.cpp @@ -24,7 +24,7 @@ static bool flag_beep_on_fail = false; static volatile int exit_code = 0; static volatile pid_t child_pid = -1; -static String build_header_string(const Vector& command, const struct timeval& interval) +static String build_header_string(Vector const& command, struct timeval const& interval) { StringBuilder builder; builder.appendff("Every {}", interval.tv_sec); @@ -43,7 +43,7 @@ static struct timeval get_current_time() return tv; } -static int64_t usecs_from(const struct timeval& start, const struct timeval& end) +static int64_t usecs_from(struct timeval const& start, struct timeval const& end) { struct timeval diff; timeval_sub(end, start, diff); @@ -66,7 +66,7 @@ static void handle_signal(int signal) exit(exit_code); } -static int run_command(const Vector& command) +static int run_command(Vector const& command) { if ((errno = posix_spawnp(const_cast(&child_pid), command[0], nullptr, nullptr, const_cast(command.data()), environ))) { exit_code = 1; @@ -101,7 +101,7 @@ int main(int argc, char** argv) return 1; } - Vector command; + Vector command; Core::ArgsParser args_parser; args_parser.set_stop_on_first_non_option(true); args_parser.set_general_help("Execute a command repeatedly, and watch its output over time."); -- cgit v1.2.3