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
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')
-rw-r--r--source/blender/draw/DRW_engine.h8
-rw-r--r--source/blender/draw/DRW_select_buffer.h17
-rw-r--r--source/blender/draw/engines/eevee/eevee_lightcache.h7
-rw-r--r--source/blender/draw/engines/eevee/eevee_private.h4
-rw-r--r--source/blender/draw/engines/overlay/overlay_private.h6
-rw-r--r--source/blender/draw/engines/workbench/workbench_private.h2
-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
14 files changed, 73 insertions, 84 deletions
diff --git a/source/blender/draw/DRW_engine.h b/source/blender/draw/DRW_engine.h
index 132f66ecb1e..7e411fff72b 100644
--- a/source/blender/draw/DRW_engine.h
+++ b/source/blender/draw/DRW_engine.h
@@ -107,9 +107,9 @@ void DRW_draw_render_loop_offscreen(struct Depsgraph *depsgraph,
struct RenderEngineType *engine_type,
struct ARegion *region,
struct View3D *v3d,
- const bool is_image_render,
- const bool draw_background,
- const bool do_color_management,
+ bool is_image_render,
+ bool draw_background,
+ bool do_color_management,
struct GPUOffScreen *ofs,
struct GPUViewport *viewport);
void DRW_draw_render_loop_2d_ex(struct Depsgraph *depsgraph,
@@ -125,7 +125,7 @@ void DRW_draw_select_loop(struct Depsgraph *depsgraph,
bool use_obedit_skip,
bool draw_surface,
bool use_nearest,
- const bool do_material_sub_selection,
+ bool do_material_sub_selection,
const struct rcti *rect,
DRW_SelectPassFn select_pass_fn,
void *select_pass_user_data,
diff --git a/source/blender/draw/DRW_select_buffer.h b/source/blender/draw/DRW_select_buffer.h
index 18134558af8..0d5c417457c 100644
--- a/source/blender/draw/DRW_select_buffer.h
+++ b/source/blender/draw/DRW_select_buffer.h
@@ -82,10 +82,7 @@ typedef struct SELECTID_Context {
/* draw_select_buffer.c */
-bool DRW_select_buffer_elem_get(const uint sel_id,
- uint *r_elem,
- uint *r_base_index,
- char *r_elem_type);
+bool DRW_select_buffer_elem_get(uint sel_id, uint *r_elem, uint *r_base_index, char *r_elem_type);
uint DRW_select_buffer_context_offset_for_object_elem(struct Depsgraph *depsgraph,
struct Object *object,
char elem_type);
@@ -116,7 +113,7 @@ uint *DRW_select_buffer_bitmap_from_circle(struct Depsgraph *depsgraph,
struct ARegion *region,
struct View3D *v3d,
const int center[2],
- const int radius,
+ int radius,
uint *r_bitmap_len);
/**
* \param poly: The polygon coordinates.
@@ -128,7 +125,7 @@ uint *DRW_select_buffer_bitmap_from_poly(struct Depsgraph *depsgraph,
struct ARegion *region,
struct View3D *v3d,
const int poly[][2],
- const int poly_len,
+ int poly_len,
const struct rcti *rect,
uint *r_bitmap_len);
/**
@@ -147,9 +144,7 @@ uint DRW_select_buffer_find_nearest_to_point(struct Depsgraph *depsgraph,
struct ARegion *region,
struct View3D *v3d,
const int center[2],
- const uint id_min,
- const uint id_max,
+ uint id_min,
+ uint id_max,
uint *dist);
-void DRW_select_buffer_context_create(struct Base **bases,
- const uint bases_len,
- short select_mode);
+void DRW_select_buffer_context_create(struct Base **bases, uint bases_len, short select_mode);
diff --git a/source/blender/draw/engines/eevee/eevee_lightcache.h b/source/blender/draw/engines/eevee/eevee_lightcache.h
index 589b035b8bd..240eecf9547 100644
--- a/source/blender/draw/engines/eevee/eevee_lightcache.h
+++ b/source/blender/draw/engines/eevee/eevee_lightcache.h
@@ -70,11 +70,8 @@ void EEVEE_lightbake_update_world_quick(struct EEVEE_ViewLayerData *sldata,
/**
* Light Cache.
*/
-struct LightCache *EEVEE_lightcache_create(const int grid_len,
- const int cube_len,
- const int cube_size,
- const int vis_size,
- const int irr_size[3]);
+struct LightCache *EEVEE_lightcache_create(
+ int grid_len, int cube_len, int cube_size, int vis_size, const int irr_size[3]);
void EEVEE_lightcache_free(struct LightCache *lcache);
bool EEVEE_lightcache_load(struct LightCache *lcache);
void EEVEE_lightcache_info_update(struct SceneEEVEE *eevee);
diff --git a/source/blender/draw/engines/eevee/eevee_private.h b/source/blender/draw/engines/eevee/eevee_private.h
index 34af8b6c58d..996716d6def 100644
--- a/source/blender/draw/engines/eevee/eevee_private.h
+++ b/source/blender/draw/engines/eevee/eevee_private.h
@@ -1499,7 +1499,7 @@ void EEVEE_temporal_sampling_create_view(EEVEE_Data *vedata);
int EEVEE_temporal_sampling_sample_count_get(const Scene *scene, const EEVEE_StorageList *stl);
int EEVEE_temporal_sampling_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata);
void EEVEE_temporal_sampling_offset_calc(const double ht_point[2],
- const float filter_size,
+ float filter_size,
float r_offset[2]);
void EEVEE_temporal_sampling_matrices_calc(EEVEE_EffectsInfo *effects, const double ht_point[2]);
/**
@@ -1533,7 +1533,7 @@ void EEVEE_volumes_free(void);
void EEVEE_effects_init(EEVEE_ViewLayerData *sldata,
EEVEE_Data *vedata,
Object *camera,
- const bool minimal);
+ bool minimal);
void EEVEE_effects_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata);
void EEVEE_effects_draw_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata);
/**
diff --git a/source/blender/draw/engines/overlay/overlay_private.h b/source/blender/draw/engines/overlay/overlay_private.h
index 6a322e300f5..c8891a53213 100644
--- a/source/blender/draw/engines/overlay/overlay_private.h
+++ b/source/blender/draw/engines/overlay/overlay_private.h
@@ -590,11 +590,11 @@ void OVERLAY_extra_line_dashed(OVERLAY_ExtraCallBuffers *cb,
void OVERLAY_extra_line(OVERLAY_ExtraCallBuffers *cb,
const float start[3],
const float end[3],
- const int color_id);
+ int color_id);
void OVERLAY_empty_shape(OVERLAY_ExtraCallBuffers *cb,
const float mat[4][4],
- const float draw_size,
- const char draw_type,
+ float draw_size,
+ char draw_type,
const float color[4]);
void OVERLAY_extra_loose_points(OVERLAY_ExtraCallBuffers *cb,
struct GPUBatch *geom,
diff --git a/source/blender/draw/engines/workbench/workbench_private.h b/source/blender/draw/engines/workbench/workbench_private.h
index 42c873c7691..fb4600316ec 100644
--- a/source/blender/draw/engines/workbench/workbench_private.h
+++ b/source/blender/draw/engines/workbench/workbench_private.h
@@ -423,7 +423,7 @@ void workbench_transparent_draw_depth_pass(WORKBENCH_Data *data);
/* workbench_shadow.c */
void workbench_shadow_data_update(WORKBENCH_PrivateData *wpd, WORKBENCH_UBO_World *wd);
void workbench_shadow_cache_init(WORKBENCH_Data *data);
-void workbench_shadow_cache_populate(WORKBENCH_Data *data, Object *ob, const bool has_transp_mat);
+void workbench_shadow_cache_populate(WORKBENCH_Data *data, Object *ob, bool has_transp_mat);
/* workbench_shader.c */
GPUShader *workbench_shader_opaque_get(WORKBENCH_PrivateData *wpd, eWORKBENCH_DataType data);
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;