[Bf-blender-cvs] [7efb8f54771] greasepencil-object: Cleanup: Remove redundant code

Antonio Vazquez noreply at git.blender.org
Tue Oct 10 12:32:56 CEST 2017


Commit: 7efb8f547716b7fc6cd4cb1ea51291d9b1e0b7eb
Author: Antonio Vazquez
Date:   Tue Oct 10 12:32:42 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rB7efb8f547716b7fc6cd4cb1ea51291d9b1e0b7eb

Cleanup: Remove redundant code

===================================================================

M	source/blender/blenkernel/intern/gpencil_modifier.c
M	source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
M	source/blender/draw/engines/gpencil/gpencil_vfx.c

===================================================================

diff --git a/source/blender/blenkernel/intern/gpencil_modifier.c b/source/blender/blenkernel/intern/gpencil_modifier.c
index 88a53c402e2..49337174839 100644
--- a/source/blender/blenkernel/intern/gpencil_modifier.c
+++ b/source/blender/blenkernel/intern/gpencil_modifier.c
@@ -969,7 +969,7 @@ void BKE_gpencil_stroke_modifiers(Object *ob, bGPDlayer *gpl, bGPDframe *UNUSED(
 {
 	ModifierData *md;
 	bGPdata *gpd = ob->gpd;
-	bool is_edit = (bool)(GPENCIL_ANY_EDIT_MODE(gpd));
+	bool is_edit = GPENCIL_ANY_EDIT_MODE(gpd);
 
 	int id = 0;
 	for (md = ob->modifiers.first; md; md = md->next) {
@@ -1024,7 +1024,7 @@ void BKE_gpencil_geometry_modifiers(Object *ob, bGPDlayer *gpl, bGPDframe *gpf)
 {
 	ModifierData *md;
 	bGPdata *gpd = ob->gpd;
-	bool is_edit = (bool)(GPENCIL_ANY_EDIT_MODE(gpd));
+	bool is_edit = GPENCIL_ANY_EDIT_MODE(gpd);
 
 	int id = 0;
 	for (md = ob->modifiers.first; md; md = md->next) {
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 82a045d6579..0ddb5dc7c00 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
@@ -131,7 +131,7 @@ static bool gpencil_batch_cache_valid(Object *ob, bGPdata *gpd, int cfra)
 		return false;
 	}
 
-	cache->is_editmode = (bool)(GPENCIL_ANY_EDIT_MODE(gpd));
+	cache->is_editmode = GPENCIL_ANY_EDIT_MODE(gpd);
 
 	if (cfra != cache->cache_frame) {
 		return false;
@@ -194,7 +194,7 @@ static void gpencil_batch_cache_init(Object *ob, int cfra)
 	cache->batch_edit = MEM_callocN(sizeof(struct Gwn_Batch) * cache->cache_size, "Gpencil_Batch_Edit");
 	cache->batch_edlin = MEM_callocN(sizeof(struct Gwn_Batch) * cache->cache_size, "Gpencil_Batch_Edlin");
 
-	cache->is_editmode = (bool)(GPENCIL_ANY_EDIT_MODE(gpd));
+	cache->is_editmode = GPENCIL_ANY_EDIT_MODE(gpd);
 	gpd->flag &= ~GP_DATA_CACHE_IS_DIRTY;
 
 	cache->cache_idx = 0;
diff --git a/source/blender/draw/engines/gpencil/gpencil_vfx.c b/source/blender/draw/engines/gpencil/gpencil_vfx.c
index 2302211a3f1..e84aa8b7414 100644
--- a/source/blender/draw/engines/gpencil/gpencil_vfx.c
+++ b/source/blender/draw/engines/gpencil/gpencil_vfx.c
@@ -51,7 +51,7 @@ static ModifierData *modifier_available(Object *ob, ModifierType type)
 		return NULL;
 	}
 
-	bool is_edit = (bool)(GPENCIL_ANY_EDIT_MODE(gpd));
+	bool is_edit = GPENCIL_ANY_EDIT_MODE(gpd);
 	if (((md->mode & eModifierMode_Editmode) == 0) && (is_edit)) {
 		return NULL;
 	}
@@ -76,7 +76,7 @@ static bool modifier_is_active(Object *ob, ModifierData *md)
 		return false;
 	}
 
-	bool is_edit = (bool)(GPENCIL_ANY_EDIT_MODE(gpd));
+	bool is_edit = GPENCIL_ANY_EDIT_MODE(gpd);
 	if (((md->mode & eModifierMode_Editmode) == 0) && (is_edit)) {
 		return false;
 	}



More information about the Bf-blender-cvs mailing list