Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/imbuf/intern/dds/FlipDXT.cpp')
-rw-r--r--source/blender/imbuf/intern/dds/FlipDXT.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/imbuf/intern/dds/FlipDXT.cpp b/source/blender/imbuf/intern/dds/FlipDXT.cpp
index 0660d5ce5cc..cf228cea3ea 100644
--- a/source/blender/imbuf/intern/dds/FlipDXT.cpp
+++ b/source/blender/imbuf/intern/dds/FlipDXT.cpp
@@ -173,11 +173,13 @@ int FlipDXTCImage(
unsigned int width, unsigned int height, unsigned int levels, int fourcc, uint8_t *data)
{
// must have valid dimensions
- if (width == 0 || height == 0)
+ if (width == 0 || height == 0) {
return 0;
+ }
// height must be a power-of-two
- if ((height & (height - 1)) != 0)
+ if ((height & (height - 1)) != 0) {
return 0;
+ }
FlipBlockFunction full_block_function;
FlipBlockFunction half_block_function;
@@ -223,8 +225,9 @@ int FlipDXTCImage(
}
else {
// flip each block.
- for (unsigned int i = 0; i < blocks; ++i)
+ for (unsigned int i = 0; i < blocks; ++i) {
full_block_function(data + i * block_bytes);
+ }
// swap each block line in the first half of the image with the
// corresponding one in the second half.