Clang-Tidy: enable readability-named-parameter

This commit is contained in:
Jacques Lucke 2020-07-03 17:07:01 +02:00
parent fac2e63bc0
commit 4a5389816b
11 changed files with 38 additions and 23 deletions

View File

@ -17,7 +17,6 @@ Checks: >
-readability-inconsistent-declaration-parameter-name, -readability-inconsistent-declaration-parameter-name,
-readability-non-const-parameter, -readability-non-const-parameter,
-readability-redundant-preprocessor, -readability-redundant-preprocessor,
-readability-named-parameter,
-readability-function-size, -readability-function-size,
-readability-function-size, -readability-function-size,
-readability-redundant-string-init, -readability-redundant-string-init,

View File

@ -62,7 +62,7 @@ struct RangeTask {
} }
/* Splitting constructor for parallel reduce. */ /* Splitting constructor for parallel reduce. */
RangeTask(RangeTask &other, tbb::split) RangeTask(RangeTask &other, tbb::split /* unused */)
: func(other.func), userdata(other.userdata), settings(other.settings) : func(other.func), userdata(other.userdata), settings(other.settings)
{ {
init_chunk(settings->userdata_chunk); init_chunk(settings->userdata_chunk);

View File

@ -56,7 +56,7 @@
#endif #endif
/* local prototypes --------------------- */ /* local prototypes --------------------- */
void BLO_blendhandle_print_sizes(BlendHandle *, void *); void BLO_blendhandle_print_sizes(BlendHandle *bh, void *fp);
/* Access routines used by filesel. */ /* Access routines used by filesel. */

View File

@ -359,12 +359,24 @@ enum {
static ImBuf *gSpecialFileImages[SPECIAL_IMG_MAX]; static ImBuf *gSpecialFileImages[SPECIAL_IMG_MAX];
static void filelist_readjob_main( static void filelist_readjob_main(FileList *filelist,
struct FileList *, const char *, short *, short *, float *, ThreadMutex *); const char *main_name,
static void filelist_readjob_lib( short *stop,
struct FileList *, const char *, short *, short *, float *, ThreadMutex *); short *do_update,
static void filelist_readjob_dir( float *progress,
struct FileList *, const char *, short *, short *, float *, ThreadMutex *); ThreadMutex *lock);
static void filelist_readjob_lib(FileList *filelist,
const char *main_name,
short *stop,
short *do_update,
float *progress,
ThreadMutex *lock);
static void filelist_readjob_dir(FileList *filelist,
const char *main_name,
short *stop,
short *do_update,
float *progress,
ThreadMutex *lock);
/* helper, could probably go in BKE actually? */ /* helper, could probably go in BKE actually? */
static int groupname_to_code(const char *group); static int groupname_to_code(const char *group);

View File

@ -39,42 +39,42 @@ VISIT(NodeLight)
VISIT(NodeDrawingStyle) VISIT(NodeDrawingStyle)
VISIT(NodeTransform) VISIT(NodeTransform)
void ScenePrettyPrinter::visitNodeShapeBefore(NodeShape &) void ScenePrettyPrinter::visitNodeShapeBefore(NodeShape &UNUSED(shape))
{ {
increaseSpace(); increaseSpace();
} }
void ScenePrettyPrinter::visitNodeShapeAfter(NodeShape &) void ScenePrettyPrinter::visitNodeShapeAfter(NodeShape &UNUSED(shape))
{ {
decreaseSpace(); decreaseSpace();
} }
void ScenePrettyPrinter::visitNodeGroupBefore(NodeGroup &) void ScenePrettyPrinter::visitNodeGroupBefore(NodeGroup &UNUSED(group))
{ {
increaseSpace(); increaseSpace();
} }
void ScenePrettyPrinter::visitNodeGroupAfter(NodeGroup &) void ScenePrettyPrinter::visitNodeGroupAfter(NodeGroup &UNUSED(group))
{ {
decreaseSpace(); decreaseSpace();
} }
void ScenePrettyPrinter::visitNodeDrawingStyleBefore(NodeDrawingStyle &) void ScenePrettyPrinter::visitNodeDrawingStyleBefore(NodeDrawingStyle &UNUSED(style))
{ {
increaseSpace(); increaseSpace();
} }
void ScenePrettyPrinter::visitNodeDrawingStyleAfter(NodeDrawingStyle &) void ScenePrettyPrinter::visitNodeDrawingStyleAfter(NodeDrawingStyle &UNUSED(style))
{ {
decreaseSpace(); decreaseSpace();
} }
void ScenePrettyPrinter::visitNodeTransformBefore(NodeTransform &) void ScenePrettyPrinter::visitNodeTransformBefore(NodeTransform &UNUSED(transform))
{ {
increaseSpace(); increaseSpace();
} }
void ScenePrettyPrinter::visitNodeTransformAfter(NodeTransform &) void ScenePrettyPrinter::visitNodeTransformAfter(NodeTransform &UNUSED(transform))
{ {
decreaseSpace(); decreaseSpace();
} }

View File

@ -24,6 +24,8 @@ extern "C" {
#include "Interface0D.h" #include "Interface0D.h"
#include "BLI_utildefines.h"
namespace Freestyle { namespace Freestyle {
real Interface0D::getX() const real Interface0D::getX() const
@ -74,7 +76,7 @@ Geometry::Vec2r Interface0D::getPoint2D() const
return 0; return 0;
} }
FEdge *Interface0D::getFEdge(Interface0D &) FEdge *Interface0D::getFEdge(Interface0D &UNUSED(element))
{ {
PyErr_SetString(PyExc_TypeError, "method getFEdge() not properly overridden"); PyErr_SetString(PyExc_TypeError, "method getFEdge() not properly overridden");
return 0; return 0;

View File

@ -33,7 +33,7 @@ NodeGroup *ViewMapTesselator::Tesselate(ViewMap *iViewMap)
return Tesselate(viewedges.begin(), viewedges.end()); return Tesselate(viewedges.begin(), viewedges.end());
} }
NodeGroup *ViewMapTesselator::Tesselate(WShape *) NodeGroup *ViewMapTesselator::Tesselate(WShape *UNUSED(shape))
{ {
return NULL; return NULL;
} }

View File

@ -59,7 +59,7 @@ static bool angle_obtuse(WVertex *v, WFace *f)
// FIXME // FIXME
// WVvertex is useless but kept for history reasons // WVvertex is useless but kept for history reasons
static bool triangle_obtuse(WVertex *, WFace *f) static bool triangle_obtuse(WVertex *UNUSED(v), WFace *f)
{ {
bool b = false; bool b = false;
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {

View File

@ -64,7 +64,7 @@ void WingedEdgeBuilder::visitNodeTransform(NodeTransform &tn)
_current_matrix = new_matrix; _current_matrix = new_matrix;
} }
void WingedEdgeBuilder::visitNodeTransformAfter(NodeTransform &) void WingedEdgeBuilder::visitNodeTransformAfter(NodeTransform &UNUSED(transform))
{ {
delete _current_matrix; delete _current_matrix;

View File

@ -34,6 +34,7 @@
#include "BKE_duplilist.h" #include "BKE_duplilist.h"
#include "BLI_assert.h" #include "BLI_assert.h"
#include "BLI_utildefines.h"
#include "DEG_depsgraph_query.h" #include "DEG_depsgraph_query.h"
@ -142,7 +143,8 @@ AbstractHierarchyWriter *USDHierarchyIterator::create_hair_writer(const Hierarch
return new USDHairWriter(create_usd_export_context(context)); return new USDHairWriter(create_usd_export_context(context));
} }
AbstractHierarchyWriter *USDHierarchyIterator::create_particle_writer(const HierarchyContext *) AbstractHierarchyWriter *USDHierarchyIterator::create_particle_writer(
const HierarchyContext *UNUSED(context))
{ {
return nullptr; return nullptr;
} }

View File

@ -82,7 +82,7 @@ void USDHairWriter::do_write(HierarchyContext &context)
} }
} }
bool USDHairWriter::check_is_animated(const HierarchyContext &) const bool USDHairWriter::check_is_animated(const HierarchyContext &UNUSED(context)) const
{ {
return true; return true;
} }