From 0ee0fa42e6639b6fa474b7cf6afc6b1a78142185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 14 May 2020 16:41:43 +0200 Subject: Style: Enforce braces around if blocks and loops Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html --- modules/cvtt/image_compress_cvtt.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'modules/cvtt') diff --git a/modules/cvtt/image_compress_cvtt.cpp b/modules/cvtt/image_compress_cvtt.cpp index 40e0f1a08f..2a4f836478 100644 --- a/modules/cvtt/image_compress_cvtt.cpp +++ b/modules/cvtt/image_compress_cvtt.cpp @@ -137,8 +137,9 @@ static void _digest_job_queue(void *p_job_queue) { } void image_compress_cvtt(Image *p_image, float p_lossy_quality, Image::UsedChannels p_channels) { - if (p_image->get_format() >= Image::FORMAT_BPTC_RGBA) + if (p_image->get_format() >= Image::FORMAT_BPTC_RGBA) { return; //do not compress, already compressed + } int w = p_image->get_width(); int h = p_image->get_height(); @@ -153,16 +154,17 @@ void image_compress_cvtt(Image *p_image, float p_lossy_quality, Image::UsedChann cvtt::Options options; uint32_t flags = cvtt::Flags::Fastest; - if (p_lossy_quality > 0.85) + if (p_lossy_quality > 0.85) { flags = cvtt::Flags::Ultra; - else if (p_lossy_quality > 0.75) + } else if (p_lossy_quality > 0.75) { flags = cvtt::Flags::Better; - else if (p_lossy_quality > 0.55) + } else if (p_lossy_quality > 0.55) { flags = cvtt::Flags::Default; - else if (p_lossy_quality > 0.35) + } else if (p_lossy_quality > 0.35) { flags = cvtt::Flags::Fast; - else if (p_lossy_quality > 0.15) + } else if (p_lossy_quality > 0.15) { flags = cvtt::Flags::Faster; + } flags |= cvtt::Flags::BC7_RespectPunchThrough; -- cgit v1.2.3