From bf6b7d79bd2ceb838e258d2c4cb20fe4c47a7796 Mon Sep 17 00:00:00 2001 From: artemp Date: Mon, 18 May 2015 11:21:56 +0100 Subject: [PATCH] use if/else if ... --- src/image_util_jpeg.cpp | 5 ++--- src/image_util_tiff.cpp | 2 +- src/image_util_webp.cpp | 5 ++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/image_util_jpeg.cpp b/src/image_util_jpeg.cpp index 1c00c8467..14fbd0f15 100644 --- a/src/image_util_jpeg.cpp +++ b/src/image_util_jpeg.cpp @@ -52,10 +52,9 @@ void process_rgba8_jpeg(T const& image, std::string const& type, std::ostream & { auto const& key = kv.first; auto const& val = kv.second; - - if ( key == "jpeg" ) continue; - if ( key == "quality") + if ( key == "jpeg" ) continue; + else if ( key == "quality") { if (val && ! (*val).empty()) { diff --git a/src/image_util_tiff.cpp b/src/image_util_tiff.cpp index 5c1e48684..3ac72fc95 100644 --- a/src/image_util_tiff.cpp +++ b/src/image_util_tiff.cpp @@ -54,7 +54,7 @@ void handle_tiff_options(std::string const& type, auto const& key = kv.first; auto const& val = kv.second; if (key == "tiff") continue; - if (key == "compression") + else if (key == "compression") { if (val && !(*val).empty()) { diff --git a/src/image_util_webp.cpp b/src/image_util_webp.cpp index c21a637ea..c521e1c20 100644 --- a/src/image_util_webp.cpp +++ b/src/image_util_webp.cpp @@ -55,10 +55,9 @@ void handle_webp_options(std::string const& type, { auto const& key = kv.first; auto const& val = kv.second; - - if (key == "webp") continue; - if (key == "quality") + if (key == "webp") continue; + else if (key == "quality") { if (val && !(*val).empty()) {