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/draw/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/draw/intern')
-rw-r--r--source/blender/draw/intern/DRW_render.h22
-rw-r--r--source/blender/draw/intern/draw_cache.h2
-rw-r--r--source/blender/draw/intern/draw_cache_extract.h14
-rw-r--r--source/blender/draw/intern/draw_cache_impl.h8
-rw-r--r--source/blender/draw/intern/draw_debug.h6
-rw-r--r--source/blender/draw/intern/draw_manager_text.h2
-rw-r--r--source/blender/draw/intern/draw_subdivision.h8
-rw-r--r--source/blender/draw/intern/mesh_extractors/extract_mesh.h51
8 files changed, 55 insertions, 58 deletions
diff --git a/source/blender/draw/intern/DRW_render.h b/source/blender/draw/intern/DRW_render.h
index 6c4744cb104..b16caf49209 100644
--- a/source/blender/draw/intern/DRW_render.h
+++ b/source/blender/draw/intern/DRW_render.h
@@ -226,9 +226,9 @@ struct GPUShader *DRW_shader_create_with_shaderlib_ex(const char *vert,
struct GPUShader *DRW_shader_create_with_transform_feedback(const char *vert,
const char *geom,
const char *defines,
- const eGPUShaderTFBType prim_type,
+ eGPUShaderTFBType prim_type,
const char **varying_names,
- const int varying_count);
+ int varying_count);
struct GPUShader *DRW_shader_create_fullscreen_ex(const char *frag,
const char *defines,
const char *name);
@@ -249,18 +249,18 @@ struct GPUShader *DRW_shader_create_fullscreen_with_shaderlib_ex(const char *fra
struct GPUMaterial *DRW_shader_find_from_world(struct World *wo,
const void *engine_type,
- const int options,
+ int options,
bool deferred);
struct GPUMaterial *DRW_shader_find_from_material(struct Material *ma,
const void *engine_type,
- const int options,
+ int options,
bool deferred);
struct GPUMaterial *DRW_shader_create_from_world(struct Scene *scene,
struct World *wo,
struct bNodeTree *ntree,
const void *engine_type,
- const int options,
- const bool is_volume_shader,
+ int options,
+ bool is_volume_shader,
const char *vert,
const char *geom,
const char *frag_lib,
@@ -271,8 +271,8 @@ struct GPUMaterial *DRW_shader_create_from_material(struct Scene *scene,
struct Material *ma,
struct bNodeTree *ntree,
const void *engine_type,
- const int options,
- const bool is_volume_shader,
+ int options,
+ bool is_volume_shader,
const char *vert,
const char *geom,
const char *frag_lib,
@@ -609,12 +609,12 @@ void DRW_shgroup_uniform_image_ref(DRWShadingGroup *shgroup, const char *name, G
/* Store value instead of referencing it. */
-void DRW_shgroup_uniform_int_copy(DRWShadingGroup *shgroup, const char *name, const int value);
+void DRW_shgroup_uniform_int_copy(DRWShadingGroup *shgroup, const char *name, int value);
void DRW_shgroup_uniform_ivec2_copy(DRWShadingGroup *shgroup, const char *name, const int *value);
void DRW_shgroup_uniform_ivec3_copy(DRWShadingGroup *shgroup, const char *name, const int *value);
void DRW_shgroup_uniform_ivec4_copy(DRWShadingGroup *shgroup, const char *name, const int *value);
-void DRW_shgroup_uniform_bool_copy(DRWShadingGroup *shgroup, const char *name, const bool value);
-void DRW_shgroup_uniform_float_copy(DRWShadingGroup *shgroup, const char *name, const float value);
+void DRW_shgroup_uniform_bool_copy(DRWShadingGroup *shgroup, const char *name, bool value);
+void DRW_shgroup_uniform_float_copy(DRWShadingGroup *shgroup, const char *name, float value);
void DRW_shgroup_uniform_vec2_copy(DRWShadingGroup *shgroup, const char *name, const float *value);
void DRW_shgroup_uniform_vec3_copy(DRWShadingGroup *shgroup, const char *name, const float *value);
void DRW_shgroup_uniform_vec4_copy(DRWShadingGroup *shgroup, const char *name, const float *value);
diff --git a/source/blender/draw/intern/draw_cache.h b/source/blender/draw/intern/draw_cache.h
index 7fcd86669ec..30e5a10df91 100644
--- a/source/blender/draw/intern/draw_cache.h
+++ b/source/blender/draw/intern/draw_cache.h
@@ -67,7 +67,7 @@ struct GPUBatch *DRW_cache_quad_wires_get(void);
struct GPUBatch *DRW_cache_cube_get(void);
struct GPUBatch *DRW_cache_normal_arrow_get(void);
-struct GPUBatch *DRW_cache_sphere_get(const eDRWLevelOfDetail level_of_detail);
+struct GPUBatch *DRW_cache_sphere_get(eDRWLevelOfDetail level_of_detail);
/* Dummy VBOs */
diff --git a/source/blender/draw/intern/draw_cache_extract.h b/source/blender/draw/intern/draw_cache_extract.h
index 6de9788b434..bd4edaf09fb 100644
--- a/source/blender/draw/intern/draw_cache_extract.h
+++ b/source/blender/draw/intern/draw_cache_extract.h
@@ -329,16 +329,16 @@ void mesh_buffer_cache_create_requested(struct TaskGraph *task_graph,
MeshBatchCache *cache,
MeshBufferCache *mbc,
Mesh *me,
- const bool is_editmode,
- const bool is_paint_mode,
- const bool is_mode_active,
+ bool is_editmode,
+ bool is_paint_mode,
+ bool is_mode_active,
const float obmat[4][4],
- const bool do_final,
- const bool do_uvedit,
- const bool use_subsurf_fdots,
+ bool do_final,
+ bool do_uvedit,
+ bool use_subsurf_fdots,
const Scene *scene,
const struct ToolSettings *ts,
- const bool use_hide);
+ bool use_hide);
void mesh_buffer_cache_create_requested_subdiv(MeshBatchCache *cache,
MeshBufferCache *mbc,
diff --git a/source/blender/draw/intern/draw_cache_impl.h b/source/blender/draw/intern/draw_cache_impl.h
index 80b8c0506e7..77b507bc2b6 100644
--- a/source/blender/draw/intern/draw_cache_impl.h
+++ b/source/blender/draw/intern/draw_cache_impl.h
@@ -105,7 +105,7 @@ void DRW_mesh_batch_cache_free_old(struct Mesh *me, int ctime);
/** \name Generic
* \{ */
-void DRW_vertbuf_create_wiredata(struct GPUVertBuf *vbo, const int vert_len);
+void DRW_vertbuf_create_wiredata(struct GPUVertBuf *vbo, int vert_len);
/** \} */
@@ -178,7 +178,7 @@ void DRW_displist_indexbuf_create_edges_adjacency_lines(struct ListBase *lb,
struct GPUBatch *DRW_lattice_batch_cache_get_all_edges(struct Lattice *lt,
bool use_weight,
- const int actdef);
+ int actdef);
struct GPUBatch *DRW_lattice_batch_cache_get_all_verts(struct Lattice *lt);
struct GPUBatch *DRW_lattice_batch_cache_get_edit_verts(struct Lattice *lt);
@@ -228,8 +228,8 @@ void DRW_mesh_batch_cache_create_requested(struct TaskGraph *task_graph,
struct Object *ob,
struct Mesh *me,
const struct Scene *scene,
- const bool is_paint_mode,
- const bool use_hide);
+ bool is_paint_mode,
+ bool use_hide);
struct GPUBatch *DRW_mesh_batch_cache_get_all_verts(struct Mesh *me);
struct GPUBatch *DRW_mesh_batch_cache_get_all_edges(struct Mesh *me);
diff --git a/source/blender/draw/intern/draw_debug.h b/source/blender/draw/intern/draw_debug.h
index 2f1a082af96..2616bc0af97 100644
--- a/source/blender/draw/intern/draw_debug.h
+++ b/source/blender/draw/intern/draw_debug.h
@@ -28,11 +28,11 @@ void DRW_debug_modelmat_reset(void);
void DRW_debug_modelmat(const float modelmat[4][4]);
void DRW_debug_line_v3v3(const float v1[3], const float v2[3], const float color[4]);
-void DRW_debug_polygon_v3(const float (*v)[3], const int vert_len, const float color[4]);
+void DRW_debug_polygon_v3(const float (*v)[3], int vert_len, const float color[4]);
/**
* \note g_modelmat is still applied on top.
*/
void DRW_debug_m4(const float m[4][4]);
-void DRW_debug_m4_as_bbox(const float m[4][4], const float color[4], const bool invert);
+void DRW_debug_m4_as_bbox(const float m[4][4], const float color[4], bool invert);
void DRW_debug_bbox(const BoundBox *bbox, const float color[4]);
-void DRW_debug_sphere(const float center[3], const float radius, const float color[4]);
+void DRW_debug_sphere(const float center[3], float radius, const float color[4]);
diff --git a/source/blender/draw/intern/draw_manager_text.h b/source/blender/draw/intern/draw_manager_text.h
index 000a6ab5e6f..098b636cc98 100644
--- a/source/blender/draw/intern/draw_manager_text.h
+++ b/source/blender/draw/intern/draw_manager_text.h
@@ -38,7 +38,7 @@ void DRW_text_cache_destroy(struct DRWTextStore *dt);
void DRW_text_cache_add(struct DRWTextStore *dt,
const float co[3],
const char *str,
- const int str_len,
+ int str_len,
short xoffs,
short yoffs,
short flag,
diff --git a/source/blender/draw/intern/draw_subdivision.h b/source/blender/draw/intern/draw_subdivision.h
index d36bfe87689..9dfcdabc0fe 100644
--- a/source/blender/draw/intern/draw_subdivision.h
+++ b/source/blender/draw/intern/draw_subdivision.h
@@ -178,7 +178,7 @@ void draw_subdiv_finalize_normals(const DRWSubdivCache *cache,
void draw_subdiv_extract_pos_nor(const DRWSubdivCache *cache,
struct GPUVertBuf *pos_nor,
- const bool do_limit_normals);
+ bool do_limit_normals);
void draw_subdiv_interp_custom_data(const DRWSubdivCache *cache,
struct GPUVertBuf *src_data,
@@ -188,8 +188,8 @@ void draw_subdiv_interp_custom_data(const DRWSubdivCache *cache,
void draw_subdiv_extract_uvs(const DRWSubdivCache *cache,
struct GPUVertBuf *uvs,
- const int face_varying_channel,
- const int dst_offset);
+ int face_varying_channel,
+ int dst_offset);
void draw_subdiv_build_edge_fac_buffer(const DRWSubdivCache *cache,
struct GPUVertBuf *pos_nor,
@@ -198,7 +198,7 @@ void draw_subdiv_build_edge_fac_buffer(const DRWSubdivCache *cache,
void draw_subdiv_build_tris_buffer(const DRWSubdivCache *cache,
struct GPUIndexBuf *subdiv_tris,
- const int material_count);
+ int material_count);
void draw_subdiv_build_lines_buffer(const DRWSubdivCache *cache,
struct GPUIndexBuf *lines_indices);
diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh.h b/source/blender/draw/intern/mesh_extractors/extract_mesh.h
index 3e95d160b29..2db8f721e76 100644
--- a/source/blender/draw/intern/mesh_extractors/extract_mesh.h
+++ b/source/blender/draw/intern/mesh_extractors/extract_mesh.h
@@ -173,37 +173,34 @@ BLI_INLINE const float *bm_face_no_get(const MeshRenderData *mr, const BMFace *e
/* TODO(jbakker): move parameters inside a struct. */
-typedef void(ExtractTriBMeshFn)(const MeshRenderData *mr,
- BMLoop **elt,
- const int elt_index,
- void *data);
+typedef void(ExtractTriBMeshFn)(const MeshRenderData *mr, BMLoop **elt, int elt_index, void *data);
typedef void(ExtractTriMeshFn)(const MeshRenderData *mr,
const MLoopTri *mlt,
- const int elt_index,
+ int elt_index,
void *data);
typedef void(ExtractPolyBMeshFn)(const MeshRenderData *mr,
const BMFace *f,
- const int f_index,
+ int f_index,
void *data);
typedef void(ExtractPolyMeshFn)(const MeshRenderData *mr,
const MPoly *mp,
- const int mp_index,
+ int mp_index,
void *data);
typedef void(ExtractLEdgeBMeshFn)(const MeshRenderData *mr,
const BMEdge *eed,
- const int ledge_index,
+ int ledge_index,
void *data);
typedef void(ExtractLEdgeMeshFn)(const MeshRenderData *mr,
const MEdge *med,
- const int ledge_index,
+ int ledge_index,
void *data);
typedef void(ExtractLVertBMeshFn)(const MeshRenderData *mr,
const BMVert *eve,
- const int lvert_index,
+ int lvert_index,
void *data);
typedef void(ExtractLVertMeshFn)(const MeshRenderData *mr,
const MVert *mv,
- const int lvert_index,
+ int lvert_index,
void *data);
typedef void(ExtractLooseGeomSubdivFn)(const struct DRWSubdivCache *subdiv_cache,
const MeshRenderData *mr,
@@ -275,28 +272,28 @@ typedef struct MeshExtract {
* otherwise don't use modifiers as they are not from this object.
*/
MeshRenderData *mesh_render_data_create(Mesh *me,
- const bool is_editmode,
- const bool is_paint_mode,
- const bool is_mode_active,
+ bool is_editmode,
+ bool is_paint_mode,
+ bool is_mode_active,
const float obmat[4][4],
- const bool do_final,
- const bool do_uvedit,
+ bool do_final,
+ bool do_uvedit,
const ToolSettings *ts);
void mesh_render_data_free(MeshRenderData *mr);
-void mesh_render_data_update_normals(MeshRenderData *mr, const eMRDataType data_flag);
+void mesh_render_data_update_normals(MeshRenderData *mr, eMRDataType data_flag);
void mesh_render_data_update_loose_geom(MeshRenderData *mr,
MeshBufferCache *cache,
- const eMRIterType iter_type,
- const eMRDataType data_flag);
+ eMRIterType iter_type,
+ eMRDataType data_flag);
void mesh_render_data_update_polys_sorted(MeshRenderData *mr,
MeshBufferCache *cache,
- const eMRDataType data_flag);
+ eMRDataType data_flag);
/**
* Part of the creation of the #MeshRenderData that happens in a thread.
*/
void mesh_render_data_update_looptris(MeshRenderData *mr,
- const eMRIterType iter_type,
- const eMRDataType data_flag);
+ eMRIterType iter_type,
+ eMRDataType data_flag);
/* draw_cache_extract_mesh_extractors.c */
typedef struct EditLoopData {
@@ -309,19 +306,19 @@ typedef struct EditLoopData {
void *mesh_extract_buffer_get(const MeshExtract *extractor, MeshBufferList *mbuflist);
eMRIterType mesh_extract_iter_type(const MeshExtract *ext);
const MeshExtract *mesh_extract_override_get(const MeshExtract *extractor,
- const bool do_hq_normals,
- const bool do_single_mat);
+ bool do_hq_normals,
+ bool do_single_mat);
void mesh_render_data_face_flag(const MeshRenderData *mr,
const BMFace *efa,
- const int cd_ofs,
+ int cd_ofs,
EditLoopData *eattr);
void mesh_render_data_loop_flag(const MeshRenderData *mr,
BMLoop *l,
- const int cd_ofs,
+ int cd_ofs,
EditLoopData *eattr);
void mesh_render_data_loop_edge_flag(const MeshRenderData *mr,
BMLoop *l,
- const int cd_ofs,
+ int cd_ofs,
EditLoopData *eattr);
extern const MeshExtract extract_tris;