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>2013-05-08 16:54:33 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-05-08 16:54:33 +0400
commit5c4f96af2c9fc5afc676cf132e8171a66a973d1b (patch)
tree3085a2024f8bd07ea2b14a71c6003aaec24c3179
parent62db610220867bb2b68a338b5fb8a2893f45fa80 (diff)
code cleanup: use 'const float[2]' where possible.
-rw-r--r--source/blender/blenkernel/intern/mask_evaluate.c2
-rw-r--r--source/blender/editors/gpencil/gpencil_edit.c2
-rw-r--r--source/blender/editors/interface/interface_layout.c2
-rw-r--r--source/blender/editors/interface/resources.c1
-rw-r--r--source/blender/editors/mask/mask_draw.c2
-rw-r--r--source/blender/editors/mask/mask_select.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c2
-rw-r--r--source/blender/editors/space_image/image_ops.c4
-rw-r--r--source/blender/editors/space_node/node_add.c2
-rw-r--r--source/blender/editors/space_node/node_draw.c2
10 files changed, 10 insertions, 11 deletions
diff --git a/source/blender/blenkernel/intern/mask_evaluate.c b/source/blender/blenkernel/intern/mask_evaluate.c
index a2f6b3c1929..a6d1f18d87f 100644
--- a/source/blender/blenkernel/intern/mask_evaluate.c
+++ b/source/blender/blenkernel/intern/mask_evaluate.c
@@ -318,7 +318,7 @@ static void feather_bucket_check_intersect(float (*feather_points)[2], int tot_f
}
}
-static int feather_bucket_index_from_coord(float co[2], const float min[2], const float bucket_scale[2],
+static int feather_bucket_index_from_coord(const float co[2], const float min[2], const float bucket_scale[2],
const int buckets_per_side)
{
int x = (int) ((co[0] - min[0]) * bucket_scale[0]);
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index f12e6da59b2..286fffb562a 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -1260,7 +1260,7 @@ static void gp_stroke_finalize_curve_endpoints(Curve *cu)
}
}
-static void gp_stroke_norm_curve_weights(Curve *cu, float minmax_weights[2])
+static void gp_stroke_norm_curve_weights(Curve *cu, const float minmax_weights[2])
{
Nurb *nu;
const float delta = minmax_weights[0];
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index c66ca75412f..2bde6aa607f 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -2508,7 +2508,7 @@ float uiLayoutGetScaleY(uiLayout *layout)
/********************** Layout *******************/
-static void ui_item_scale(uiLayout *litem, float scale[2])
+static void ui_item_scale(uiLayout *litem, const float scale[2])
{
uiItem *item;
int x, y, w, h;
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index 89469d47fba..c72d16221a8 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -1053,7 +1053,6 @@ void UI_ThemeColorShade(int colorid, int offset)
CLAMP(g, 0, 255);
b = offset + (int) cp[2];
CLAMP(b, 0, 255);
- //glColor3ub(r, g, b);
glColor4ub(r, g, b, cp[3]);
}
void UI_ThemeColorShadeAlpha(int colorid, int coloffset, int alphaoffset)
diff --git a/source/blender/editors/mask/mask_draw.c b/source/blender/editors/mask/mask_draw.c
index 89881ad36e1..98fac035c16 100644
--- a/source/blender/editors/mask/mask_draw.c
+++ b/source/blender/editors/mask/mask_draw.c
@@ -123,7 +123,7 @@ static void draw_spline_parents(MaskLayer *UNUSED(masklay), MaskSpline *spline)
}
#endif
-static void mask_point_undistort_pos(SpaceClip *sc, float r_co[2], float co[2])
+static void mask_point_undistort_pos(SpaceClip *sc, float r_co[2], const float co[2])
{
BKE_mask_coord_to_movieclip(sc->clip, &sc->user, r_co, co);
ED_clip_point_undistorted_pos(sc, r_co, r_co);
diff --git a/source/blender/editors/mask/mask_select.c b/source/blender/editors/mask/mask_select.c
index 7de6f66f2ef..997f170c9f9 100644
--- a/source/blender/editors/mask/mask_select.c
+++ b/source/blender/editors/mask/mask_select.c
@@ -590,7 +590,7 @@ void MASK_OT_select_lasso(wmOperatorType *ot)
/********************** circle select operator *********************/
-static int mask_spline_point_inside_ellipse(BezTriple *bezt, float offset[2], float ellipse[2])
+static int mask_spline_point_inside_ellipse(BezTriple *bezt, const float offset[2], const float ellipse[2])
{
/* normalized ellipse: ell[0] = scaleX, ell[1] = scaleY */
float x, y;
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index d2badbaa156..3dff3c7846a 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -496,7 +496,7 @@ static int project_paint_PickFace(const ProjPaintState *ps, const float pt[2], f
}
/* Converts a uv coord into a pixel location wrapping if the uv is outside 0-1 range */
-static void uvco_to_wrapped_pxco(float uv[2], int ibuf_x, int ibuf_y, float *x, float *y)
+static void uvco_to_wrapped_pxco(const float uv[2], int ibuf_x, int ibuf_y, float *x, float *y)
{
/* use */
*x = (float)fmodf(uv[0], 1.0f);
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index ecbe4957c1b..dbb71007562 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -87,7 +87,7 @@
/******************** view navigation utilities *********************/
-static void sima_zoom_set(SpaceImage *sima, ARegion *ar, float zoom, float location[2])
+static void sima_zoom_set(SpaceImage *sima, ARegion *ar, float zoom, const float location[2])
{
float oldzoom = sima->zoom;
int width, height;
@@ -123,7 +123,7 @@ static void sima_zoom_set(SpaceImage *sima, ARegion *ar, float zoom, float locat
}
}
-static void sima_zoom_set_factor(SpaceImage *sima, ARegion *ar, float zoomfac, float location[2])
+static void sima_zoom_set_factor(SpaceImage *sima, ARegion *ar, float zoomfac, const float location[2])
{
sima_zoom_set(sima, ar, sima->zoom * zoomfac, location);
}
diff --git a/source/blender/editors/space_node/node_add.c b/source/blender/editors/space_node/node_add.c
index 61fbde32f7a..54b3efe394b 100644
--- a/source/blender/editors/space_node/node_add.c
+++ b/source/blender/editors/space_node/node_add.c
@@ -149,7 +149,7 @@ typedef struct bNodeSocketLink {
float point[2];
} bNodeSocketLink;
-static bNodeSocketLink *add_reroute_insert_socket_link(ListBase *lb, bNodeSocket *sock, bNodeLink *link, float point[2])
+static bNodeSocketLink *add_reroute_insert_socket_link(ListBase *lb, bNodeSocket *sock, bNodeLink *link, const float point[2])
{
bNodeSocketLink *socklink, *prev;
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index 1f98d0a4176..ec563c7f175 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -1200,7 +1200,7 @@ static void draw_tree_path(SpaceNode *snode)
BLF_draw_default(1.5f * UI_UNIT_X, 1.5f * UI_UNIT_Y, 0.0f, info, sizeof(info));
}
-static void snode_setup_v2d(SpaceNode *snode, ARegion *ar, float center[2])
+static void snode_setup_v2d(SpaceNode *snode, ARegion *ar, const float center[2])
{
View2D *v2d = &ar->v2d;