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:
authorCampbell Barton <ideasman42@gmail.com>2019-09-07 17:12:26 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-09-07 17:23:25 +0300
commit0b2d1badecc48b5cbff5ec088b29c6e9acc5e1d0 (patch)
tree0283a5c819d1e709edfd0de814636aa83a9b1033 /source/blender/imbuf/intern/openexr/openexr_api.cpp
parentab823176d31dc155645de733f1cd4fbd6ad74592 (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/openexr/openexr_api.cpp')
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index f18eb2f7303..41db874c2b2 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -718,7 +718,7 @@ void IMB_exr_add_view(void *handle, const char *name)
static int imb_exr_get_multiView_id(StringVector &views, const std::string &name)
{
int count = 0;
- for (StringVector::const_iterator i = views.begin(); count < views.size(); ++i) {
+ for (StringVector::const_iterator i = views.begin(); count < views.size(); i++) {
if (name == *i) {
return count;
}
@@ -736,7 +736,7 @@ static void imb_exr_get_views(MultiPartInputFile &file, StringVector &views)
if (exr_has_multipart_file(file) == false) {
if (exr_has_multiview(file)) {
StringVector sv = multiView(file.header(0));
- for (StringVector::const_iterator i = sv.begin(); i != sv.end(); ++i) {
+ for (StringVector::const_iterator i = sv.begin(); i != sv.end(); i++) {
views.push_back(*i);
}
}
@@ -1118,7 +1118,7 @@ void IMB_exr_write_channels(void *handle)
if (echan->use_half_float) {
float *rect = echan->rect;
half *cur = current_rect_half;
- for (size_t i = 0; i < num_pixels; ++i, ++cur) {
+ for (size_t i = 0; i < num_pixels; i++, cur++) {
*cur = rect[i * echan->xstride];
}
half *rect_to_write = current_rect_half + (data->height - 1L) * data->width;
@@ -1686,7 +1686,7 @@ static void exr_print_filecontents(MultiPartInputFile &file)
const StringVector views = multiView(file.header(0));
printf("OpenEXR-load: MultiView file\n");
printf("OpenEXR-load: Default view: %s\n", defaultViewName(views).c_str());
- for (StringVector::const_iterator i = views.begin(); i != views.end(); ++i) {
+ for (StringVector::const_iterator i = views.begin(); i != views.end(); i++) {
printf("OpenEXR-load: Found view %s\n", (*i).c_str());
}
}
@@ -1701,7 +1701,7 @@ static void exr_print_filecontents(MultiPartInputFile &file)
for (int j = 0; j < numparts; j++) {
const ChannelList &channels = file.header(j).channels();
- for (ChannelList::ConstIterator i = channels.begin(); i != channels.end(); ++i) {
+ for (ChannelList::ConstIterator i = channels.begin(); i != channels.end(); i++) {
const Channel &channel = i.channel();
printf("OpenEXR-load: Found channel %s of type %d\n", i.name(), channel.type);
}
@@ -1713,7 +1713,7 @@ static const char *exr_rgba_channelname(MultiPartInputFile &file, const char *ch
{
const ChannelList &channels = file.header(0).channels();
- for (ChannelList::ConstIterator i = channels.begin(); i != channels.end(); ++i) {
+ for (ChannelList::ConstIterator i = channels.begin(); i != channels.end(); i++) {
/* const Channel &channel = i.channel(); */ /* Not used yet */
const char *str = i.name();
int len = strlen(str);
@@ -2013,7 +2013,7 @@ struct ImBuf *imb_load_openexr(const unsigned char *mem,
if (!has_rgb && has_luma) {
size_t a;
if (exr_has_chroma(*file)) {
- for (a = 0; a < (size_t)ibuf->x * ibuf->y; ++a) {
+ for (a = 0; a < (size_t)ibuf->x * ibuf->y; a++) {
float *color = ibuf->rect_float + a * 4;
ycc_to_rgb(color[0] * 255.0f,
color[1] * 255.0f,
@@ -2025,7 +2025,7 @@ struct ImBuf *imb_load_openexr(const unsigned char *mem,
}
}
else {
- for (a = 0; a < (size_t)ibuf->x * ibuf->y; ++a) {
+ for (a = 0; a < (size_t)ibuf->x * ibuf->y; a++) {
float *color = ibuf->rect_float + a * 4;
color[1] = color[2] = color[0];
}