[Bf-blender-cvs] [746380bbc55] greasepencil-object: Replace loop index to post addition
Antonio Vazquez
noreply at git.blender.org
Mon Oct 23 20:45:07 CEST 2017
Commit: 746380bbc5594985cb442f2183102869d12a06e9
Author: Antonio Vazquez
Date: Mon Oct 23 20:44:57 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rB746380bbc5594985cb442f2183102869d12a06e9
Replace loop index to post addition
===================================================================
M source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
M source/blender/draw/engines/gpencil/gpencil_engine.c
===================================================================
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
index d38c014eda6..32d6866d5ab 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
@@ -218,7 +218,7 @@ static void gpencil_batch_cache_clear(GpencilBatchCache *cache, bGPdata *gpd)
}
if (cache->cache_size > 0) {
- for (int i = 0; i < cache->cache_size; ++i) {
+ for (int i = 0; i < cache->cache_size; i++) {
GWN_BATCH_DISCARD_SAFE(cache->batch_stroke[i]);
GWN_BATCH_DISCARD_SAFE(cache->batch_fill[i]);
GWN_BATCH_DISCARD_SAFE(cache->batch_edit[i]);
@@ -1230,9 +1230,9 @@ void gpencil_array_modifiers(GPENCIL_StorageList *stl, Object *ob)
mmd = (GpencilArrayModifierData *)md;
/* reset random */
mmd->rnd[0] = 1;
- for (x = 0; x < mmd->count[0]; ++x) {
- for (y = 0; y < mmd->count[1]; ++y) {
- for (z = 0; z < mmd->count[2]; ++z) {
+ for (x = 0; x < mmd->count[0]; x++) {
+ for (y = 0; y < mmd->count[1]; y++) {
+ for (z = 0; z < mmd->count[2]; z++) {
ARRAY_SET_ITEMS(xyz, x, y, z);
if ((x == 0) && (y == 0) && (z == 0)) {
continue;
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index 7f5f4fad696..6c15ddd9eb8 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -431,7 +431,7 @@ static void GPENCIL_cache_finish(void *vedata)
/* Draw all pending objects */
if (stl->g_data->gp_cache_used > 0) {
- for (int i = 0; i < stl->g_data->gp_cache_used; ++i) {
+ for (int i = 0; i < stl->g_data->gp_cache_used; i++) {
Object *ob = stl->g_data->gp_object_cache[i].ob;
/* save init shading group */
stl->g_data->gp_object_cache[i].init_grp = stl->storage->shgroup_id;
@@ -579,7 +579,7 @@ static void gpencil_free_obj_list(GPENCIL_StorageList *stl)
{
/* free memory */
/* clear temp objects created for display only */
- for (int i = 0; i < stl->g_data->gp_cache_used; ++i) {
+ for (int i = 0; i < stl->g_data->gp_cache_used; i++) {
Object *ob = stl->g_data->gp_object_cache[i].ob;
if (ob->mode == -1) {
MEM_SAFE_FREE(ob);
@@ -658,7 +658,7 @@ static void GPENCIL_draw_scene(void *vedata)
qsort(stl->g_data->gp_object_cache, stl->g_data->gp_cache_used,
sizeof(tGPencilObjectCache), gpencil_object_cache_compare_zdepth);
- for (int i = 0; i < stl->g_data->gp_cache_used; ++i) {
+ for (int i = 0; i < stl->g_data->gp_cache_used; i++) {
cache = &stl->g_data->gp_object_cache[i];
Object *ob = cache->ob;
init_grp = cache->init_grp;
More information about the Bf-blender-cvs
mailing list