summaryrefslogtreecommitdiff
path: root/modules/squish
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-05-14 16:41:43 +0200
committerRémi Verschelde <rverschelde@gmail.com>2020-05-14 21:57:34 +0200
commit0ee0fa42e6639b6fa474b7cf6afc6b1a78142185 (patch)
tree198d4ff7665d89307f6ca2469fa38620a9eb1672 /modules/squish
parent07bc4e2f96f8f47991339654ff4ab16acc19d44f (diff)
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
Diffstat (limited to 'modules/squish')
-rw-r--r--modules/squish/image_compress_squish.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/squish/image_compress_squish.cpp b/modules/squish/image_compress_squish.cpp
index a19f3158c4..c510779317 100644
--- a/modules/squish/image_compress_squish.cpp
+++ b/modules/squish/image_compress_squish.cpp
@@ -78,8 +78,9 @@ void image_decompress_squish(Image *p_image) {
}
void image_compress_squish(Image *p_image, float p_lossy_quality, Image::UsedChannels p_channels) {
- if (p_image->get_format() >= Image::FORMAT_DXT1)
+ if (p_image->get_format() >= Image::FORMAT_DXT1) {
return; //do not compress, already compressed
+ }
int w = p_image->get_width();
int h = p_image->get_height();
@@ -87,10 +88,11 @@ void image_compress_squish(Image *p_image, float p_lossy_quality, Image::UsedCha
if (p_image->get_format() <= Image::FORMAT_RGBA8) {
int squish_comp = squish::kColourRangeFit;
- if (p_lossy_quality > 0.85)
+ if (p_lossy_quality > 0.85) {
squish_comp = squish::kColourIterativeClusterFit;
- else if (p_lossy_quality > 0.75)
+ } else if (p_lossy_quality > 0.75) {
squish_comp = squish::kColourClusterFit;
+ }
Image::Format target_format = Image::FORMAT_RGBA8;