[Bf-blender-cvs] [0bbf47ce428] greasepencil-object: GPencil: Cleanup more compiler warnings
Antonioya
noreply at git.blender.org
Fri Jul 26 16:48:37 CEST 2019
Commit: 0bbf47ce428634cb6b82babd3b6ddb38068b8760
Author: Antonioya
Date: Fri Jul 26 16:48:22 2019 +0200
Branches: greasepencil-object
https://developer.blender.org/rB0bbf47ce428634cb6b82babd3b6ddb38068b8760
GPencil: Cleanup more compiler warnings
===================================================================
M source/blender/blenkernel/BKE_gpencil.h
M source/blender/blenkernel/intern/gpencil.c
===================================================================
diff --git a/source/blender/blenkernel/BKE_gpencil.h b/source/blender/blenkernel/BKE_gpencil.h
index 3f5f5ba1f53..3933dda8fb3 100644
--- a/source/blender/blenkernel/BKE_gpencil.h
+++ b/source/blender/blenkernel/BKE_gpencil.h
@@ -212,10 +212,6 @@ struct bGPDframe *BKE_gpencil_layer_getframe(struct bGPDlayer *gpl,
struct bGPDframe *BKE_gpencil_layer_find_frame(struct bGPDlayer *gpl, int cframe);
bool BKE_gpencil_layer_delframe(struct bGPDlayer *gpl, struct bGPDframe *gpf);
-struct bGPDlayer *BKE_gpencil_layer_get_index(struct bGPdata *gpd,
- int index,
- int first_if_not_found);
-
struct bGPDlayer *BKE_gpencil_layer_getactive(struct bGPdata *gpd);
void BKE_gpencil_layer_setactive(struct bGPdata *gpd, struct bGPDlayer *active);
void BKE_gpencil_layer_delete(struct bGPdata *gpd, struct bGPDlayer *gpl);
@@ -293,13 +289,15 @@ float BKE_gpencil_stroke_length(const struct bGPDstroke *gps, bool use_3d);
void BKE_gpencil_transform(struct bGPdata *gpd, float mat[4][4]);
-bool BKE_gpencil_sample_stroke(struct bGPDstroke *gps, float dist);
-bool BKE_gpencil_stretch_stroke(struct bGPDstroke *gps, float dist);
-bool BKE_gpencil_trim_stroke_points(struct bGPDstroke *gps, int index_from, int index_to);
-bool BKE_gpencil_shrink_stroke(struct bGPDstroke *gps, float dist);
+bool BKE_gpencil_sample_stroke(struct bGPDstroke *gps, const float dist);
+bool BKE_gpencil_stretch_stroke(struct bGPDstroke *gps, const float dist);
+bool BKE_gpencil_trim_stroke_points(struct bGPDstroke *gps,
+ const int index_from,
+ const int index_to);
+bool BKE_gpencil_shrink_stroke(struct bGPDstroke *gps, const float dist);
bool BKE_gpencil_split_stroke(struct bGPDframe *gpf,
struct bGPDstroke *gps,
- int before_index,
+ const int before_index,
struct bGPDstroke **remaining_gps);
bool BKE_gpencil_smooth_stroke(struct bGPDstroke *gps, int i, float inf);
bool BKE_gpencil_smooth_stroke_strength(struct bGPDstroke *gps, int point_index, float influence);
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index 729e9d59a44..286493b74f0 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -988,31 +988,6 @@ bGPDlayer *BKE_gpencil_layer_getactive(bGPdata *gpd)
return NULL;
}
-bGPDlayer *BKE_gpencil_layer_get_index(bGPdata *gpd, int index, int first_if_not_found)
-{
- bGPDlayer *gpl;
- int i = 0;
-
- /* error checking */
- if (ELEM(NULL, gpd, gpd->layers.first)) {
- return NULL;
- }
-
- /* loop over layers until found (assume only one active) */
- for (gpl = gpd->layers.first; gpl; gpl = gpl->next) {
- if (i == index) {
- return gpl;
- }
- i++;
- }
-
- /* no such layer */
- if (first_if_not_found) {
- return gpd->layers.first;
- }
- return NULL;
-}
-
/* set the active gp-layer */
void BKE_gpencil_layer_setactive(bGPdata *gpd, bGPDlayer *active)
{
@@ -1436,9 +1411,9 @@ void BKE_gpencil_dvert_ensure(bGPDstroke *gps)
/* ************************************************** */
static void stroke_defvert_create_nr_list(MDeformVert *dv_list,
- int count,
- ListBase *result,
- int *totweight)
+ int count,
+ ListBase *result,
+ int *totweight)
{
LinkData *ld;
MDeformVert *dv;
@@ -1585,8 +1560,11 @@ static int stroke_march_next_point(const bGPDstroke *gps,
}
}
-static int stroke_march_next_point_no_interp(
- const bGPDstroke *gps, const int index_next_pt, const float *current, const float dist, float *result)
+static int stroke_march_next_point_no_interp(const bGPDstroke *gps,
+ const int index_next_pt,
+ const float *current,
+ const float dist,
+ float *result)
{
float remaining_till_next = 0.0f;
float remaining_march = dist;
@@ -1632,10 +1610,7 @@ static int stroke_march_next_point_no_interp(
static int stroke_march_count(const bGPDstroke *gps, const float dist)
{
- float remaining_till_next = 0.0f;
- float remaining_march = dist;
int point_count = 0;
- float step_start[3];
float point[3];
int next_point_index = 1;
bGPDspoint *pt = NULL;
More information about the Bf-blender-cvs
mailing list