From eeb0d6f52bae01ebb38a11c63783743d44006443 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Thu, 1 Feb 2024 21:40:14 -0500 Subject: [PATCH] image: Remove "do_" prefix on two function names These were here due to the prefix-less name conflicting with a local bool, but now that options are in a struct that's no longer a problem. No behavior change. --- Userland/Utilities/image.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Userland/Utilities/image.cpp b/Userland/Utilities/image.cpp index cb2724b007..5830805275 100644 --- a/Userland/Utilities/image.cpp +++ b/Userland/Utilities/image.cpp @@ -42,7 +42,7 @@ static ErrorOr load_image(RefPtr const& decoder, return LoadedImage { internal_format, move(bitmap), TRY(decoder->icc_data()) }; } -static ErrorOr do_move_alpha_to_rgb(LoadedImage& image) +static ErrorOr move_alpha_to_rgb(LoadedImage& image) { if (!image.bitmap.has>()) return Error::from_string_view("Can't --move-alpha-to-rgb with CMYK bitmaps"sv); @@ -67,7 +67,7 @@ static ErrorOr do_move_alpha_to_rgb(LoadedImage& image) return {}; } -static ErrorOr do_strip_alpha(LoadedImage& image) +static ErrorOr strip_alpha(LoadedImage& image) { if (!image.bitmap.has>()) return Error::from_string_view("Can't --strip-alpha with CMYK bitmaps"sv); @@ -207,7 +207,7 @@ static ErrorOr parse_options(Main::Arguments arguments) ErrorOr serenity_main(Main::Arguments arguments) { - Options options = TRY(parse_options(move(arguments))); + Options options = TRY(parse_options(arguments)); auto file = TRY(Core::MappedFile::map(options.in_path)); auto decoder = Gfx::ImageDecoder::try_create_for_raw_bytes(file->bytes()); @@ -217,10 +217,10 @@ ErrorOr serenity_main(Main::Arguments arguments) LoadedImage image = TRY(load_image(*decoder, options.frame_index)); if (options.move_alpha_to_rgb) - TRY(do_move_alpha_to_rgb(image)); + TRY(move_alpha_to_rgb(image)); if (options.strip_alpha) - TRY(do_strip_alpha(image)); + TRY(strip_alpha(image)); OwnPtr icc_file; if (!options.assign_color_profile_path.is_empty()) {