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/blenlib/intern
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/blenlib/intern')
-rw-r--r--source/blender/blenlib/intern/delaunay_2d.cc4
-rw-r--r--source/blender/blenlib/intern/generic_virtual_array.cc12
-rw-r--r--source/blender/blenlib/intern/generic_virtual_vector_array.cc8
-rw-r--r--source/blender/blenlib/intern/mesh_boolean.cc2
-rw-r--r--source/blender/blenlib/intern/mesh_intersect.cc14
-rw-r--r--source/blender/blenlib/intern/task_graph.cc2
-rw-r--r--source/blender/blenlib/intern/task_range.cc2
7 files changed, 22 insertions, 22 deletions
diff --git a/source/blender/blenlib/intern/delaunay_2d.cc b/source/blender/blenlib/intern/delaunay_2d.cc
index 6280fe1010f..afecf9ea838 100644
--- a/source/blender/blenlib/intern/delaunay_2d.cc
+++ b/source/blender/blenlib/intern/delaunay_2d.cc
@@ -45,7 +45,7 @@ template<> double math_abs<double>(const double v)
return fabs(v);
}
-template<typename T> double math_to_double(const T UNUSED(v))
+template<typename T> double math_to_double(const T /*v*/)
{
BLI_assert(false); /* Need implementation for other type. */
return 0.0;
@@ -2645,7 +2645,7 @@ void prepare_cdt_for_output(CDT_state<T> *cdt_state, const CDT_output_type outpu
template<typename T>
CDT_result<T> get_cdt_output(CDT_state<T> *cdt_state,
- const CDT_input<T> UNUSED(input),
+ const CDT_input<T> /*input*/,
CDT_output_type output_type)
{
CDT_output_type oty = output_type;
diff --git a/source/blender/blenlib/intern/generic_virtual_array.cc b/source/blender/blenlib/intern/generic_virtual_array.cc
index f66b1e14fc6..b0623175dc7 100644
--- a/source/blender/blenlib/intern/generic_virtual_array.cc
+++ b/source/blender/blenlib/intern/generic_virtual_array.cc
@@ -51,7 +51,7 @@ CommonVArrayInfo GVArrayImpl::common_info() const
return {};
}
-bool GVArrayImpl::try_assign_VArray(void *UNUSED(varray)) const
+bool GVArrayImpl::try_assign_VArray(void * /*varray*/) const
{
return false;
}
@@ -102,7 +102,7 @@ void GVMutableArray::fill(const void *value)
}
}
-bool GVMutableArrayImpl::try_assign_VMutableArray(void *UNUSED(varray)) const
+bool GVMutableArrayImpl::try_assign_VMutableArray(void * /*varray*/) const
{
return false;
}
@@ -172,11 +172,11 @@ void GVArrayImpl_For_GSpan::materialize_compressed_to_uninitialized(const IndexM
/* Generic virtual array where each element has the same value. The value is not owned. */
-void GVArrayImpl_For_SingleValueRef::get(const int64_t UNUSED(index), void *r_value) const
+void GVArrayImpl_For_SingleValueRef::get(const int64_t /*index*/, void *r_value) const
{
type_->copy_assign(value_, r_value);
}
-void GVArrayImpl_For_SingleValueRef::get_to_uninitialized(const int64_t UNUSED(index),
+void GVArrayImpl_For_SingleValueRef::get_to_uninitialized(const int64_t /*index*/,
void *r_value) const
{
type_->copy_construct(value_, r_value);
@@ -261,11 +261,11 @@ template<int BufferSize> class GVArrayImpl_For_SmallTrivialSingleValue : public
}
private:
- void get(const int64_t UNUSED(index), void *r_value) const override
+ void get(const int64_t /*index*/, void *r_value) const override
{
this->copy_value_to(r_value);
}
- void get_to_uninitialized(const int64_t UNUSED(index), void *r_value) const override
+ void get_to_uninitialized(const int64_t /*index*/, void *r_value) const override
{
this->copy_value_to(r_value);
}
diff --git a/source/blender/blenlib/intern/generic_virtual_vector_array.cc b/source/blender/blenlib/intern/generic_virtual_vector_array.cc
index 8fd1fb50b72..5d6985e16c8 100644
--- a/source/blender/blenlib/intern/generic_virtual_vector_array.cc
+++ b/source/blender/blenlib/intern/generic_virtual_vector_array.cc
@@ -16,12 +16,12 @@ void GVArray_For_GVVectorArrayIndex::get_to_uninitialized(const int64_t index_in
vector_array_.get_vector_element(index_, index_in_vector, r_value);
}
-int64_t GVVectorArray_For_SingleGVArray::get_vector_size_impl(const int64_t UNUSED(index)) const
+int64_t GVVectorArray_For_SingleGVArray::get_vector_size_impl(const int64_t /*index*/) const
{
return varray_.size();
}
-void GVVectorArray_For_SingleGVArray::get_vector_element_impl(const int64_t UNUSED(index),
+void GVVectorArray_For_SingleGVArray::get_vector_element_impl(const int64_t /*index*/,
const int64_t index_in_vector,
void *r_value) const
{
@@ -33,12 +33,12 @@ bool GVVectorArray_For_SingleGVArray::is_single_vector_impl() const
return true;
}
-int64_t GVVectorArray_For_SingleGSpan::get_vector_size_impl(const int64_t UNUSED(index)) const
+int64_t GVVectorArray_For_SingleGSpan::get_vector_size_impl(const int64_t /*index*/) const
{
return span_.size();
}
-void GVVectorArray_For_SingleGSpan::get_vector_element_impl(const int64_t UNUSED(index),
+void GVVectorArray_For_SingleGSpan::get_vector_element_impl(const int64_t /*index*/,
const int64_t index_in_vector,
void *r_value) const
{
diff --git a/source/blender/blenlib/intern/mesh_boolean.cc b/source/blender/blenlib/intern/mesh_boolean.cc
index 0d8ad1da582..3efe62d2984 100644
--- a/source/blender/blenlib/intern/mesh_boolean.cc
+++ b/source/blender/blenlib/intern/mesh_boolean.cc
@@ -2527,7 +2527,7 @@ class InsideShapeTestData {
static void inside_shape_callback(void *userdata,
int index,
const BVHTreeRay *ray,
- BVHTreeRayHit *UNUSED(hit))
+ BVHTreeRayHit * /*hit*/)
{
const int dbg_level = 0;
if (dbg_level > 0) {
diff --git a/source/blender/blenlib/intern/mesh_intersect.cc b/source/blender/blenlib/intern/mesh_intersect.cc
index 7553898f5d3..ee29662698a 100644
--- a/source/blender/blenlib/intern/mesh_intersect.cc
+++ b/source/blender/blenlib/intern/mesh_intersect.cc
@@ -829,13 +829,13 @@ struct BBPadData {
static void pad_face_bb_range_func(void *__restrict userdata,
const int iter,
- const TaskParallelTLS *__restrict UNUSED(tls))
+ const TaskParallelTLS *__restrict /*tls*/)
{
BBPadData *pad_data = static_cast<BBPadData *>(userdata);
(*pad_data->face_bounding_box)[iter].expand(pad_data->pad);
}
-static void calc_face_bb_reduce(const void *__restrict UNUSED(userdata),
+static void calc_face_bb_reduce(const void *__restrict /*userdata*/,
void *__restrict chunk_join,
void *__restrict chunk)
{
@@ -2451,7 +2451,7 @@ class TriOverlaps {
}
private:
- static bool only_different_shapes(void *userdata, int index_a, int index_b, int UNUSED(thread))
+ static bool only_different_shapes(void *userdata, int index_a, int index_b, int /*thread*/)
{
CBData *cbdata = static_cast<CBData *>(userdata);
return cbdata->tm.face(index_a)->orig != cbdata->tm.face(index_b)->orig;
@@ -2487,7 +2487,7 @@ static std::pair<int, int> canon_int_pair(int a, int b)
static void calc_overlap_itts_range_func(void *__restrict userdata,
const int iter,
- const TaskParallelTLS *__restrict UNUSED(tls))
+ const TaskParallelTLS *__restrict /*tls*/)
{
constexpr int dbg_level = 0;
OverlapIttsData *data = static_cast<OverlapIttsData *>(userdata);
@@ -2682,7 +2682,7 @@ static CDT_data calc_cluster_subdivided(const CoplanarClusterInfo &clinfo,
const IMesh &tm,
const TriOverlaps &ov,
const Map<std::pair<int, int>, ITT_value> &itt_map,
- IMeshArena *UNUSED(arena))
+ IMeshArena * /*arena*/)
{
constexpr int dbg_level = 0;
BLI_assert(c < clinfo.tot_cluster());
@@ -2889,7 +2889,7 @@ static void degenerate_range_func(void *__restrict userdata,
chunk_data->has_degenerate_tri |= is_degenerate;
}
-static void degenerate_reduce(const void *__restrict UNUSED(userdata),
+static void degenerate_reduce(const void *__restrict /*userdata*/,
void *__restrict chunk_join,
void *__restrict chunk)
{
@@ -2931,7 +2931,7 @@ static IMesh remove_degenerate_tris(const IMesh &tm_in)
IMesh trimesh_self_intersect(const IMesh &tm_in, IMeshArena *arena)
{
return trimesh_nary_intersect(
- tm_in, 1, [](int UNUSED(t)) { return 0; }, true, arena);
+ tm_in, 1, [](int /*t*/) { return 0; }, true, arena);
}
IMesh trimesh_nary_intersect(const IMesh &tm_in,
diff --git a/source/blender/blenlib/intern/task_graph.cc b/source/blender/blenlib/intern/task_graph.cc
index 6c1cc818d75..5bc84bf7573 100644
--- a/source/blender/blenlib/intern/task_graph.cc
+++ b/source/blender/blenlib/intern/task_graph.cc
@@ -75,7 +75,7 @@ struct TaskNode {
}
#ifdef WITH_TBB
- tbb::flow::continue_msg run(const tbb::flow::continue_msg UNUSED(input))
+ tbb::flow::continue_msg run(const tbb::flow::continue_msg /*input*/)
{
run_func(task_data);
return tbb::flow::continue_msg();
diff --git a/source/blender/blenlib/intern/task_range.cc b/source/blender/blenlib/intern/task_range.cc
index 181b760bea1..20551aba93b 100644
--- a/source/blender/blenlib/intern/task_range.cc
+++ b/source/blender/blenlib/intern/task_range.cc
@@ -132,7 +132,7 @@ void BLI_task_parallel_range(const int start,
}
}
-int BLI_task_parallel_thread_id(const TaskParallelTLS *UNUSED(tls))
+int BLI_task_parallel_thread_id(const TaskParallelTLS * /*tls*/)
{
#ifdef WITH_TBB
/* Get a unique thread ID for texture nodes. In the future we should get rid