summaryrefslogtreecommitdiff
path: root/modules/webp
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/webp
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/webp')
-rw-r--r--modules/webp/image_loader_webp.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/webp/image_loader_webp.cpp b/modules/webp/image_loader_webp.cpp
index 744b7ef8b9..d5c80e7909 100644
--- a/modules/webp/image_loader_webp.cpp
+++ b/modules/webp/image_loader_webp.cpp
@@ -42,10 +42,11 @@ static Vector<uint8_t> _webp_lossy_pack(const Ref<Image> &p_image, float p_quali
ERR_FAIL_COND_V(p_image.is_null() || p_image->empty(), Vector<uint8_t>());
Ref<Image> img = p_image->duplicate();
- if (img->detect_alpha())
+ if (img->detect_alpha()) {
img->convert(Image::FORMAT_RGBA8);
- else
+ } else {
img->convert(Image::FORMAT_RGB8);
+ }
Size2 s(img->get_width(), img->get_height());
Vector<uint8_t> data = img->get_data();