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 <campbell@blender.org>2022-01-07 03:38:08 +0300
committerCampbell Barton <campbell@blender.org>2022-01-07 06:16:26 +0300
commit3d3bc748849834ef74563deb603ab43859cffeeb (patch)
treede74ce4722b2cb032c22dbc090a15dd2e172c29b /source/blender/bmesh/intern
parentbb69c19f08ac681d4386325e4318ebfbef2e9531 (diff)
Cleanup: remove redundant const qualifiers for POD types
MSVC used to warn about const mismatch for arguments passed by value. Remove these as newer versions of MSVC no longer show this warning.
Diffstat (limited to 'source/blender/bmesh/intern')
-rw-r--r--source/blender/bmesh/intern/bmesh_construct.h32
-rw-r--r--source/blender/bmesh/intern/bmesh_core.h53
-rw-r--r--source/blender/bmesh/intern/bmesh_delete.h8
-rw-r--r--source/blender/bmesh/intern/bmesh_edgeloop.h6
-rw-r--r--source/blender/bmesh/intern/bmesh_interp.h30
-rw-r--r--source/blender/bmesh/intern/bmesh_iterators.h23
-rw-r--r--source/blender/bmesh/intern/bmesh_log.h6
-rw-r--r--source/blender/bmesh/intern/bmesh_marking.h68
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh.h30
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh_convert.h4
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh_normals.h16
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh_partial_update.h10
-rw-r--r--source/blender/bmesh/intern/bmesh_mods.h36
-rw-r--r--source/blender/bmesh/intern/bmesh_operator_api.h86
-rw-r--r--source/blender/bmesh/intern/bmesh_operators.h56
-rw-r--r--source/blender/bmesh/intern/bmesh_polygon.h14
-rw-r--r--source/blender/bmesh/intern/bmesh_polygon_edgenet.h4
-rw-r--r--source/blender/bmesh/intern/bmesh_private.h6
-rw-r--r--source/blender/bmesh/intern/bmesh_query.h88
-rw-r--r--source/blender/bmesh/intern/bmesh_query_uv.h28
-rw-r--r--source/blender/bmesh/intern/bmesh_structure.h5
21 files changed, 270 insertions, 339 deletions
diff --git a/source/blender/bmesh/intern/bmesh_construct.h b/source/blender/bmesh/intern/bmesh_construct.h
index 692f3b403b5..7b25a5b5a2a 100644
--- a/source/blender/bmesh/intern/bmesh_construct.h
+++ b/source/blender/bmesh/intern/bmesh_construct.h
@@ -30,19 +30,19 @@ struct Mesh;
*
* \returns false if any verts aren't found.
*/
-bool BM_verts_from_edges(BMVert **vert_arr, BMEdge **edge_arr, const int len);
+bool BM_verts_from_edges(BMVert **vert_arr, BMEdge **edge_arr, int len);
/**
* Fill in an edge array from a vertex array (connected polygon loop).
*
* \returns false if any edges aren't found.
*/
-bool BM_edges_from_verts(BMEdge **edge_arr, BMVert **vert_arr, const int len);
+bool BM_edges_from_verts(BMEdge **edge_arr, BMVert **vert_arr, int len);
/**
* Fill in an edge array from a vertex array (connected polygon loop).
* Creating edges as-needed.
*/
-void BM_edges_from_verts_ensure(BMesh *bm, BMEdge **edge_arr, BMVert **vert_arr, const int len);
+void BM_edges_from_verts_ensure(BMesh *bm, BMEdge **edge_arr, BMVert **vert_arr, int len);
/**
* Makes an NGon from an un-ordered set of verts.
@@ -82,7 +82,7 @@ BMFace *BM_face_create_quad_tri(BMesh *bm,
BMVert *v3,
BMVert *v4,
const BMFace *f_example,
- const eBMCreateFlag create_flag);
+ eBMCreateFlag create_flag);
/**
* \brief copies face loop data from shared adjacent faces.
@@ -114,9 +114,9 @@ BMFace *BM_face_create_ngon(BMesh *bm,
BMVert *v1,
BMVert *v2,
BMEdge **edges,
- const int len,
+ int len,
const BMFace *f_example,
- const eBMCreateFlag create_flag);
+ eBMCreateFlag create_flag);
/**
* Create an ngon from an array of sorted verts
*
@@ -127,11 +127,11 @@ BMFace *BM_face_create_ngon(BMesh *bm,
*/
BMFace *BM_face_create_ngon_verts(BMesh *bm,
BMVert **vert_arr,
- const int len,
+ int len,
const BMFace *f_example,
- const eBMCreateFlag create_flag,
- const bool calc_winding,
- const bool create_edges);
+ eBMCreateFlag create_flag,
+ bool calc_winding,
+ bool create_edges);
/**
* Copies attributes, e.g. customdata, header flags, etc, from one element
@@ -141,8 +141,8 @@ void BM_elem_attrs_copy_ex(BMesh *bm_src,
BMesh *bm_dst,
const void *ele_src_v,
void *ele_dst_v,
- const char hflag_mask,
- const uint64_t cd_mask_exclude);
+ char hflag_mask,
+ uint64_t cd_mask_exclude);
void BM_elem_attrs_copy(BMesh *bm_src, BMesh *bm_dst, const void *ele_src_v, void *ele_dst_v);
void BM_elem_select_copy(BMesh *bm_dst, void *ele_dst_v, const void *ele_src_v);
@@ -163,14 +163,14 @@ void BM_mesh_copy_init_customdata(BMesh *bm_dst,
*/
void BM_mesh_copy_init_customdata_all_layers(BMesh *bm_dst,
BMesh *bm_src,
- const char htype,
+ char htype,
const struct BMAllocTemplate *allocsize);
BMesh *BM_mesh_copy(BMesh *bm_old);
-char BM_face_flag_from_mflag(const char mflag);
-char BM_edge_flag_from_mflag(const short mflag);
+char BM_face_flag_from_mflag(char mflag);
+char BM_edge_flag_from_mflag(short mflag);
/* ME -> BM */
-char BM_vert_flag_from_mflag(const char mflag);
+char BM_vert_flag_from_mflag(char mflag);
char BM_face_flag_to_mflag(BMFace *f);
short BM_edge_flag_to_mflag(BMEdge *e);
/* BM -> ME */
diff --git a/source/blender/bmesh/intern/bmesh_core.h b/source/blender/bmesh/intern/bmesh_core.h
index cd0e1754cd1..a885df51bd3 100644
--- a/source/blender/bmesh/intern/bmesh_core.h
+++ b/source/blender/bmesh/intern/bmesh_core.h
@@ -20,8 +20,7 @@
* \ingroup bmesh
*/
-BMFace *BM_face_copy(
- BMesh *bm_dst, BMesh *bm_src, BMFace *f, const bool copy_verts, const bool copy_edges);
+BMFace *BM_face_copy(BMesh *bm_dst, BMesh *bm_src, BMFace *f, bool copy_verts, bool copy_edges);
typedef enum eBMCreateFlag {
BM_CREATE_NOP = 0,
@@ -41,7 +40,7 @@ typedef enum eBMCreateFlag {
BMVert *BM_vert_create(BMesh *bm,
const float co[3],
const BMVert *v_example,
- const eBMCreateFlag create_flag);
+ eBMCreateFlag create_flag);
/**
* \brief Main function for creating a new edge.
*
@@ -50,7 +49,7 @@ BMVert *BM_vert_create(BMesh *bm,
* you should call with \a no_double = true.
*/
BMEdge *BM_edge_create(
- BMesh *bm, BMVert *v1, BMVert *v2, const BMEdge *e_example, const eBMCreateFlag create_flag);
+ BMesh *bm, BMVert *v1, BMVert *v2, const BMEdge *e_example, eBMCreateFlag create_flag);
/**
* Main face creation function
*
@@ -63,18 +62,18 @@ BMEdge *BM_edge_create(
BMFace *BM_face_create(BMesh *bm,
BMVert **verts,
BMEdge **edges,
- const int len,
+ int len,
const BMFace *f_example,
- const eBMCreateFlag create_flag);
+ eBMCreateFlag create_flag);
/**
* Wrapper for #BM_face_create when you don't have an edge array
*/
BMFace *BM_face_create_verts(BMesh *bm,
BMVert **vert_arr,
- const int len,
+ int len,
const BMFace *f_example,
- const eBMCreateFlag create_flag,
- const bool create_edges);
+ eBMCreateFlag create_flag,
+ bool create_edges);
/**
* Kills all edges associated with \a f, along with any other faces containing those edges.
@@ -147,8 +146,8 @@ bool BM_vert_splice_check_double(BMVert *v_a, BMVert *v_b);
*/
void bmesh_kernel_loop_reverse(BMesh *bm,
BMFace *f,
- const int cd_loop_mdisp_offset,
- const bool use_loop_mdisp_flip);
+ int cd_loop_mdisp_offset,
+ bool use_loop_mdisp_flip);
/**
* Avoid calling this where possible,
@@ -171,7 +170,7 @@ void bmesh_face_swap_data(BMFace *f_a, BMFace *f_b);
* \note this is a generic, flexible join faces function,
* almost everything uses this, including #BM_faces_join_pair
*/
-BMFace *BM_faces_join(BMesh *bm, BMFace **faces, int totface, const bool do_del);
+BMFace *BM_faces_join(BMesh *bm, BMFace **faces, int totface, bool do_del);
/**
* High level function which wraps both #bmesh_kernel_vert_separate and #bmesh_kernel_edge_separate
*/
@@ -179,18 +178,14 @@ void BM_vert_separate(BMesh *bm,
BMVert *v,
BMEdge **e_in,
int e_in_len,
- const bool copy_select,
+ bool copy_select,
BMVert ***r_vout,
int *r_vout_len);
/**
* A version of #BM_vert_separate which takes a flag.
*/
-void BM_vert_separate_hflag(BMesh *bm,
- BMVert *v,
- const char hflag,
- const bool copy_select,
- BMVert ***r_vout,
- int *r_vout_len);
+void BM_vert_separate_hflag(
+ BMesh *bm, BMVert *v, char hflag, bool copy_select, BMVert ***r_vout, int *r_vout_len);
void BM_vert_separate_tested_edges(
BMesh *bm, BMVert *v_dst, BMVert *v_src, bool (*testfn)(BMEdge *, void *arg), void *arg);
@@ -211,7 +206,7 @@ void BM_vert_separate_tested_edges(
* \return Success
*/
void bmesh_kernel_vert_separate(
- BMesh *bm, BMVert *v, BMVert ***r_vout, int *r_vout_len, const bool copy_select);
+ BMesh *bm, BMVert *v, BMVert ***r_vout, int *r_vout_len, bool copy_select);
/**
* \brief Separate Edge
*
@@ -223,7 +218,7 @@ void bmesh_kernel_vert_separate(
* \note Does nothing if \a l_sep is already the only loop in the
* edge radial.
*/
-void bmesh_kernel_edge_separate(BMesh *bm, BMEdge *e, BMLoop *l_sep, const bool copy_select);
+void bmesh_kernel_edge_separate(BMesh *bm, BMEdge *e, BMLoop *l_sep, bool copy_select);
/**
* \brief Split Face Make Edge (SFME)
@@ -272,7 +267,7 @@ BMFace *bmesh_kernel_split_face_make_edge(BMesh *bm,
ListBase *holes,
#endif
BMEdge *example,
- const bool no_double);
+ bool no_double);
/**
* \brief Split Edge Make Vert (SEMV)
@@ -326,10 +321,10 @@ BMVert *bmesh_kernel_split_edge_make_vert(BMesh *bm, BMVert *tv, BMEdge *e, BMEd
BMEdge *bmesh_kernel_join_edge_kill_vert(BMesh *bm,
BMEdge *e_kill,
BMVert *v_kill,
- const bool do_del,
- const bool check_edge_exists,
- const bool kill_degenerate_faces,
- const bool kill_duplicate_faces);
+ bool do_del,
+ bool check_edge_exists,
+ bool kill_degenerate_faces,
+ bool kill_duplicate_faces);
/**
* \brief Join Vert Kill Edge (JVKE)
*
@@ -351,9 +346,9 @@ BMEdge *bmesh_kernel_join_edge_kill_vert(BMesh *bm,
BMVert *bmesh_kernel_join_vert_kill_edge(BMesh *bm,
BMEdge *e_kill,
BMVert *v_kill,
- const bool do_del,
- const bool check_edge_exists,
- const bool kill_degenerate_faces);
+ bool do_del,
+ bool check_edge_exists,
+ bool kill_degenerate_faces);
/**
* \brief Join Face Kill Edge (JFKE)
*
diff --git a/source/blender/bmesh/intern/bmesh_delete.h b/source/blender/bmesh/intern/bmesh_delete.h
index 18e278a99fd..068c35f6dc7 100644
--- a/source/blender/bmesh/intern/bmesh_delete.h
+++ b/source/blender/bmesh/intern/bmesh_delete.h
@@ -20,16 +20,16 @@
* \ingroup bmesh
*/
-void BMO_mesh_delete_oflag_tagged(BMesh *bm, const short oflag, const char htype);
-void BM_mesh_delete_hflag_tagged(BMesh *bm, const char hflag, const char htype);
+void BMO_mesh_delete_oflag_tagged(BMesh *bm, short oflag, char htype);
+void BM_mesh_delete_hflag_tagged(BMesh *bm, char hflag, char htype);
/**
* \warning oflag applies to different types in some contexts,
* not just the type being removed.
*/
-void BMO_mesh_delete_oflag_context(BMesh *bm, const short oflag, const int type);
+void BMO_mesh_delete_oflag_context(BMesh *bm, short oflag, int type);
/**
* \warning oflag applies to different types in some contexts,
* not just the type being removed.
*/
-void BM_mesh_delete_hflag_context(BMesh *bm, const char hflag, const int type);
+void BM_mesh_delete_hflag_context(BMesh *bm, char hflag, int type);
diff --git a/source/blender/bmesh/intern/bmesh_edgeloop.h b/source/blender/bmesh/intern/bmesh_edgeloop.h
index 58b0d92fb72..9dc1e64dd46 100644
--- a/source/blender/bmesh/intern/bmesh_edgeloop.h
+++ b/source/blender/bmesh/intern/bmesh_edgeloop.h
@@ -48,16 +48,14 @@ void BM_mesh_edgeloops_calc_normal(BMesh *bm, struct ListBase *eloops);
void BM_mesh_edgeloops_calc_normal_aligned(BMesh *bm,
struct ListBase *eloops,
const float no_align[3]);
-void BM_mesh_edgeloops_calc_order(BMesh *bm, ListBase *eloops, const bool use_normals);
+void BM_mesh_edgeloops_calc_order(BMesh *bm, ListBase *eloops, bool use_normals);
/**
* Copy a single edge-loop.
* \return new edge-loops.
*/
struct BMEdgeLoopStore *BM_edgeloop_copy(struct BMEdgeLoopStore *el_store);
-struct BMEdgeLoopStore *BM_edgeloop_from_verts(BMVert **v_arr,
- const int v_arr_tot,
- bool is_closed);
+struct BMEdgeLoopStore *BM_edgeloop_from_verts(BMVert **v_arr, int v_arr_tot, bool is_closed);
void BM_edgeloop_free(struct BMEdgeLoopStore *el_store);
bool BM_edgeloop_is_closed(struct BMEdgeLoopStore *el_store);
diff --git a/source/blender/bmesh/intern/bmesh_interp.h b/source/blender/bmesh/intern/bmesh_interp.h
index d1a73509a4a..bf5b5bd09f4 100644
--- a/source/blender/bmesh/intern/bmesh_interp.h
+++ b/source/blender/bmesh/intern/bmesh_interp.h
@@ -28,7 +28,7 @@ void BM_loop_interp_multires_ex(BMesh *bm,
const BMFace *f_src,
const float f_dst_center[3],
const float f_src_center[3],
- const int cd_loop_mdisp_offset);
+ int cd_loop_mdisp_offset);
/**
* Project the multi-resolution grid in target onto f_src's set of multi-resolution grids.
*/
@@ -39,7 +39,7 @@ void BM_face_interp_multires_ex(BMesh *bm,
const BMFace *f_src,
const float f_dst_center[3],
const float f_src_center[3],
- const int cd_loop_mdisp_offset);
+ int cd_loop_mdisp_offset);
void BM_face_interp_multires(BMesh *bm, BMFace *f_dst, const BMFace *f_src);
void BM_vert_interp_from_face(BMesh *bm, BMVert *v_dst, const BMFace *f_src);
@@ -52,7 +52,7 @@ void BM_vert_interp_from_face(BMesh *bm, BMVert *v_dst, const BMFace *f_src);
* \note This is an exact match to #BM_data_interp_from_edges.
*/
void BM_data_interp_from_verts(
- BMesh *bm, const BMVert *v_src_1, const BMVert *v_src_2, BMVert *v_dst, const float fac);
+ BMesh *bm, const BMVert *v_src_1, const BMVert *v_src_2, BMVert *v_dst, float fac);
/**
* \brief Data, Interpolate From Edges
*
@@ -61,19 +61,15 @@ void BM_data_interp_from_verts(
* \note This is an exact match to #BM_data_interp_from_verts.
*/
void BM_data_interp_from_edges(
- BMesh *bm, const BMEdge *e_src_1, const BMEdge *e_src_2, BMEdge *e_dst, const float fac);
+ BMesh *bm, const BMEdge *e_src_1, const BMEdge *e_src_2, BMEdge *e_dst, float fac);
/**
* \brief Data Face-Vert Edge Interpolate
*
* Walks around the faces of \a e and interpolates
* the loop data between two sources.
*/
-void BM_data_interp_face_vert_edge(BMesh *bm,
- const BMVert *v_src_1,
- const BMVert *v_src_2,
- BMVert *v,
- BMEdge *e,
- const float fac);
+void BM_data_interp_face_vert_edge(
+ BMesh *bm, const BMVert *v_src_1, const BMVert *v_src_2, BMVert *v, BMEdge *e, float fac);
void BM_data_layer_add(BMesh *bm, CustomData *data, int type);
void BM_data_layer_add_named(BMesh *bm, CustomData *data, int type, const char *name);
void BM_data_layer_free(BMesh *bm, CustomData *data, int type);
@@ -81,7 +77,7 @@ void BM_data_layer_free_n(BMesh *bm, CustomData *data, int type, int n);
void BM_data_layer_copy(BMesh *bm, CustomData *data, int type, int src_n, int dst_n);
float BM_elem_float_data_get(CustomData *cd, void *element, int type);
-void BM_elem_float_data_set(CustomData *cd, void *element, int type, const float val);
+void BM_elem_float_data_set(CustomData *cd, void *element, int type, float val);
/**
* \brief Data Interpolate From Face
@@ -93,19 +89,19 @@ void BM_elem_float_data_set(CustomData *cd, void *element, int type, const float
void BM_face_interp_from_face_ex(BMesh *bm,
BMFace *f_dst,
const BMFace *f_src,
- const bool do_vertex,
+ bool do_vertex,
const void **blocks,
const void **blocks_v,
float (*cos_2d)[2],
float axis_mat[3][3]);
-void BM_face_interp_from_face(BMesh *bm, BMFace *f_dst, const BMFace *f_src, const bool do_vertex);
+void BM_face_interp_from_face(BMesh *bm, BMFace *f_dst, const BMFace *f_src, bool do_vertex);
/**
* Projects a single loop, target, onto f_src for custom-data interpolation.
* multi-resolution is handled.
* \param do_vertex: When true the target's vert data will also get interpolated.
*/
void BM_loop_interp_from_face(
- BMesh *bm, BMLoop *l_dst, const BMFace *f_src, const bool do_vertex, const bool do_multires);
+ BMesh *bm, BMLoop *l_dst, const BMFace *f_src, bool do_vertex, bool do_multires);
/**
* Smooths boundaries between multi-res grids,
@@ -114,16 +110,16 @@ void BM_loop_interp_from_face(
void BM_face_multires_bounds_smooth(BMesh *bm, BMFace *f);
struct LinkNode *BM_vert_loop_groups_data_layer_create(
- BMesh *bm, BMVert *v, const int layer_n, const float *loop_weights, struct MemArena *arena);
+ BMesh *bm, BMVert *v, int layer_n, const float *loop_weights, struct MemArena *arena);
/**
* Take existing custom data and merge each fan's data.
*/
-void BM_vert_loop_groups_data_layer_merge(BMesh *bm, struct LinkNode *groups, const int layer_n);
+void BM_vert_loop_groups_data_layer_merge(BMesh *bm, struct LinkNode *groups, int layer_n);
/**
* A version of #BM_vert_loop_groups_data_layer_merge
* that takes an array of loop-weights (aligned with #BM_LOOPS_OF_VERT iterator).
*/
void BM_vert_loop_groups_data_layer_merge_weights(BMesh *bm,
struct LinkNode *groups,
- const int layer_n,
+ int layer_n,
const float *loop_weights);
diff --git a/source/blender/bmesh/intern/bmesh_iterators.h b/source/blender/bmesh/intern/bmesh_iterators.h
index 12b3581b0a1..1c9b322ef75 100644
--- a/source/blender/bmesh/intern/bmesh_iterators.h
+++ b/source/blender/bmesh/intern/bmesh_iterators.h
@@ -188,14 +188,14 @@ typedef struct BMIter {
/**
* \note Use #BM_vert_at_index / #BM_edge_at_index / #BM_face_at_index for mesh arrays.
*/
-void *BM_iter_at_index(BMesh *bm, const char itype, void *data, int index) ATTR_WARN_UNUSED_RESULT;
+void *BM_iter_at_index(BMesh *bm, char itype, void *data, int index) ATTR_WARN_UNUSED_RESULT;
/**
* \brief Iterator as Array
*
* Sometimes its convenient to get the iterator as an array
* to avoid multiple calls to #BM_iter_at_index.
*/
-int BM_iter_as_array(BMesh *bm, const char itype, void *data, void **array, const int len);
+int BM_iter_as_array(BMesh *bm, char itype, void *data, void **array, int len);
/**
* \brief Iterator as Array
*
@@ -207,7 +207,7 @@ int BM_iter_as_array(BMesh *bm, const char itype, void *data, void **array, cons
* Caller needs to free the array.
*/
void *BM_iter_as_arrayN(BMesh *bm,
- const char itype,
+ char itype,
void *data,
int *r_len,
void **stack_array,
@@ -219,18 +219,18 @@ void *BM_iter_as_arrayN(BMesh *bm,
*/
int BMO_iter_as_array(BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
const char *slot_name,
- const char restrictmask,
+ char restrictmask,
void **array,
- const int len);
+ int len);
void *BMO_iter_as_arrayN(BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
const char *slot_name,
- const char restrictmask,
+ char restrictmask,
int *r_len,
/* optional args to avoid an alloc (normally stack array) */
void **stack_array,
int stack_array_size);
-int BM_iter_mesh_bitmap_from_filter(const char itype,
+int BM_iter_mesh_bitmap_from_filter(char itype,
BMesh *bm,
uint *bitmap,
bool (*test_fn)(BMElem *, void *user_data),
@@ -248,24 +248,23 @@ int BM_iter_mesh_bitmap_from_filter_tessface(BMesh *bm,
*
* Counts how many flagged / unflagged items are found in this element.
*/
-int BM_iter_elem_count_flag(const char itype, void *data, const char hflag, const bool value);
+int BM_iter_elem_count_flag(char itype, void *data, char hflag, bool value);
/**
* \brief Elem Iter Tool Flag Count
*
* Counts how many flagged / unflagged items are found in this element.
*/
-int BMO_iter_elem_count_flag(
- BMesh *bm, const char itype, void *data, const short oflag, const bool value);
+int BMO_iter_elem_count_flag(BMesh *bm, char itype, void *data, short oflag, bool value);
/**
* Utility function.
*/
-int BM_iter_mesh_count(const char itype, BMesh *bm);
+int BM_iter_mesh_count(char itype, BMesh *bm);
/**
* \brief Mesh Iter Flag Count
*
* Counts how many flagged / unflagged items are found in this mesh.
*/
-int BM_iter_mesh_count_flag(const char itype, BMesh *bm, const char hflag, const bool value);
+int BM_iter_mesh_count_flag(char itype, BMesh *bm, char hflag, bool value);
/* private for bmesh_iterators_inline.c */
diff --git a/source/blender/bmesh/intern/bmesh_log.h b/source/blender/bmesh/intern/bmesh_log.h
index c6df87168ee..1cc860beed1 100644
--- a/source/blender/bmesh/intern/bmesh_log.h
+++ b/source/blender/bmesh/intern/bmesh_log.h
@@ -119,7 +119,7 @@ void BM_log_redo(BMesh *bm, BMLog *log);
* state so that a subsequent redo operation will restore the newer
* vertex state.
*/
-void BM_log_vert_before_modified(BMLog *log, struct BMVert *v, const int cd_vert_mask_offset);
+void BM_log_vert_before_modified(BMLog *log, struct BMVert *v, int cd_vert_mask_offset);
/* Log a new vertex as added to the BMesh */
/* Log a new vertex as added to the BMesh
@@ -128,7 +128,7 @@ void BM_log_vert_before_modified(BMLog *log, struct BMVert *v, const int cd_vert
* of added vertices, with the key being its ID and the value
* containing everything needed to reconstruct that vertex.
*/
-void BM_log_vert_added(BMLog *log, struct BMVert *v, const int cd_vert_mask_offset);
+void BM_log_vert_added(BMLog *log, struct BMVert *v, int cd_vert_mask_offset);
/* Log a face before it is modified */
/* Log a face before it is modified
@@ -164,7 +164,7 @@ void BM_log_face_added(BMLog *log, struct BMFace *f);
* If there's a move record for the vertex, that's used as the
* vertices original location, then the move record is deleted.
*/
-void BM_log_vert_removed(BMLog *log, struct BMVert *v, const int cd_vert_mask_offset);
+void BM_log_vert_removed(BMLog *log, struct BMVert *v, int cd_vert_mask_offset);
/* Log a face as removed from the BMesh */
/* Log a face as removed from the BMesh
diff --git a/source/blender/bmesh/intern/bmesh_marking.h b/source/blender/bmesh/intern/bmesh_marking.h
index 72b520cc72c..01c3291b525 100644
--- a/source/blender/bmesh/intern/bmesh_marking.h
+++ b/source/blender/bmesh/intern/bmesh_marking.h
@@ -39,10 +39,10 @@ typedef enum eBMSelectionFlushFLags {
/* Geometry hiding code. */
#define BM_elem_hide_set(bm, ele, hide) _bm_elem_hide_set(bm, &(ele)->head, hide)
-void _bm_elem_hide_set(BMesh *bm, BMHeader *head, const bool hide);
-void BM_vert_hide_set(BMVert *v, const bool hide);
-void BM_edge_hide_set(BMEdge *e, const bool hide);
-void BM_face_hide_set(BMFace *f, const bool hide);
+void _bm_elem_hide_set(BMesh *bm, BMHeader *head, bool hide);
+void BM_vert_hide_set(BMVert *v, bool hide);
+void BM_edge_hide_set(BMEdge *e, bool hide);
+void BM_face_hide_set(BMFace *f, bool hide);
/* Selection code. */
@@ -50,29 +50,15 @@ void BM_face_hide_set(BMFace *f, const bool hide);
* \note use BM_elem_flag_test(ele, BM_ELEM_SELECT) to test selection
* \note by design, this will not touch the editselection history stuff
*/
-void BM_elem_select_set(BMesh *bm, BMElem *ele, const bool select);
-
-void BM_mesh_elem_hflag_enable_test(BMesh *bm,
- const char htype,
- const char hflag,
- const bool respecthide,
- const bool overwrite,
- const char hflag_test);
-void BM_mesh_elem_hflag_disable_test(BMesh *bm,
- const char htype,
- const char hflag,
- const bool respecthide,
- const bool overwrite,
- const char hflag_test);
-
-void BM_mesh_elem_hflag_enable_all(BMesh *bm,
- const char htype,
- const char hflag,
- const bool respecthide);
-void BM_mesh_elem_hflag_disable_all(BMesh *bm,
- const char htype,
- const char hflag,
- const bool respecthide);
+void BM_elem_select_set(BMesh *bm, BMElem *ele, bool select);
+
+void BM_mesh_elem_hflag_enable_test(
+ BMesh *bm, char htype, char hflag, bool respecthide, bool overwrite, char hflag_test);
+void BM_mesh_elem_hflag_disable_test(
+ BMesh *bm, char htype, char hflag, bool respecthide, bool overwrite, char hflag_test);
+
+void BM_mesh_elem_hflag_enable_all(BMesh *bm, char htype, char hflag, bool respecthide);
+void BM_mesh_elem_hflag_disable_all(BMesh *bm, char htype, char hflag, bool respecthide);
/* Individual element select functions, #BM_elem_select_set is a shortcut for these
* that automatically detects which one to use. */
@@ -83,25 +69,25 @@ void BM_mesh_elem_hflag_disable_all(BMesh *bm,
* Changes selection state of a single vertex
* in a mesh
*/
-void BM_vert_select_set(BMesh *bm, BMVert *v, const bool select);
+void BM_vert_select_set(BMesh *bm, BMVert *v, bool select);
/**
* \brief Select Edge
*
* Changes selection state of a single edge in a mesh.
*/
-void BM_edge_select_set(BMesh *bm, BMEdge *e, const bool select);
+void BM_edge_select_set(BMesh *bm, BMEdge *e, bool select);
/**
* \brief Select Face
*
* Changes selection state of a single
* face in a mesh.
*/
-void BM_face_select_set(BMesh *bm, BMFace *f, const bool select);
+void BM_face_select_set(BMesh *bm, BMFace *f, bool select);
/* Lower level functions which don't do flushing. */
-void BM_edge_select_set_noflush(BMesh *bm, BMEdge *e, const bool select);
-void BM_face_select_set_noflush(BMesh *bm, BMFace *f, const bool select);
+void BM_edge_select_set_noflush(BMesh *bm, BMEdge *e, bool select);
+void BM_face_select_set_noflush(BMesh *bm, BMFace *f, bool select);
/**
* \brief Select Mode Clean
@@ -111,7 +97,7 @@ void BM_face_select_set_noflush(BMesh *bm, BMFace *f, const bool select);
*
* \note this could be made a part of #BM_mesh_select_mode_flush_ex
*/
-void BM_mesh_select_mode_clean_ex(BMesh *bm, const short selectmode);
+void BM_mesh_select_mode_clean_ex(BMesh *bm, short selectmode);
void BM_mesh_select_mode_clean(BMesh *bm);
/**
@@ -128,7 +114,7 @@ void BM_mesh_select_mode_set(BMesh *bm, int selectmode);
* (ie: all verts of an edge selects the edge and so on).
* This should only be called by system and not tool authors.
*/
-void BM_mesh_select_mode_flush_ex(BMesh *bm, const short selectmode, eBMSelectionFlushFLags flags);
+void BM_mesh_select_mode_flush_ex(BMesh *bm, short selectmode, eBMSelectionFlushFLags flags);
void BM_mesh_select_mode_flush(BMesh *bm);
/**
@@ -140,19 +126,13 @@ void BM_mesh_deselect_flush(BMesh *bm);
*/
void BM_mesh_select_flush(BMesh *bm);
-int BM_mesh_elem_hflag_count_enabled(BMesh *bm,
- const char htype,
- const char hflag,
- const bool respecthide);
-int BM_mesh_elem_hflag_count_disabled(BMesh *bm,
- const char htype,
- const char hflag,
- const bool respecthide);
+int BM_mesh_elem_hflag_count_enabled(BMesh *bm, char htype, char hflag, bool respecthide);
+int BM_mesh_elem_hflag_count_disabled(BMesh *bm, char htype, char hflag, bool respecthide);
/* Edit selection stuff. */
void BM_mesh_active_face_set(BMesh *bm, BMFace *f);
-BMFace *BM_mesh_active_face_get(BMesh *bm, const bool is_sloppy, const bool is_selected);
+BMFace *BM_mesh_active_face_get(BMesh *bm, bool is_sloppy, bool is_selected);
BMEdge *BM_mesh_active_edge_get(BMesh *bm);
BMVert *BM_mesh_active_vert_get(BMesh *bm);
BMElem *BM_mesh_active_elem_get(BMesh *bm);
@@ -211,7 +191,7 @@ struct GHash *BM_select_history_map_create(BMesh *bm);
* Map arguments may all be the same pointer.
*/
void BM_select_history_merge_from_targetmap(
- BMesh *bm, GHash *vert_map, GHash *edge_map, GHash *face_map, const bool use_chain);
+ BMesh *bm, GHash *vert_map, GHash *edge_map, GHash *face_map, bool use_chain);
#define BM_SELECT_HISTORY_BACKUP(bm) \
{ \
diff --git a/source/blender/bmesh/intern/bmesh_mesh.h b/source/blender/bmesh/intern/bmesh_mesh.h
index e00461ba571..94615d558fa 100644
--- a/source/blender/bmesh/intern/bmesh_mesh.h
+++ b/source/blender/bmesh/intern/bmesh_mesh.h
@@ -74,14 +74,14 @@ void BM_mesh_clear(BMesh *bm);
* the editing operations are done. These are called by the tools/operator
* API for each time a tool is executed.
*/
-void bmesh_edit_begin(BMesh *bm, const BMOpTypeFlag type_flag);
+void bmesh_edit_begin(BMesh *bm, BMOpTypeFlag type_flag);
/**
* \brief BMesh End Edit
*/
-void bmesh_edit_end(BMesh *bm, const BMOpTypeFlag type_flag);
+void bmesh_edit_end(BMesh *bm, BMOpTypeFlag type_flag);
-void BM_mesh_elem_index_ensure_ex(BMesh *bm, const char htype, int elem_offset[4]);
-void BM_mesh_elem_index_ensure(BMesh *bm, const char htype);
+void BM_mesh_elem_index_ensure_ex(BMesh *bm, char htype, int elem_offset[4]);
+void BM_mesh_elem_index_ensure(BMesh *bm, char htype);
/**
* Array checking/setting macros.
*
@@ -109,10 +109,10 @@ bool BM_mesh_elem_table_check(BMesh *bm);
*/
void BM_mesh_toolflags_set(BMesh *bm, bool use_toolflags);
-void BM_mesh_elem_table_ensure(BMesh *bm, const char htype);
+void BM_mesh_elem_table_ensure(BMesh *bm, char htype);
/* use BM_mesh_elem_table_ensure where possible to avoid full rebuild */
-void BM_mesh_elem_table_init(BMesh *bm, const char htype);
-void BM_mesh_elem_table_free(BMesh *bm, const char htype);
+void BM_mesh_elem_table_init(BMesh *bm, char htype);
+void BM_mesh_elem_table_free(BMesh *bm, char htype);
BLI_INLINE BMVert *BM_vert_at_index(BMesh *bm, const int index)
{
@@ -133,26 +133,26 @@ BLI_INLINE BMFace *BM_face_at_index(BMesh *bm, const int index)
return bm->ftable[index];
}
-BMVert *BM_vert_at_index_find(BMesh *bm, const int index);
-BMEdge *BM_edge_at_index_find(BMesh *bm, const int index);
-BMFace *BM_face_at_index_find(BMesh *bm, const int index);
-BMLoop *BM_loop_at_index_find(BMesh *bm, const int index);
+BMVert *BM_vert_at_index_find(BMesh *bm, int index);
+BMEdge *BM_edge_at_index_find(BMesh *bm, int index);
+BMFace *BM_face_at_index_find(BMesh *bm, int index);
+BMLoop *BM_loop_at_index_find(BMesh *bm, int index);
/**
* Use lookup table when available, else use slower find functions.
*
* \note Try to use #BM_mesh_elem_table_ensure instead.
*/
-BMVert *BM_vert_at_index_find_or_table(BMesh *bm, const int index);
-BMEdge *BM_edge_at_index_find_or_table(BMesh *bm, const int index);
-BMFace *BM_face_at_index_find_or_table(BMesh *bm, const int index);
+BMVert *BM_vert_at_index_find_or_table(BMesh *bm, int index);
+BMEdge *BM_edge_at_index_find_or_table(BMesh *bm, int index);
+BMFace *BM_face_at_index_find_or_table(BMesh *bm, int index);
// XXX
/**
* Return the amount of element of type 'type' in a given bmesh.
*/
-int BM_mesh_elem_count(BMesh *bm, const char htype);
+int BM_mesh_elem_count(BMesh *bm, char htype);
/**
* Remaps the vertices, edges and/or faces of the bmesh as indicated by vert/edge/face_idx arrays
diff --git a/source/blender/bmesh/intern/bmesh_mesh_convert.h b/source/blender/bmesh/intern/bmesh_mesh_convert.h
index ea114487285..07ffc8b43df 100644
--- a/source/blender/bmesh/intern/bmesh_mesh_convert.h
+++ b/source/blender/bmesh/intern/bmesh_mesh_convert.h
@@ -29,8 +29,8 @@ struct CustomData_MeshMasks;
struct Main;
struct Mesh;
-void BM_mesh_cd_flag_ensure(BMesh *bm, struct Mesh *mesh, const char cd_flag);
-void BM_mesh_cd_flag_apply(BMesh *bm, const char cd_flag);
+void BM_mesh_cd_flag_ensure(BMesh *bm, struct Mesh *mesh, char cd_flag);
+void BM_mesh_cd_flag_apply(BMesh *bm, char cd_flag);
char BM_mesh_cd_flag_from_bmesh(BMesh *bm);
struct BMeshFromMeshParams {
diff --git a/source/blender/bmesh/intern/bmesh_mesh_normals.h b/source/blender/bmesh/intern/bmesh_mesh_normals.h
index a2e64b1dc9b..d9b9a88b10d 100644
--- a/source/blender/bmesh/intern/bmesh_mesh_normals.h
+++ b/source/blender/bmesh/intern/bmesh_mesh_normals.h
@@ -67,13 +67,13 @@ void BM_loops_calc_normal_vcos(BMesh *bm,
const float (*vcos)[3],
const float (*vnos)[3],
const float (*fnos)[3],
- const bool use_split_normals,
- const float split_angle,
+ bool use_split_normals,
+ float split_angle,
float (*r_lnos)[3],
struct MLoopNorSpaceArray *r_lnors_spacearr,
short (*clnors_data)[2],
- const int cd_loop_clnors_offset,
- const bool do_rebuild);
+ int cd_loop_clnors_offset,
+ bool do_rebuild);
/**
* Check whether given loop is part of an unknown-so-far cyclic smooth fan, or not.
@@ -82,21 +82,21 @@ void BM_loops_calc_normal_vcos(BMesh *bm,
*/
bool BM_loop_check_cyclic_smooth_fan(BMLoop *l_curr);
void BM_lnorspacearr_store(BMesh *bm, float (*r_lnors)[3]);
-void BM_lnorspace_invalidate(BMesh *bm, const bool do_invalidate_all);
+void BM_lnorspace_invalidate(BMesh *bm, bool do_invalidate_all);
void BM_lnorspace_rebuild(BMesh *bm, bool preserve_clnor);
/**
* \warning This function sets #BM_ELEM_TAG on loops & edges via #bm_mesh_loops_calc_normals,
* take care to run this before setting up tags.
*/
void BM_lnorspace_update(BMesh *bm);
-void BM_normals_loops_edges_tag(BMesh *bm, const bool do_edges);
+void BM_normals_loops_edges_tag(BMesh *bm, bool do_edges);
#ifndef NDEBUG
void BM_lnorspace_err(BMesh *bm);
#endif
/* Loop Generics */
struct BMLoopNorEditDataArray *BM_loop_normal_editdata_array_init(BMesh *bm,
- const bool do_all_loops_of_vert);
+ bool do_all_loops_of_vert);
void BM_loop_normal_editdata_array_free(struct BMLoopNorEditDataArray *lnors_ed_arr);
/**
@@ -112,4 +112,4 @@ void BM_custom_loop_normals_from_vector_layer(struct BMesh *bm, bool add_sharp_e
* Used when defining an empty custom loop normals data layer,
* to keep same shading as with auto-smooth!
*/
-void BM_edges_sharp_from_angle_set(BMesh *bm, const float split_angle);
+void BM_edges_sharp_from_angle_set(BMesh *bm, float split_angle);
diff --git a/source/blender/bmesh/intern/bmesh_mesh_partial_update.h b/source/blender/bmesh/intern/bmesh_mesh_partial_update.h
index 57f57053606..a280acb4624 100644
--- a/source/blender/bmesh/intern/bmesh_mesh_partial_update.h
+++ b/source/blender/bmesh/intern/bmesh_mesh_partial_update.h
@@ -59,7 +59,7 @@ typedef struct BMPartialUpdate {
BMPartialUpdate *BM_mesh_partial_create_from_verts(BMesh *bm,
const BMPartialUpdate_Params *params,
const unsigned int *verts_mask,
- const int verts_mask_count)
+ int verts_mask_count)
ATTR_NONNULL(1, 2, 3) ATTR_WARN_UNUSED_RESULT;
/**
@@ -71,7 +71,7 @@ BMPartialUpdate *BM_mesh_partial_create_from_verts_group_single(
BMesh *bm,
const BMPartialUpdate_Params *params,
const unsigned int *verts_mask,
- const int verts_mask_count) ATTR_NONNULL(1, 2, 3) ATTR_WARN_UNUSED_RESULT;
+ int verts_mask_count) ATTR_NONNULL(1, 2, 3) ATTR_WARN_UNUSED_RESULT;
/**
* All Connected, operate on all faces that have vertices in the same group.
@@ -93,9 +93,7 @@ BMPartialUpdate *BM_mesh_partial_create_from_verts_group_single(
* \param verts_group_count: The number of non-zero values in `verts_groups`.
*/
BMPartialUpdate *BM_mesh_partial_create_from_verts_group_multi(
- BMesh *bm,
- const BMPartialUpdate_Params *params,
- const int *verts_group,
- const int verts_group_count) ATTR_NONNULL(1, 2, 3) ATTR_WARN_UNUSED_RESULT;
+ BMesh *bm, const BMPartialUpdate_Params *params, const int *verts_group, int verts_group_count)
+ ATTR_NONNULL(1, 2, 3) ATTR_WARN_UNUSED_RESULT;
void BM_mesh_partial_destroy(BMPartialUpdate *bmpinfo) ATTR_NONNULL(1);
diff --git a/source/blender/bmesh/intern/bmesh_mods.h b/source/blender/bmesh/intern/bmesh_mods.h
index f4a5a0bce33..4e8a8a14a6a 100644
--- a/source/blender/bmesh/intern/bmesh_mods.h
+++ b/source/blender/bmesh/intern/bmesh_mods.h
@@ -65,7 +65,7 @@ bool BM_disk_dissolve(BMesh *bm, BMVert *v);
*
* \return The combined face or NULL on failure.
*/
-BMFace *BM_faces_join_pair(BMesh *bm, BMLoop *l_a, BMLoop *l_b, const bool do_del);
+BMFace *BM_faces_join_pair(BMesh *bm, BMLoop *l_a, BMLoop *l_b, bool do_del);
/** see: bmesh_polygon_edgenet.h for #BM_face_split_edgenet */
@@ -87,13 +87,8 @@ BMFace *BM_faces_join_pair(BMesh *bm, BMLoop *l_a, BMLoop *l_b, const bool do_de
* if the split is successful (and the original face will be the other side).
* NULL if the split fails.
*/
-BMFace *BM_face_split(BMesh *bm,
- BMFace *f,
- BMLoop *l_a,
- BMLoop *l_b,
- BMLoop **r_l,
- BMEdge *example,
- const bool no_double);
+BMFace *BM_face_split(
+ BMesh *bm, BMFace *f, BMLoop *l_a, BMLoop *l_b, BMLoop **r_l, BMEdge *example, bool no_double);
/**
* \brief Face Split with intermediate points
@@ -149,10 +144,10 @@ BMEdge *BM_vert_collapse_faces(BMesh *bm,
BMEdge *e_kill,
BMVert *v_kill,
float fac,
- const bool do_del,
- const bool join_faces,
- const bool kill_degenerate_faces,
- const bool kill_duplicate_faces);
+ bool do_del,
+ bool join_faces,
+ bool kill_degenerate_faces,
+ bool kill_duplicate_faces);
/**
* \brief Vert Collapse Faces
*
@@ -163,18 +158,15 @@ BMEdge *BM_vert_collapse_faces(BMesh *bm,
BMEdge *BM_vert_collapse_edge(BMesh *bm,
BMEdge *e_kill,
BMVert *v_kill,
- const bool do_del,
- const bool kill_degenerate_faces,
- const bool kill_duplicate_faces);
+ bool do_del,
+ bool kill_degenerate_faces,
+ bool kill_duplicate_faces);
/**
* Collapse and edge into a single vertex.
*/
-BMVert *BM_edge_collapse(BMesh *bm,
- BMEdge *e_kill,
- BMVert *v_kill,
- const bool do_del,
- const bool kill_degenerate_faces);
+BMVert *BM_edge_collapse(
+ BMesh *bm, BMEdge *e_kill, BMVert *v_kill, bool do_del, bool kill_degenerate_faces);
/**
* \brief Edge Split
@@ -227,7 +219,7 @@ bool BM_face_validate(BMFace *face, FILE *err);
*
* \note #BM_edge_rotate_check must have already run.
*/
-void BM_edge_calc_rotate(BMEdge *e, const bool ccw, BMLoop **r_l1, BMLoop **r_l2);
+void BM_edge_calc_rotate(BMEdge *e, bool ccw, BMLoop **r_l1, BMLoop **r_l2);
/**
* \brief Check if Rotate Edge is OK
*
@@ -262,7 +254,7 @@ bool BM_edge_rotate_check_beauty(BMEdge *e, BMLoop *l1, BMLoop *l2);
*
* \see header definition for \a check_flag enum.
*/
-BMEdge *BM_edge_rotate(BMesh *bm, BMEdge *e, const bool ccw, const short check_flag);
+BMEdge *BM_edge_rotate(BMesh *bm, BMEdge *e, bool ccw, short check_flag);
/** Flags for #BM_edge_rotate */
enum {
diff --git a/source/blender/bmesh/intern/bmesh_operator_api.h b/source/blender/bmesh/intern/bmesh_operator_api.h
index de974587311..ef3c2cf8f17 100644
--- a/source/blender/bmesh/intern/bmesh_operator_api.h
+++ b/source/blender/bmesh/intern/bmesh_operator_api.h
@@ -185,12 +185,12 @@ BLI_INLINE BMFlagLayer *BMO_elem_flag_from_header(BMHeader *ele_head)
_bmo_elem_flag_set(bm, _BMO_CAST_F(e)->oflags, oflag, val)
#define BMO_face_flag_toggle(bm, e, oflag) _bmo_elem_flag_toggle(bm, _BMO_CAST_F(e)->oflags, oflag)
-BLI_INLINE short _bmo_elem_flag_test(BMesh *bm, const BMFlagLayer *oflags, const short oflag);
-BLI_INLINE bool _bmo_elem_flag_test_bool(BMesh *bm, const BMFlagLayer *oflags, const short oflag);
-BLI_INLINE void _bmo_elem_flag_enable(BMesh *bm, BMFlagLayer *oflags, const short oflag);
-BLI_INLINE void _bmo_elem_flag_disable(BMesh *bm, BMFlagLayer *oflags, const short oflag);
-BLI_INLINE void _bmo_elem_flag_set(BMesh *bm, BMFlagLayer *oflags, const short oflag, int val);
-BLI_INLINE void _bmo_elem_flag_toggle(BMesh *bm, BMFlagLayer *oflags, const short oflag);
+BLI_INLINE short _bmo_elem_flag_test(BMesh *bm, const BMFlagLayer *oflags, short oflag);
+BLI_INLINE bool _bmo_elem_flag_test_bool(BMesh *bm, const BMFlagLayer *oflags, short oflag);
+BLI_INLINE void _bmo_elem_flag_enable(BMesh *bm, BMFlagLayer *oflags, short oflag);
+BLI_INLINE void _bmo_elem_flag_disable(BMesh *bm, BMFlagLayer *oflags, short oflag);
+BLI_INLINE void _bmo_elem_flag_set(BMesh *bm, BMFlagLayer *oflags, short oflag, int val);
+BLI_INLINE void _bmo_elem_flag_toggle(BMesh *bm, BMFlagLayer *oflags, short oflag);
/* slot type arrays are terminated by the last member
* having a slot type of 0 */
@@ -353,7 +353,7 @@ typedef struct BMOpDefine {
*
* Initializes an operator structure to a certain type
*/
-void BMO_op_init(BMesh *bm, BMOperator *op, const int flag, const char *opname);
+void BMO_op_init(BMesh *bm, BMOperator *op, int flag, const char *opname);
/**
* \brief BMESH OPSTACK EXEC OP
@@ -379,13 +379,13 @@ void BMO_op_finish(BMesh *bm, BMOperator *op);
* Count the number of elements with the specified flag enabled.
* type can be a bit-mask of #BM_FACE, #BM_EDGE, or #BM_FACE.
*/
-int BMO_mesh_enabled_flag_count(BMesh *bm, const char htype, const short oflag);
+int BMO_mesh_enabled_flag_count(BMesh *bm, char htype, short oflag);
/**
* Count the number of elements with the specified flag disabled.
* type can be a bit-mask of #BM_FACE, #BM_EDGE, or #BM_FACE.
*/
-int BMO_mesh_disabled_flag_count(BMesh *bm, const char htype, const short oflag);
+int BMO_mesh_disabled_flag_count(BMesh *bm, char htype, short oflag);
/**
* \brief BMESH OPSTACK PUSH
@@ -462,20 +462,20 @@ void BMO_pop(BMesh *bm);
* \{ */
/** Executes an operator. */
-bool BMO_op_callf(BMesh *bm, const int flag, const char *fmt, ...);
+bool BMO_op_callf(BMesh *bm, int flag, const char *fmt, ...);
/**
* Initializes, but doesn't execute an operator. this is so you can
* gain access to the outputs of the operator. note that you have
* to execute/finish (BMO_op_exec and BMO_op_finish) yourself.
*/
-bool BMO_op_initf(BMesh *bm, BMOperator *op, const int flag, const char *fmt, ...);
+bool BMO_op_initf(BMesh *bm, BMOperator *op, int flag, const char *fmt, ...);
/**
* A `va_list` version, used to implement the above two functions,
* plus #EDBM_op_callf in editmesh_utils.c.
*/
-bool BMO_op_vinitf(BMesh *bm, BMOperator *op, const int flag, const char *fmt, va_list vlist);
+bool BMO_op_vinitf(BMesh *bm, BMOperator *op, int flag, const char *fmt, va_list vlist);
/** \} */
@@ -549,20 +549,18 @@ typedef enum {
BMO_DELIM_UV = 1 << 4,
} BMO_Delimit;
-void BMO_op_flag_enable(BMesh *bm, BMOperator *op, const int op_flag);
-void BMO_op_flag_disable(BMesh *bm, BMOperator *op, const int op_flag);
+void BMO_op_flag_enable(BMesh *bm, BMOperator *op, int op_flag);
+void BMO_op_flag_disable(BMesh *bm, BMOperator *op, int op_flag);
/* -------------------------------------------------------------------- */
/** \name BMesh Operator Slot Get/Set
* \{ */
-void BMO_slot_float_set(BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
- const char *slot_name,
- const float f);
+void BMO_slot_float_set(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, float f);
float BMO_slot_float_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name);
-void BMO_slot_int_set(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const int i);
+void BMO_slot_int_set(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, int i);
int BMO_slot_int_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name);
-void BMO_slot_bool_set(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const bool i);
+void BMO_slot_bool_set(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, bool i);
bool BMO_slot_bool_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name);
/**
* Return a copy of the element buffer.
@@ -602,13 +600,13 @@ void BMO_slot_mat3_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
/** \} */
-void BMO_mesh_flag_disable_all(BMesh *bm, BMOperator *op, const char htype, const short oflag);
+void BMO_mesh_flag_disable_all(BMesh *bm, BMOperator *op, char htype, short oflag);
void BMO_mesh_selected_remap(BMesh *bm,
BMOpSlot *slot_vert_map,
BMOpSlot *slot_edge_map,
BMOpSlot *slot_face_map,
- const bool check_select);
+ bool check_select);
/**
* Copies the values from another slot to the end of the output slot.
@@ -633,8 +631,8 @@ void BMO_slot_buffer_from_enabled_flag(BMesh *bm,
BMOperator *op,
BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
const char *slot_name,
- const char htype,
- const short oflag);
+ char htype,
+ short oflag);
/**
* Puts every element of type 'type' (which is a bit-mask) without tool flag 'flag', into a slot.
@@ -643,8 +641,8 @@ void BMO_slot_buffer_from_disabled_flag(BMesh *bm,
BMOperator *op,
BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
const char *slot_name,
- const char htype,
- const short oflag);
+ char htype,
+ short oflag);
/**
* \brief BMO_FLAG_BUFFER
@@ -654,8 +652,8 @@ void BMO_slot_buffer_from_disabled_flag(BMesh *bm,
void BMO_slot_buffer_flag_enable(BMesh *bm,
BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
const char *slot_name,
- const char htype,
- const short oflag);
+ char htype,
+ short oflag);
/**
* \brief BMO_FLAG_BUFFER
*
@@ -664,8 +662,8 @@ void BMO_slot_buffer_flag_enable(BMesh *bm,
void BMO_slot_buffer_flag_disable(BMesh *bm,
BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
const char *slot_name,
- const char htype,
- const short oflag);
+ char htype,
+ short oflag);
/**
* \brief BMO_FLAG_BUFFER
@@ -676,9 +674,9 @@ void BMO_slot_buffer_flag_disable(BMesh *bm,
void BMO_slot_buffer_hflag_enable(BMesh *bm,
BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
const char *slot_name,
- const char htype,
- const char hflag,
- const bool do_flush);
+ char htype,
+ char hflag,
+ bool do_flush);
/**
* \brief BMO_FLAG_BUFFER
*
@@ -688,9 +686,9 @@ void BMO_slot_buffer_hflag_enable(BMesh *bm,
void BMO_slot_buffer_hflag_disable(BMesh *bm,
BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
const char *slot_name,
- const char htype,
- const char hflag,
- const bool do_flush);
+ char htype,
+ char hflag,
+ bool do_flush);
/**
* Puts every element of type 'type' (which is a bit-mask) with header flag 'flag', into a slot.
@@ -700,8 +698,8 @@ void BMO_slot_buffer_from_enabled_hflag(BMesh *bm,
BMOperator *op,
BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
const char *slot_name,
- const char htype,
- const char hflag);
+ char htype,
+ char hflag);
/**
* Puts every element of type 'type' (which is a bit-mask) without header flag 'flag', into a slot.
* \note ignores hidden elements (e.g. elements with header flag BM_ELEM_HIDDEN set).
@@ -710,8 +708,8 @@ void BMO_slot_buffer_from_disabled_hflag(BMesh *bm,
BMOperator *op,
BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
const char *slot_name,
- const char htype,
- const char hflag);
+ char htype,
+ char hflag);
void BMO_slot_buffer_from_array(BMOperator *op,
BMOpSlot *slot,
@@ -739,13 +737,13 @@ void BMO_slot_map_insert(BMOperator *op, BMOpSlot *slot, const void *element, co
void BMO_slot_map_to_flag(BMesh *bm,
BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
const char *slot_name,
- const char htype,
- const short oflag);
+ char htype,
+ short oflag);
void *BMO_slot_buffer_alloc(BMOperator *op,
BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
const char *slot_name,
- const int len);
+ int len);
/**
* \brief BMO_ALL_TO_SLOT
@@ -756,7 +754,7 @@ void BMO_slot_buffer_from_all(BMesh *bm,
BMOperator *op,
BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
const char *slot_name,
- const char htype);
+ char htype);
/**
* This part of the API is used to iterate over element buffer or
@@ -815,7 +813,7 @@ void *BMO_slot_buffer_get_first(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char
void *BMO_iter_new(BMOIter *iter,
BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
const char *slot_name,
- const char restrictmask);
+ char restrictmask);
void *BMO_iter_step(BMOIter *iter);
/**
diff --git a/source/blender/bmesh/intern/bmesh_operators.h b/source/blender/bmesh/intern/bmesh_operators.h
index 83f2c402c35..e5ede75f737 100644
--- a/source/blender/bmesh/intern/bmesh_operators.h
+++ b/source/blender/bmesh/intern/bmesh_operators.h
@@ -156,19 +156,19 @@ extern const int bmo_opdefines_total;
/*------specific operator helper functions-------*/
void BM_mesh_esubdivide(BMesh *bm,
- const char edge_hflag,
- const float smooth,
- const short smooth_falloff,
- const bool use_smooth_even,
- const float fractal,
- const float along_normal,
- const int numcuts,
- const int seltype,
- const int cornertype,
- const short use_single_edge,
- const short use_grid_fill,
- const short use_only_quads,
- const int seed);
+ char edge_hflag,
+ float smooth,
+ short smooth_falloff,
+ bool use_smooth_even,
+ float fractal,
+ float along_normal,
+ int numcuts,
+ int seltype,
+ int cornertype,
+ short use_single_edge,
+ short use_grid_fill,
+ short use_only_quads,
+ int seed);
/**
* Fills first available UV-map with grid-like UV's for all faces with `oflag` set.
@@ -178,18 +178,15 @@ void BM_mesh_esubdivide(BMesh *bm,
* \param y_segments: The y-resolution of the grid
* \param oflag: The flag to check faces with.
*/
-void BM_mesh_calc_uvs_grid(BMesh *bm,
- const uint x_segments,
- const uint y_segments,
- const short oflag,
- const int cd_loop_uv_offset);
+void BM_mesh_calc_uvs_grid(
+ BMesh *bm, uint x_segments, uint y_segments, short oflag, int cd_loop_uv_offset);
/**
* Fills first available UV-map with spherical projected UVs for all faces with `oflag` set.
*
* \param bm: The BMesh to operate on
* \param oflag: The flag to check faces with.
*/
-void BM_mesh_calc_uvs_sphere(BMesh *bm, const short oflag, const int cd_loop_uv_offset);
+void BM_mesh_calc_uvs_sphere(BMesh *bm, short oflag, int cd_loop_uv_offset);
/**
* Fills first available UV-map with 2D projected UVs for all faces with `oflag` set.
*
@@ -198,11 +195,8 @@ void BM_mesh_calc_uvs_sphere(BMesh *bm, const short oflag, const int cd_loop_uv_
* \param radius: The size of the circle.
* \param oflag: The flag to check faces with.
*/
-void BM_mesh_calc_uvs_circle(BMesh *bm,
- float mat[4][4],
- const float radius,
- const short oflag,
- const int cd_loop_uv_offset);
+void BM_mesh_calc_uvs_circle(
+ BMesh *bm, float mat[4][4], float radius, short oflag, int cd_loop_uv_offset);
/**
* Fills first available UV-map with cylinder/cone-like UVs for all faces with `oflag` set.
*
@@ -216,12 +210,12 @@ void BM_mesh_calc_uvs_circle(BMesh *bm,
*/
void BM_mesh_calc_uvs_cone(BMesh *bm,
float mat[4][4],
- const float radius_top,
- const float radius_bottom,
- const int segments,
- const bool cap_ends,
- const short oflag,
- const int cd_loop_uv_offset);
+ float radius_top,
+ float radius_bottom,
+ int segments,
+ bool cap_ends,
+ short oflag,
+ int cd_loop_uv_offset);
/**
* Fills first available UV-map with cube-like UVs for all faces with `oflag` set.
*
@@ -231,6 +225,6 @@ void BM_mesh_calc_uvs_cone(BMesh *bm,
* \param bm: The BMesh to operate on.
* \param oflag: The flag to check faces with.
*/
-void BM_mesh_calc_uvs_cube(BMesh *bm, const short oflag);
+void BM_mesh_calc_uvs_cube(BMesh *bm, short oflag);
#include "intern/bmesh_operator_api_inline.h"
diff --git a/source/blender/bmesh/intern/bmesh_polygon.h b/source/blender/bmesh/intern/bmesh_polygon.h
index e4545e610a0..2123410c738 100644
--- a/source/blender/bmesh/intern/bmesh_polygon.h
+++ b/source/blender/bmesh/intern/bmesh_polygon.h
@@ -35,7 +35,7 @@ struct Heap;
* \param r_index: Store triangle triples, indices into \a r_loops, `((f->len - 2) * 3)`
*/
void BM_face_calc_tessellation(const BMFace *f,
- const bool use_fixed_quad,
+ bool use_fixed_quad,
BMLoop **r_loops,
uint (*r_index)[3]);
/**
@@ -164,7 +164,7 @@ void BM_face_normal_update(BMFace *f) ATTR_NONNULL();
*/
void BM_edge_normals_update(BMEdge *e) ATTR_NONNULL();
-bool BM_vert_calc_normal_ex(const BMVert *v, const char hflag, float r_no[3]);
+bool BM_vert_calc_normal_ex(const BMVert *v, char hflag, float r_no[3]);
bool BM_vert_calc_normal(const BMVert *v, float r_no[3]);
/**
* update a vert normal (but not the faces incident on it)
@@ -180,8 +180,8 @@ void BM_vert_normal_update_all(BMVert *v) ATTR_NONNULL();
*/
void BM_face_normal_flip_ex(BMesh *bm,
BMFace *f,
- const int cd_loop_mdisp_offset,
- const bool use_loop_mdisp_flip) ATTR_NONNULL();
+ int cd_loop_mdisp_offset,
+ bool use_loop_mdisp_flip) ATTR_NONNULL();
void BM_face_normal_flip(BMesh *bm, BMFace *f) ATTR_NONNULL();
/**
* BM POINT IN FACE
@@ -226,9 +226,9 @@ void BM_face_triangulate(BMesh *bm,
BMEdge **r_edges_new,
int *r_edges_new_tot,
struct LinkNode **r_faces_double,
- const int quad_method,
- const int ngon_method,
- const bool use_tag,
+ int quad_method,
+ int ngon_method,
+ bool use_tag,
struct MemArena *pf_arena,
struct Heap *pf_heap) ATTR_NONNULL(1, 2);
diff --git a/source/blender/bmesh/intern/bmesh_polygon_edgenet.h b/source/blender/bmesh/intern/bmesh_polygon_edgenet.h
index a25f38a84b3..626df9fb46a 100644
--- a/source/blender/bmesh/intern/bmesh_polygon_edgenet.h
+++ b/source/blender/bmesh/intern/bmesh_polygon_edgenet.h
@@ -31,7 +31,7 @@
bool BM_face_split_edgenet(BMesh *bm,
BMFace *f,
BMEdge **edge_net,
- const int edge_net_len,
+ int edge_net_len,
BMFace ***r_face_arr,
int *r_face_arr_len);
@@ -46,7 +46,7 @@ bool BM_face_split_edgenet(BMesh *bm,
bool BM_face_split_edgenet_connect_islands(BMesh *bm,
BMFace *f,
BMEdge **edge_net_init,
- const uint edge_net_init_len,
+ uint edge_net_init_len,
bool use_partial_connect,
struct MemArena *mem_arena,
BMEdge ***r_edge_net_new,
diff --git a/source/blender/bmesh/intern/bmesh_private.h b/source/blender/bmesh/intern/bmesh_private.h
index e7e8b7107e5..977142578ca 100644
--- a/source/blender/bmesh/intern/bmesh_private.h
+++ b/source/blender/bmesh/intern/bmesh_private.h
@@ -40,7 +40,7 @@
* BMESH_TODO, when this raises an error the output is incredibly confusing.
* need to have some nice way to print/debug what the heck's going on.
*/
-int bmesh_elem_check(void *element, const char htype);
+int bmesh_elem_check(void *element, char htype);
# define BM_CHECK_ELEMENT(el) \
{ \
if (bmesh_elem_check(el, ((BMHeader *)el)->htype)) { \
@@ -56,7 +56,7 @@ int bmesh_elem_check(void *element, const char htype);
#endif
int bmesh_radial_length(const BMLoop *l);
-int bmesh_disk_count_at_most(const BMVert *v, const int count_max);
+int bmesh_disk_count_at_most(const BMVert *v, int count_max);
int bmesh_disk_count(const BMVert *v);
/**
@@ -98,7 +98,7 @@ enum {
* Rotates a polygon so that its
* normal is pointing towards the mesh Z axis
*/
-void poly_rotate_plane(const float normal[3], float (*verts)[3], const uint nverts);
+void poly_rotate_plane(const float normal[3], float (*verts)[3], uint nverts);
/* include the rest of our private declarations */
#include "bmesh_structure.h"
diff --git a/source/blender/bmesh/intern/bmesh_query.h b/source/blender/bmesh/intern/bmesh_query.h
index 48a1d100c72..63ce95a19d3 100644
--- a/source/blender/bmesh/intern/bmesh_query.h
+++ b/source/blender/bmesh/intern/bmesh_query.h
@@ -226,7 +226,7 @@ bool BM_vert_pair_share_face_check_cb(BMVert *v_a,
ATTR_NONNULL(1, 2, 3);
BMFace *BM_vert_pair_shared_face_cb(BMVert *v_a,
BMVert *v_b,
- const bool allow_adjacent,
+ bool allow_adjacent,
bool (*callback)(BMFace *, BMLoop *, BMLoop *, void *userdata),
void *user_data,
BMLoop **r_l_a,
@@ -234,11 +234,8 @@ BMFace *BM_vert_pair_shared_face_cb(BMVert *v_a,
/**
* Given 2 verts, find the smallest face they share and give back both loops.
*/
-BMFace *BM_vert_pair_share_face_by_len(BMVert *v_a,
- BMVert *v_b,
- BMLoop **r_l_a,
- BMLoop **r_l_b,
- const bool allow_adjacent) ATTR_NONNULL();
+BMFace *BM_vert_pair_share_face_by_len(
+ BMVert *v_a, BMVert *v_b, BMLoop **r_l_a, BMLoop **r_l_b, bool allow_adjacent) ATTR_NONNULL();
/**
* Given 2 verts,
* find a face they share that has the lowest angle across these verts and give back both loops.
@@ -246,22 +243,16 @@ BMFace *BM_vert_pair_share_face_by_len(BMVert *v_a,
* This can be better than #BM_vert_pair_share_face_by_len
* because concave splits are ranked lowest.
*/
-BMFace *BM_vert_pair_share_face_by_angle(BMVert *v_a,
- BMVert *v_b,
- BMLoop **r_l_a,
- BMLoop **r_l_b,
- const bool allow_adjacent) ATTR_NONNULL();
+BMFace *BM_vert_pair_share_face_by_angle(
+ BMVert *v_a, BMVert *v_b, BMLoop **r_l_a, BMLoop **r_l_b, bool allow_adjacent) ATTR_NONNULL();
-BMFace *BM_edge_pair_share_face_by_len(BMEdge *e_a,
- BMEdge *e_b,
- BMLoop **r_l_a,
- BMLoop **r_l_b,
- const bool allow_adjacent) ATTR_NONNULL();
+BMFace *BM_edge_pair_share_face_by_len(
+ BMEdge *e_a, BMEdge *e_b, BMLoop **r_l_a, BMLoop **r_l_b, bool allow_adjacent) ATTR_NONNULL();
int BM_vert_edge_count_nonwire(const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
#define BM_vert_edge_count_is_equal(v, n) (BM_vert_edge_count_at_most(v, (n) + 1) == n)
#define BM_vert_edge_count_is_over(v, n) (BM_vert_edge_count_at_most(v, (n) + 1) == (n) + 1)
-int BM_vert_edge_count_at_most(const BMVert *v, const int count_max) ATTR_WARN_UNUSED_RESULT
+int BM_vert_edge_count_at_most(const BMVert *v, int count_max) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL();
/**
* Returns the number of edges around this vertex.
@@ -269,7 +260,7 @@ int BM_vert_edge_count_at_most(const BMVert *v, const int count_max) ATTR_WARN_U
int BM_vert_edge_count(const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
#define BM_edge_face_count_is_equal(e, n) (BM_edge_face_count_at_most(e, (n) + 1) == n)
#define BM_edge_face_count_is_over(e, n) (BM_edge_face_count_at_most(e, (n) + 1) == (n) + 1)
-int BM_edge_face_count_at_most(const BMEdge *e, const int count_max) ATTR_WARN_UNUSED_RESULT
+int BM_edge_face_count_at_most(const BMEdge *e, int count_max) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL();
/**
* Returns the number of faces around this edge
@@ -346,9 +337,8 @@ bool BM_edge_is_convex(const BMEdge *e) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
* \return true when loop customdata is contiguous.
*/
bool BM_edge_is_contiguous_loop_cd(const BMEdge *e,
- const int cd_loop_type,
- const int cd_loop_offset) ATTR_WARN_UNUSED_RESULT
- ATTR_NONNULL();
+ int cd_loop_type,
+ int cd_loop_offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
/**
* The number of loops connected to this loop (not including disconnected regions).
@@ -383,11 +373,11 @@ float BM_loop_point_side_of_edge_test(const BMLoop *l, const float co[3]) ATTR_W
/**
* \return The previous loop, over \a eps_sq distance from \a l (or \a NULL if l_stop is reached).
*/
-BMLoop *BM_loop_find_prev_nodouble(BMLoop *l, BMLoop *l_stop, const float eps_sq);
+BMLoop *BM_loop_find_prev_nodouble(BMLoop *l, BMLoop *l_stop, float eps_sq);
/**
* \return The next loop, over \a eps_sq distance from \a l (or \a NULL if l_stop is reached).
*/
-BMLoop *BM_loop_find_next_nodouble(BMLoop *l, BMLoop *l_stop, const float eps_sq);
+BMLoop *BM_loop_find_next_nodouble(BMLoop *l, BMLoop *l_stop, float eps_sq);
/**
* Calculates the angle between the previous and next loops
@@ -421,7 +411,7 @@ float BM_loop_calc_face_normal_safe(const BMLoop *l, float r_normal[3]) ATTR_NON
* \param epsilon_sq: Value to avoid numeric errors (1e-5f works well).
* \param r_normal: Resulting normal.
*/
-float BM_loop_calc_face_normal_safe_ex(const BMLoop *l, const float epsilon_sq, float r_normal[3])
+float BM_loop_calc_face_normal_safe_ex(const BMLoop *l, float epsilon_sq, float r_normal[3])
ATTR_NONNULL();
/**
* A version of BM_loop_calc_face_normal_safe_ex which takes vertex coordinates.
@@ -429,7 +419,7 @@ float BM_loop_calc_face_normal_safe_ex(const BMLoop *l, const float epsilon_sq,
float BM_loop_calc_face_normal_safe_vcos_ex(const BMLoop *l,
const float normal_fallback[3],
float const (*vertexCos)[3],
- const float epsilon_sq,
+ float epsilon_sq,
float r_normal[3]) ATTR_NONNULL();
float BM_loop_calc_face_normal_safe_vcos(const BMLoop *l,
const float normal_fallback[3],
@@ -464,7 +454,7 @@ void BM_loop_calc_face_tangent(const BMLoop *l, float r_tangent[3]);
*
* \return angle in radians
*/
-float BM_edge_calc_face_angle_ex(const BMEdge *e, const float fallback) ATTR_WARN_UNUSED_RESULT
+float BM_edge_calc_face_angle_ex(const BMEdge *e, float fallback) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL();
float BM_edge_calc_face_angle(const BMEdge *e) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
/**
@@ -475,8 +465,7 @@ float BM_edge_calc_face_angle(const BMEdge *e) ATTR_WARN_UNUSED_RESULT ATTR_NONN
*
* \return angle in radians
*/
-float BM_edge_calc_face_angle_signed_ex(const BMEdge *e,
- const float fallback) ATTR_WARN_UNUSED_RESULT
+float BM_edge_calc_face_angle_signed_ex(const BMEdge *e, float fallback) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL();
/**
* \brief BMESH EDGE/FACE ANGLE
@@ -488,8 +477,7 @@ float BM_edge_calc_face_angle_signed_ex(const BMEdge *e,
*/
float BM_edge_calc_face_angle_with_imat3_ex(const BMEdge *e,
const float imat3[3][3],
- const float fallback) ATTR_WARN_UNUSED_RESULT
- ATTR_NONNULL();
+ float fallback) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
float BM_edge_calc_face_angle_with_imat3(const BMEdge *e,
const float imat3[3][3]) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL();
@@ -516,7 +504,7 @@ float BM_vert_calc_edge_angle(const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONN
*
* \returns the angle in radians
*/
-float BM_vert_calc_edge_angle_ex(const BMVert *v, const float fallback) ATTR_WARN_UNUSED_RESULT
+float BM_vert_calc_edge_angle_ex(const BMVert *v, float fallback) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL();
/**
* \note this isn't optimal to run on an array of verts,
@@ -527,7 +515,7 @@ float BM_vert_calc_shell_factor(const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NO
* uses 'hflag' faces, but falls back to all if none found. */
float BM_vert_calc_shell_factor_ex(const BMVert *v,
const float no[3],
- const char hflag) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+ char hflag) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
/**
* \note quite an obscure function.
* used in bmesh operators that have a relative scale options,
@@ -595,7 +583,7 @@ bool BM_face_exists_multi_edge(BMEdge **earr, int len) ATTR_WARN_UNUSED_RESULT A
* \param len: \a varr array length.
* \return The face or NULL.
*/
-BMFace *BM_face_exists_overlap(BMVert **varr, const int len) ATTR_WARN_UNUSED_RESULT;
+BMFace *BM_face_exists_overlap(BMVert **varr, int len) ATTR_WARN_UNUSED_RESULT;
/**
* Given a set of vertices (varr), find out if
* there is a face that uses vertices only from this list
@@ -604,8 +592,7 @@ BMFace *BM_face_exists_overlap(BMVert **varr, const int len) ATTR_WARN_UNUSED_RE
* \param varr: Array of unordered verts.
* \param len: varr array length.
*/
-bool BM_face_exists_overlap_subset(BMVert **varr, const int len) ATTR_WARN_UNUSED_RESULT
- ATTR_NONNULL();
+bool BM_face_exists_overlap_subset(BMVert **varr, int len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
/**
* Returns the number of faces that are adjacent to both f1 and f2,
@@ -704,27 +691,26 @@ void BM_edge_ordered_verts_ex(const BMEdge *edge,
const BMLoop *edge_loop) ATTR_NONNULL();
bool BM_vert_is_all_edge_flag_test(const BMVert *v,
- const char hflag,
- const bool respect_hide) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+ char hflag,
+ bool respect_hide) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
bool BM_vert_is_all_face_flag_test(const BMVert *v,
- const char hflag,
- const bool respect_hide) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+ char hflag,
+ bool respect_hide) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
bool BM_edge_is_all_face_flag_test(const BMEdge *e,
- const char hflag,
- const bool respect_hide) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+ char hflag,
+ bool respect_hide) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
/* convenience functions for checking flags */
-bool BM_edge_is_any_vert_flag_test(const BMEdge *e, const char hflag) ATTR_WARN_UNUSED_RESULT
+bool BM_edge_is_any_vert_flag_test(const BMEdge *e, char hflag) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL();
-bool BM_edge_is_any_face_flag_test(const BMEdge *e, const char hflag) ATTR_WARN_UNUSED_RESULT
+bool BM_edge_is_any_face_flag_test(const BMEdge *e, char hflag) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL();
-bool BM_face_is_any_vert_flag_test(const BMFace *f, const char hflag) ATTR_WARN_UNUSED_RESULT
+bool BM_face_is_any_vert_flag_test(const BMFace *f, char hflag) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL();
-bool BM_face_is_any_edge_flag_test(const BMFace *f, const char hflag) ATTR_WARN_UNUSED_RESULT
+bool BM_face_is_any_edge_flag_test(const BMFace *f, char hflag) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL();
-bool BM_edge_is_any_face_len_test(const BMEdge *e, const int len) ATTR_WARN_UNUSED_RESULT
- ATTR_NONNULL();
+bool BM_edge_is_any_face_len_test(const BMEdge *e, int len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
/**
* Use within assert's to check normals are valid.
@@ -755,8 +741,8 @@ int BM_mesh_calc_face_groups(BMesh *bm,
BMLoopFilterFunc filter_fn,
BMLoopPairFilterFunc filter_pair_fn,
void *user_data,
- const char hflag_test,
- const char htype_step) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2, 3);
+ char hflag_test,
+ char htype_step) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2, 3);
/**
* Calculate isolated groups of edges with optional filtering.
*
@@ -780,7 +766,7 @@ int BM_mesh_calc_edge_groups(BMesh *bm,
int (**r_group_index)[2],
BMVertFilterFunc filter_fn,
void *user_data,
- const char hflag_test) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2, 3);
+ char hflag_test) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2, 3);
/**
* This is an alternative to #BM_mesh_calc_edge_groups.
@@ -797,6 +783,6 @@ int BM_mesh_calc_edge_groups_as_arrays(BMesh *bm,
ATTR_NONNULL(1, 2, 3, 4, 5);
/* Not really any good place to put this. */
-float bmesh_subd_falloff_calc(const int falloff, float val) ATTR_WARN_UNUSED_RESULT;
+float bmesh_subd_falloff_calc(int falloff, float val) ATTR_WARN_UNUSED_RESULT;
#include "bmesh_query_inline.h"
diff --git a/source/blender/bmesh/intern/bmesh_query_uv.h b/source/blender/bmesh/intern/bmesh_query_uv.h
index d63b8e5e701..4399f8b4c4d 100644
--- a/source/blender/bmesh/intern/bmesh_query_uv.h
+++ b/source/blender/bmesh/intern/bmesh_query_uv.h
@@ -21,10 +21,9 @@
*/
float BM_loop_uv_calc_edge_length_squared(const BMLoop *l,
- const int cd_loop_uv_offset) ATTR_WARN_UNUSED_RESULT
+ int cd_loop_uv_offset) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL();
-float BM_loop_uv_calc_edge_length(const BMLoop *l,
- const int cd_loop_uv_offset) ATTR_WARN_UNUSED_RESULT
+float BM_loop_uv_calc_edge_length(const BMLoop *l, int cd_loop_uv_offset) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL();
/**
@@ -37,24 +36,24 @@ float BM_loop_uv_calc_edge_length(const BMLoop *l,
*/
void BM_face_uv_calc_center_median_weighted(const BMFace *f,
const float aspect[2],
- const int cd_loop_uv_offset,
+ int cd_loop_uv_offset,
float r_cent[2]) ATTR_NONNULL();
-void BM_face_uv_calc_center_median(const BMFace *f, const int cd_loop_uv_offset, float r_cent[2])
+void BM_face_uv_calc_center_median(const BMFace *f, int cd_loop_uv_offset, float r_cent[2])
ATTR_NONNULL();
/**
* Calculate the UV cross product (use the sign to check the winding).
*/
-float BM_face_uv_calc_cross(const BMFace *f, const int cd_loop_uv_offset) ATTR_WARN_UNUSED_RESULT
+float BM_face_uv_calc_cross(const BMFace *f, int cd_loop_uv_offset) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL();
-void BM_face_uv_minmax(const BMFace *f, float min[2], float max[2], const int cd_loop_uv_offset);
-void BM_face_uv_transform(BMFace *f, const float matrix[2][2], const int cd_loop_uv_offset);
+void BM_face_uv_minmax(const BMFace *f, float min[2], float max[2], int cd_loop_uv_offset);
+void BM_face_uv_transform(BMFace *f, const float matrix[2][2], int cd_loop_uv_offset);
bool BM_loop_uv_share_edge_check_with_limit(BMLoop *l_a,
BMLoop *l_b,
const float limit[2],
- const int cd_loop_uv_offset) ATTR_WARN_UNUSED_RESULT
+ int cd_loop_uv_offset) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL();
/**
@@ -62,13 +61,12 @@ bool BM_loop_uv_share_edge_check_with_limit(BMLoop *l_a,
*/
bool BM_loop_uv_share_edge_check(BMLoop *l_a,
BMLoop *l_b,
- const int cd_loop_uv_offset) ATTR_WARN_UNUSED_RESULT
- ATTR_NONNULL();
+ int cd_loop_uv_offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
/**
* Check if two loops that share a vertex also have the same UV coordinates.
*/
-bool BM_edge_uv_share_vert_check(BMEdge *e, BMLoop *l_a, BMLoop *l_b, const int cd_loop_uv_offset)
+bool BM_edge_uv_share_vert_check(BMEdge *e, BMLoop *l_a, BMLoop *l_b, int cd_loop_uv_offset)
ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
/**
@@ -76,13 +74,11 @@ bool BM_edge_uv_share_vert_check(BMEdge *e, BMLoop *l_a, BMLoop *l_b, const int
*/
bool BM_loop_uv_share_vert_check(BMLoop *l_a,
BMLoop *l_b,
- const int cd_loop_uv_offset) ATTR_WARN_UNUSED_RESULT
- ATTR_NONNULL();
+ int cd_loop_uv_offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
/**
* Check if the point is inside the UV face.
*/
bool BM_face_uv_point_inside_test(const BMFace *f,
const float co[2],
- const int cd_loop_uv_offset) ATTR_WARN_UNUSED_RESULT
- ATTR_NONNULL();
+ int cd_loop_uv_offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
diff --git a/source/blender/bmesh/intern/bmesh_structure.h b/source/blender/bmesh/intern/bmesh_structure.h
index e2e26a69d44..8a9c1f114f9 100644
--- a/source/blender/bmesh/intern/bmesh_structure.h
+++ b/source/blender/bmesh/intern/bmesh_structure.h
@@ -47,7 +47,7 @@ BLI_INLINE BMEdge *bmesh_disk_edge_next(const BMEdge *e, const BMVert *v) ATTR_W
ATTR_NONNULL();
BLI_INLINE BMEdge *bmesh_disk_edge_prev(const BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL();
-int bmesh_disk_facevert_count_at_most(const BMVert *v, const int count_max) ATTR_WARN_UNUSED_RESULT
+int bmesh_disk_facevert_count_at_most(const BMVert *v, int count_max) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL();
/**
* \brief DISK COUNT FACE VERT
@@ -106,8 +106,7 @@ void bmesh_radial_loop_unlink(BMLoop *l) ATTR_NONNULL();
int bmesh_radial_facevert_count_at_most(const BMLoop *l,
const BMVert *v,
- const int count_max) ATTR_WARN_UNUSED_RESULT
- ATTR_NONNULL();
+ int count_max) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
/**
* \brief RADIAL COUNT FACE VERT
*