From 20cc4ce61b6be35a5b493a5964b652bb1191083b Mon Sep 17 00:00:00 2001 From: David Capello Date: Thu, 15 Sep 2022 10:40:24 -0300 Subject: [PATCH] Minor syntax changes for readability of conditions in assignments --- src/doc/octree_map.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/doc/octree_map.cpp b/src/doc/octree_map.cpp index 814b96bb7..72ea957ed 100644 --- a/src/doc/octree_map.cpp +++ b/src/doc/octree_map.cpp @@ -232,7 +232,7 @@ void OctreeMap::feedWithImage(const Image* image, ASSERT(image); ASSERT(image->pixelFormat() == IMAGE_RGB || image->pixelFormat() == IMAGE_GRAYSCALE); color_t forceFullOpacity; - const bool imageIsRGBA = image->pixelFormat() == IMAGE_RGB; + const bool imageIsRGBA = (image->pixelFormat() == IMAGE_RGB); auto add_color_to_octree = [this, &forceFullOpacity, levelDeep, imageIsRGBA](color_t color) { @@ -250,12 +250,12 @@ void OctreeMap::feedWithImage(const Image* image, switch (image->pixelFormat()) { case IMAGE_RGB: { - forceFullOpacity = (withAlpha) ? 0 : rgba_a_mask; + forceFullOpacity = (withAlpha ? 0 : rgba_a_mask); doc::for_each_pixel(image, add_color_to_octree); break; } case IMAGE_GRAYSCALE: { - forceFullOpacity = (withAlpha) ? 0 : graya_a_mask; + forceFullOpacity = (withAlpha ? 0 : graya_a_mask); doc::for_each_pixel(image, add_color_to_octree); break; }