diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-09-07 17:12:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-09-07 17:23:25 +0300 |
commit | 0b2d1badecc48b5cbff5ec088b29c6e9acc5e1d0 (patch) | |
tree | 0283a5c819d1e709edfd0de814636aa83a9b1033 /source/blender/imbuf/intern/dds | |
parent | ab823176d31dc155645de733f1cd4fbd6ad74592 (diff) |
Cleanup: use post increment/decrement
When the result isn't used, prefer post increment/decrement
(already used nearly everywhere in Blender).
Diffstat (limited to 'source/blender/imbuf/intern/dds')
-rw-r--r-- | source/blender/imbuf/intern/dds/FlipDXT.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/imbuf/intern/dds/FlipDXT.cpp b/source/blender/imbuf/intern/dds/FlipDXT.cpp index cf228cea3ea..bfd19f40493 100644 --- a/source/blender/imbuf/intern/dds/FlipDXT.cpp +++ b/source/blender/imbuf/intern/dds/FlipDXT.cpp @@ -208,7 +208,7 @@ int FlipDXTCImage( unsigned int mip_width = width; unsigned int mip_height = height; - for (unsigned int i = 0; i < levels; ++i) { + for (unsigned int i = 0; i < levels; i++) { unsigned int blocks_per_row = (mip_width + 3) / 4; unsigned int blocks_per_col = (mip_height + 3) / 4; unsigned int blocks = blocks_per_row * blocks_per_col; @@ -219,13 +219,13 @@ int FlipDXTCImage( } else if (mip_height == 2) { // flip the first 2 lines in each block. - for (unsigned int i = 0; i < blocks_per_row; ++i) { + for (unsigned int i = 0; i < blocks_per_row; i++) { half_block_function(data + i * block_bytes); } } 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); } @@ -235,7 +235,7 @@ int FlipDXTCImage( unsigned int row_bytes = block_bytes * blocks_per_row; uint8_t *temp_line = new uint8_t[row_bytes]; - for (unsigned int y = 0; y < blocks_per_col / 2; ++y) { + for (unsigned int y = 0; y < blocks_per_col / 2; y++) { uint8_t *line1 = data + y * row_bytes; uint8_t *line2 = data + (blocks_per_col - y - 1) * row_bytes; |