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:
authorHans Goudey <h.goudey@me.com>2022-10-04 01:37:25 +0300
committerHans Goudey <h.goudey@me.com>2022-10-04 01:38:16 +0300
commit97746129d5870beedc40e3c035c7982ce8a6bebc (patch)
treeb819b8e7875e6684aad7ea1f6bb7922d4fa1c8fc /source/blender/editors/render
parented7f5713f8f9d605e3cd4cce42e40fb5c6bf4bf5 (diff)
Cleanup: replace UNUSED macro with commented args in C++ code
This is the conventional way of dealing with unused arguments in C++, since it works on all compilers. Regex find and replace: `UNUSED\((\w+)\)` -> `/*$1*/`
Diffstat (limited to 'source/blender/editors/render')
-rw-r--r--source/blender/editors/render/render_internal.cc2
-rw-r--r--source/blender/editors/render/render_opengl.cc4
-rw-r--r--source/blender/editors/render/render_preview.cc13
-rw-r--r--source/blender/editors/render/render_shading.cc56
-rw-r--r--source/blender/editors/render/render_update.cc6
-rw-r--r--source/blender/editors/render/render_view.cc2
6 files changed, 40 insertions, 43 deletions
diff --git a/source/blender/editors/render/render_internal.cc b/source/blender/editors/render/render_internal.cc
index 7f6a14126e0..e66cabbc9f8 100644
--- a/source/blender/editors/render/render_internal.cc
+++ b/source/blender/editors/render/render_internal.cc
@@ -808,7 +808,7 @@ static int render_breakjob(void *rjv)
* For exec() when there is no render job
* NOTE: this won't check for the escape key being pressed, but doing so isn't thread-safe.
*/
-static int render_break(void *UNUSED(rjv))
+static int render_break(void * /*rjv*/)
{
if (G.is_break) {
return 1;
diff --git a/source/blender/editors/render/render_opengl.cc b/source/blender/editors/render/render_opengl.cc
index e91bffce2c2..d5e3d1171cd 100644
--- a/source/blender/editors/render/render_opengl.cc
+++ b/source/blender/editors/render/render_opengl.cc
@@ -1310,8 +1310,8 @@ static int screen_opengl_render_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static char *screen_opengl_render_description(struct bContext *UNUSED(C),
- struct wmOperatorType *UNUSED(ot),
+static char *screen_opengl_render_description(struct bContext * /*C*/,
+ struct wmOperatorType * /*ot*/,
struct PointerRNA *ptr)
{
if (!RNA_boolean_get(ptr, "animation")) {
diff --git a/source/blender/editors/render/render_preview.cc b/source/blender/editors/render/render_preview.cc
index 2e844aa5185..ad24f46f923 100644
--- a/source/blender/editors/render/render_preview.cc
+++ b/source/blender/editors/render/render_preview.cc
@@ -1039,7 +1039,7 @@ static void action_preview_render(IconPreview *preview, IconPreviewSize *preview
* \{ */
/* inside thread, called by renderer, sets job update value */
-static void shader_preview_update(void *spv, RenderResult *UNUSED(rr), struct rcti *UNUSED(rect))
+static void shader_preview_update(void *spv, RenderResult * /*rr*/, struct rcti * /*rect*/)
{
ShaderPreview *sp = static_cast<ShaderPreview *>(spv);
@@ -1054,7 +1054,7 @@ static int shader_preview_break(void *spv)
return *(sp->stop);
}
-static void shader_preview_updatejob(void *UNUSED(spv))
+static void shader_preview_updatejob(void * /*spv*/)
{
}
@@ -1490,7 +1490,7 @@ static void icon_preview_startjob(void *customdata, short *stop, short *do_updat
static void common_preview_startjob(void *customdata,
short *stop,
short *do_update,
- float *UNUSED(progress))
+ float * /*progress*/)
{
ShaderPreview *sp = static_cast<ShaderPreview *>(customdata);
@@ -1798,10 +1798,7 @@ void PreviewLoadJob::push_load_request(PreviewImage *preview, const eIconSizes i
BLI_thread_queue_push(todo_queue_, &requested_previews_.back());
}
-void PreviewLoadJob::run_fn(void *customdata,
- short *stop,
- short *do_update,
- float *UNUSED(progress))
+void PreviewLoadJob::run_fn(void *customdata, short *stop, short *do_update, float * /*progress*/)
{
PreviewLoadJob *job_data = static_cast<PreviewLoadJob *>(customdata);
@@ -2109,7 +2106,7 @@ void ED_preview_shader_job(const bContext *C,
WM_jobs_start(CTX_wm_manager(C), wm_job);
}
-void ED_preview_kill_jobs(wmWindowManager *wm, Main *UNUSED(bmain))
+void ED_preview_kill_jobs(wmWindowManager *wm, Main * /*bmain*/)
{
if (wm) {
/* This is called to stop all preview jobs before scene data changes, to
diff --git a/source/blender/editors/render/render_shading.cc b/source/blender/editors/render/render_shading.cc
index 6802798adb3..25d5ceb8216 100644
--- a/source/blender/editors/render/render_shading.cc
+++ b/source/blender/editors/render/render_shading.cc
@@ -163,7 +163,7 @@ static bool object_materials_supported_poll(bContext *C)
/** \name Material Slot Add Operator
* \{ */
-static int material_slot_add_exec(bContext *C, wmOperator *UNUSED(op))
+static int material_slot_add_exec(bContext *C, wmOperator * /*op*/)
{
Main *bmain = CTX_data_main(C);
Object *ob = ED_object_context(C);
@@ -259,7 +259,7 @@ void OBJECT_OT_material_slot_remove(wmOperatorType *ot)
/** \name Material Slot Assign Operator
* \{ */
-static int material_slot_assign_exec(bContext *C, wmOperator *UNUSED(op))
+static int material_slot_assign_exec(bContext *C, wmOperator * /*op*/)
{
View3D *v3d = CTX_wm_view3d(C);
bool changed_multi = false;
@@ -475,7 +475,7 @@ static int material_slot_de_select(bContext *C, bool select)
return (changed_multi) ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
}
-static int material_slot_select_exec(bContext *C, wmOperator *UNUSED(op))
+static int material_slot_select_exec(bContext *C, wmOperator * /*op*/)
{
return material_slot_de_select(C, true);
}
@@ -494,7 +494,7 @@ void OBJECT_OT_material_slot_select(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
}
-static int material_slot_deselect_exec(bContext *C, wmOperator *UNUSED(op))
+static int material_slot_deselect_exec(bContext *C, wmOperator * /*op*/)
{
return material_slot_de_select(C, false);
}
@@ -519,7 +519,7 @@ void OBJECT_OT_material_slot_deselect(wmOperatorType *ot)
/** \name Material Slot Copy Operator
* \{ */
-static int material_slot_copy_exec(bContext *C, wmOperator *UNUSED(op))
+static int material_slot_copy_exec(bContext *C, wmOperator * /*op*/)
{
Main *bmain = CTX_data_main(C);
Object *ob = ED_object_context(C);
@@ -736,7 +736,7 @@ void OBJECT_OT_material_slot_remove_unused(wmOperatorType *ot)
/** \name New Material Operator
* \{ */
-static int new_material_exec(bContext *C, wmOperator *UNUSED(op))
+static int new_material_exec(bContext *C, wmOperator * /*op*/)
{
Material *ma = static_cast<Material *>(
CTX_data_pointer_get_type(C, "material", &RNA_Material).data);
@@ -812,7 +812,7 @@ void MATERIAL_OT_new(wmOperatorType *ot)
/** \name New Texture Operator
* \{ */
-static int new_texture_exec(bContext *C, wmOperator *UNUSED(op))
+static int new_texture_exec(bContext *C, wmOperator * /*op*/)
{
Tex *tex = static_cast<Tex *>(CTX_data_pointer_get_type(C, "texture", &RNA_Texture).data);
Main *bmain = CTX_data_main(C);
@@ -865,7 +865,7 @@ void TEXTURE_OT_new(wmOperatorType *ot)
/** \name new world operator
* \{ */
-static int new_world_exec(bContext *C, wmOperator *UNUSED(op))
+static int new_world_exec(bContext *C, wmOperator * /*op*/)
{
World *wo = static_cast<World *>(CTX_data_pointer_get_type(C, "world", &RNA_World).data);
Main *bmain = CTX_data_main(C);
@@ -982,7 +982,7 @@ static bool view_layer_remove_poll(bContext *C)
return (scene->view_layers.first != scene->view_layers.last);
}
-static int view_layer_remove_exec(bContext *C, wmOperator *UNUSED(op))
+static int view_layer_remove_exec(bContext *C, wmOperator * /*op*/)
{
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
@@ -1018,7 +1018,7 @@ void SCENE_OT_view_layer_remove(wmOperatorType *ot)
/** \name View Layer Add AOV Operator
* \{ */
-static int view_layer_add_aov_exec(bContext *C, wmOperator *UNUSED(op))
+static int view_layer_add_aov_exec(bContext *C, wmOperator * /*op*/)
{
Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
@@ -1066,7 +1066,7 @@ void SCENE_OT_view_layer_add_aov(wmOperatorType *ot)
/** \name View Layer Remove AOV Operator
* \{ */
-static int view_layer_remove_aov_exec(bContext *C, wmOperator *UNUSED(op))
+static int view_layer_remove_aov_exec(bContext *C, wmOperator * /*op*/)
{
Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
@@ -1178,7 +1178,7 @@ void SCENE_OT_view_layer_add_lightgroup(wmOperatorType *ot)
/** \name View Layer Remove Lightgroup Operator
* \{ */
-static int view_layer_remove_lightgroup_exec(bContext *C, wmOperator *UNUSED(op))
+static int view_layer_remove_lightgroup_exec(bContext *C, wmOperator * /*op*/)
{
Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
@@ -1238,7 +1238,7 @@ static GSet *get_used_lightgroups(Scene *scene)
return used_lightgroups;
}
-static int view_layer_add_used_lightgroups_exec(bContext *C, wmOperator *UNUSED(op))
+static int view_layer_add_used_lightgroups_exec(bContext *C, wmOperator * /*op*/)
{
Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
@@ -1284,7 +1284,7 @@ void SCENE_OT_view_layer_add_used_lightgroups(wmOperatorType *ot)
/** \name View Layer Remove Unused Lightgroups Operator
* \{ */
-static int view_layer_remove_unused_lightgroups_exec(bContext *C, wmOperator *UNUSED(op))
+static int view_layer_remove_unused_lightgroups_exec(bContext *C, wmOperator * /*op*/)
{
Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
@@ -1411,7 +1411,7 @@ static int light_cache_bake_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int light_cache_bake_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
+static int light_cache_bake_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
{
wmWindowManager *wm = CTX_wm_manager(C);
wmWindow *win = CTX_wm_window(C);
@@ -1505,7 +1505,7 @@ static bool light_cache_free_poll(bContext *C)
return scene->eevee.light_cache_data;
}
-static int light_cache_free_exec(bContext *C, wmOperator *UNUSED(op))
+static int light_cache_free_exec(bContext *C, wmOperator * /*op*/)
{
Scene *scene = CTX_data_scene(C);
@@ -1555,7 +1555,7 @@ static bool render_view_remove_poll(bContext *C)
return scene->r.actview > 1;
}
-static int render_view_add_exec(bContext *C, wmOperator *UNUSED(op))
+static int render_view_add_exec(bContext *C, wmOperator * /*op*/)
{
Scene *scene = CTX_data_scene(C);
@@ -1587,7 +1587,7 @@ void SCENE_OT_render_view_add(wmOperatorType *ot)
/** \name Render View Add Operator
* \{ */
-static int render_view_remove_exec(bContext *C, wmOperator *UNUSED(op))
+static int render_view_remove_exec(bContext *C, wmOperator * /*op*/)
{
Scene *scene = CTX_data_scene(C);
SceneRenderView *rv = static_cast<SceneRenderView *>(
@@ -1651,7 +1651,7 @@ static bool freestyle_active_module_poll(bContext *C)
return module != nullptr;
}
-static int freestyle_module_add_exec(bContext *C, wmOperator *UNUSED(op))
+static int freestyle_module_add_exec(bContext *C, wmOperator * /*op*/)
{
Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
@@ -1683,7 +1683,7 @@ void SCENE_OT_freestyle_module_add(wmOperatorType *ot)
/** \name Free Style Module Remove Operator
* \{ */
-static int freestyle_module_remove_exec(bContext *C, wmOperator *UNUSED(op))
+static int freestyle_module_remove_exec(bContext *C, wmOperator * /*op*/)
{
Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
@@ -1770,7 +1770,7 @@ void SCENE_OT_freestyle_module_move(wmOperatorType *ot)
/** \name Free Style Line Set Add Operator
* \{ */
-static int freestyle_lineset_add_exec(bContext *C, wmOperator *UNUSED(op))
+static int freestyle_lineset_add_exec(bContext *C, wmOperator * /*op*/)
{
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
@@ -1815,7 +1815,7 @@ static bool freestyle_active_lineset_poll(bContext *C)
return BKE_freestyle_lineset_get_active(&view_layer->freestyle_config) != nullptr;
}
-static int freestyle_lineset_copy_exec(bContext *C, wmOperator *UNUSED(op))
+static int freestyle_lineset_copy_exec(bContext *C, wmOperator * /*op*/)
{
ViewLayer *view_layer = CTX_data_view_layer(C);
@@ -1845,7 +1845,7 @@ void SCENE_OT_freestyle_lineset_copy(wmOperatorType *ot)
/** \name Free Style Line Set Paste Operator
* \{ */
-static int freestyle_lineset_paste_exec(bContext *C, wmOperator *UNUSED(op))
+static int freestyle_lineset_paste_exec(bContext *C, wmOperator * /*op*/)
{
Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
@@ -1879,7 +1879,7 @@ void SCENE_OT_freestyle_lineset_paste(wmOperatorType *ot)
/** \name Free Style Line Set Remove Operator
* \{ */
-static int freestyle_lineset_remove_exec(bContext *C, wmOperator *UNUSED(op))
+static int freestyle_lineset_remove_exec(bContext *C, wmOperator * /*op*/)
{
Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
@@ -2517,7 +2517,7 @@ void TEXTURE_OT_slot_move(wmOperatorType *ot)
* \{ */
/* material copy/paste */
-static int copy_material_exec(bContext *C, wmOperator *UNUSED(op))
+static int copy_material_exec(bContext *C, wmOperator * /*op*/)
{
Material *ma = static_cast<Material *>(
CTX_data_pointer_get_type(C, "material", &RNA_Material).data);
@@ -2552,7 +2552,7 @@ void MATERIAL_OT_copy(wmOperatorType *ot)
/** \name Material Paste Operator
* \{ */
-static int paste_material_exec(bContext *C, wmOperator *UNUSED(op))
+static int paste_material_exec(bContext *C, wmOperator * /*op*/)
{
Material *ma = static_cast<Material *>(
CTX_data_pointer_get_type(C, "material", &RNA_Material).data);
@@ -2661,7 +2661,7 @@ static void paste_mtex_copybuf(ID *id)
/** \name Texture Slot Copy Operator
* \{ */
-static int copy_mtex_exec(bContext *C, wmOperator *UNUSED(op))
+static int copy_mtex_exec(bContext *C, wmOperator * /*op*/)
{
ID *id = CTX_data_pointer_get_type(C, "texture_slot", &RNA_TextureSlot).owner_id;
@@ -2705,7 +2705,7 @@ void TEXTURE_OT_slot_copy(wmOperatorType *ot)
/** \name Texture Slot Paste Operator
* \{ */
-static int paste_mtex_exec(bContext *C, wmOperator *UNUSED(op))
+static int paste_mtex_exec(bContext *C, wmOperator * /*op*/)
{
ID *id = CTX_data_pointer_get_type(C, "texture_slot", &RNA_TextureSlot).owner_id;
diff --git a/source/blender/editors/render/render_update.cc b/source/blender/editors/render/render_update.cc
index 7cefcf9815e..8aadb9edf6a 100644
--- a/source/blender/editors/render/render_update.cc
+++ b/source/blender/editors/render/render_update.cc
@@ -226,13 +226,13 @@ void ED_render_view_layer_changed(Main *bmain, bScreen *screen)
* we can get rid of the manual dependency checks.
* \{ */
-static void material_changed(Main *UNUSED(bmain), Material *ma)
+static void material_changed(Main * /*bmain*/, Material *ma)
{
/* icons */
BKE_icon_changed(BKE_icon_id_ensure(&ma->id));
}
-static void lamp_changed(Main *UNUSED(bmain), Light *la)
+static void lamp_changed(Main * /*bmain*/, Light *la)
{
/* icons */
BKE_icon_changed(BKE_icon_id_ensure(&la->id));
@@ -265,7 +265,7 @@ static void texture_changed(Main *bmain, Tex *tex)
}
}
-static void world_changed(Main *UNUSED(bmain), World *wo)
+static void world_changed(Main * /*bmain*/, World *wo)
{
/* icons */
BKE_icon_changed(BKE_icon_id_ensure(&wo->id));
diff --git a/source/blender/editors/render/render_view.cc b/source/blender/editors/render/render_view.cc
index 7569b3600a1..f0427bf8683 100644
--- a/source/blender/editors/render/render_view.cc
+++ b/source/blender/editors/render/render_view.cc
@@ -256,7 +256,7 @@ ScrArea *render_view_open(bContext *C, int mx, int my, ReportList *reports)
/*************************** cancel render viewer **********************/
-static int render_view_cancel_exec(bContext *C, wmOperator *UNUSED(op))
+static int render_view_cancel_exec(bContext *C, wmOperator * /*op*/)
{
wmWindow *win = CTX_wm_window(C);
ScrArea *area = CTX_wm_area(C);