mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-02 11:59:58 +00:00
Minor syntax changes for readability of conditions in assignments
This commit is contained in:
parent
b3ecf6985f
commit
20cc4ce61b
@ -232,7 +232,7 @@ void OctreeMap::feedWithImage(const Image* image,
|
|||||||
ASSERT(image);
|
ASSERT(image);
|
||||||
ASSERT(image->pixelFormat() == IMAGE_RGB || image->pixelFormat() == IMAGE_GRAYSCALE);
|
ASSERT(image->pixelFormat() == IMAGE_RGB || image->pixelFormat() == IMAGE_GRAYSCALE);
|
||||||
color_t forceFullOpacity;
|
color_t forceFullOpacity;
|
||||||
const bool imageIsRGBA = image->pixelFormat() == IMAGE_RGB;
|
const bool imageIsRGBA = (image->pixelFormat() == IMAGE_RGB);
|
||||||
|
|
||||||
auto add_color_to_octree =
|
auto add_color_to_octree =
|
||||||
[this, &forceFullOpacity, levelDeep, imageIsRGBA](color_t color) {
|
[this, &forceFullOpacity, levelDeep, imageIsRGBA](color_t color) {
|
||||||
@ -250,12 +250,12 @@ void OctreeMap::feedWithImage(const Image* image,
|
|||||||
|
|
||||||
switch (image->pixelFormat()) {
|
switch (image->pixelFormat()) {
|
||||||
case IMAGE_RGB: {
|
case IMAGE_RGB: {
|
||||||
forceFullOpacity = (withAlpha) ? 0 : rgba_a_mask;
|
forceFullOpacity = (withAlpha ? 0 : rgba_a_mask);
|
||||||
doc::for_each_pixel<RgbTraits>(image, add_color_to_octree);
|
doc::for_each_pixel<RgbTraits>(image, add_color_to_octree);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case IMAGE_GRAYSCALE: {
|
case IMAGE_GRAYSCALE: {
|
||||||
forceFullOpacity = (withAlpha) ? 0 : graya_a_mask;
|
forceFullOpacity = (withAlpha ? 0 : graya_a_mask);
|
||||||
doc::for_each_pixel<GrayscaleTraits>(image, add_color_to_octree);
|
doc::for_each_pixel<GrayscaleTraits>(image, add_color_to_octree);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user