Cleanup: use const, duplicate header

This commit is contained in:
Campbell Barton
2016-04-27 12:49:37 +10:00
parent c2cdc67375
commit 9bd51735a1
4 changed files with 6 additions and 10 deletions

View File

@@ -61,8 +61,10 @@ typedef enum {
MASK_HANDLE_MODE_INDIVIDUAL_HANDLES = 2,
} eMaskhandleMode;
struct MaskSplinePoint *BKE_mask_spline_point_array(struct MaskSpline *spline);
struct MaskSplinePoint *BKE_mask_spline_point_array_from_point(struct MaskSpline *spline, struct MaskSplinePoint *point_ref);
struct MaskSplinePoint *BKE_mask_spline_point_array(
struct MaskSpline *spline);
struct MaskSplinePoint *BKE_mask_spline_point_array_from_point(
struct MaskSpline *spline, const struct MaskSplinePoint *point_ref);
/* mask layers */
struct MaskLayer *BKE_mask_layer_new(struct Mask *mask, const char *name);

View File

@@ -116,7 +116,7 @@ MaskSplinePoint *BKE_mask_spline_point_array(MaskSpline *spline)
return spline->points_deform ? spline->points_deform : spline->points;
}
MaskSplinePoint *BKE_mask_spline_point_array_from_point(MaskSpline *spline, MaskSplinePoint *point_ref)
MaskSplinePoint *BKE_mask_spline_point_array_from_point(MaskSpline *spline, const MaskSplinePoint *point_ref)
{
if ((point_ref >= spline->points) && (point_ref < &spline->points[spline->tot_point])) {
return spline->points;

View File

@@ -196,7 +196,7 @@ bool ED_mask_find_nearest_diff_point(const bContext *C,
static void setup_vertex_point(Mask *mask, MaskSpline *spline, MaskSplinePoint *new_point,
const float point_co[2], const float u,
MaskSplinePoint *reference_point, const bool reference_adjacent)
const MaskSplinePoint *reference_point, const bool reference_adjacent)
{
MaskSplinePoint *prev_point = NULL;
MaskSplinePoint *next_point = NULL;

View File

@@ -29,9 +29,6 @@
#include "MEM_guardedalloc.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BLI_math.h"
#include "BLI_kdopbvh.h"
#include "BLI_memarena.h"
@@ -56,9 +53,6 @@
#include "ED_transform.h"
#include "ED_view3d.h"
#include "ED_armature.h"
#include "ED_view3d.h"
#include "MEM_guardedalloc.h"
#include "transform.h"