From 97746129d5870beedc40e3c035c7982ce8a6bebc Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Mon, 3 Oct 2022 17:37:25 -0500 Subject: 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*/` --- source/blender/imbuf/intern/openexr/openexr_api.cpp | 4 ++-- source/blender/imbuf/intern/transform.cc | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'source/blender/imbuf') diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index 8468aaa70b9..c28e8350622 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -456,7 +456,7 @@ static void openexr_header_metadata(Header *header, struct ImBuf *ibuf) static void openexr_header_metadata_callback(void *data, const char *propname, char *prop, - int UNUSED(len)) + int /*len*/) { Header *header = (Header *)data; header->insert(propname, StringAttribute(prop)); @@ -2159,7 +2159,7 @@ struct ImBuf *imb_load_openexr(const uchar *mem, } struct ImBuf *imb_load_filepath_thumbnail_openexr(const char *filepath, - const int UNUSED(flags), + const int /*flags*/, const size_t max_thumb_size, char colorspace[], size_t *r_width, diff --git a/source/blender/imbuf/intern/transform.cc b/source/blender/imbuf/intern/transform.cc index 532652df189..edded204527 100644 --- a/source/blender/imbuf/intern/transform.cc +++ b/source/blender/imbuf/intern/transform.cc @@ -134,8 +134,7 @@ class NoDiscard : public BaseDiscard { * * Will never discard any pixels. */ - bool should_discard(const TransformUserData &UNUSED(user_data), - const float UNUSED(uv[2])) override + bool should_discard(const TransformUserData & /*user_data*/, const float UNUSED(uv[2])) override { return false; } @@ -216,12 +215,12 @@ class BaseUVWrapping { */ class PassThroughUV : public BaseUVWrapping { public: - float modify_u(const ImBuf *UNUSED(source_buffer), float u) override + float modify_u(const ImBuf * /*source_buffer*/, float u) override { return u; } - float modify_v(const ImBuf *UNUSED(source_buffer), float v) override + float modify_v(const ImBuf * /*source_buffer*/, float v) override { return v; } -- cgit v1.2.3