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/python
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/python')
-rw-r--r--source/blender/python/intern/bpy_props.c12
-rw-r--r--source/blender/python/mathutils/mathutils_noise.c4
2 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c
index 9e734123caa..6b63d1ef2c3 100644
--- a/source/blender/python/intern/bpy_props.c
+++ b/source/blender/python/intern/bpy_props.c
@@ -480,7 +480,7 @@ static void bpy_prop_boolean_array_get_cb(struct PointerRNA *ptr,
if (ret == NULL) {
PyC_Err_PrintWithFunc(py_func);
- for (i = 0; i < len; ++i) {
+ for (i = 0; i < len; i++) {
values[i] = false;
}
}
@@ -488,7 +488,7 @@ static void bpy_prop_boolean_array_get_cb(struct PointerRNA *ptr,
if (PyC_AsArray(values, ret, len, &PyBool_Type, false, "BoolVectorProperty get") == -1) {
PyC_Err_PrintWithFunc(py_func);
- for (i = 0; i < len; ++i) {
+ for (i = 0; i < len; i++) {
values[i] = false;
}
@@ -724,7 +724,7 @@ static void bpy_prop_int_array_get_cb(struct PointerRNA *ptr,
if (ret == NULL) {
PyC_Err_PrintWithFunc(py_func);
- for (i = 0; i < len; ++i) {
+ for (i = 0; i < len; i++) {
values[i] = 0;
}
}
@@ -732,7 +732,7 @@ static void bpy_prop_int_array_get_cb(struct PointerRNA *ptr,
if (PyC_AsArray(values, ret, len, &PyLong_Type, false, "IntVectorProperty get") == -1) {
PyC_Err_PrintWithFunc(py_func);
- for (i = 0; i < len; ++i) {
+ for (i = 0; i < len; i++) {
values[i] = 0;
}
@@ -968,7 +968,7 @@ static void bpy_prop_float_array_get_cb(struct PointerRNA *ptr,
if (ret == NULL) {
PyC_Err_PrintWithFunc(py_func);
- for (i = 0; i < len; ++i) {
+ for (i = 0; i < len; i++) {
values[i] = 0.0f;
}
}
@@ -976,7 +976,7 @@ static void bpy_prop_float_array_get_cb(struct PointerRNA *ptr,
if (PyC_AsArray(values, ret, len, &PyFloat_Type, false, "FloatVectorProperty get") == -1) {
PyC_Err_PrintWithFunc(py_func);
- for (i = 0; i < len; ++i) {
+ for (i = 0; i < len; i++) {
values[i] = 0.0f;
}
diff --git a/source/blender/python/mathutils/mathutils_noise.c b/source/blender/python/mathutils/mathutils_noise.c
index b890295d32f..1b438072329 100644
--- a/source/blender/python/mathutils/mathutils_noise.c
+++ b/source/blender/python/mathutils/mathutils_noise.c
@@ -140,11 +140,11 @@ static void next_state(void)
left = N;
next = state;
- for (j = N - M + 1; --j; p++) {
+ for (j = N - M + 1; j--; p++) {
*p = p[M] ^ TWIST(p[0], p[1]);
}
- for (j = M; --j; p++) {
+ for (j = M; j--; p++) {
*p = p[M - N] ^ TWIST(p[0], p[1]);
}