From 9fb43f28e0cd3d658e1b77073e6327d8cd4e3f84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20D=C3=ADaz=20M=C3=A1s?= Date: Fri, 18 Feb 2022 22:28:23 +0100 Subject: [PATCH] Use standard [[maybe_unused]] --- include/exiv2/types.hpp | 6 ------ src/canonmn_int.cpp | 4 ++-- src/minoltamn_int.cpp | 4 ++-- src/olympusmn_int.cpp | 2 +- 4 files changed, 5 insertions(+), 11 deletions(-) diff --git a/include/exiv2/types.hpp b/include/exiv2/types.hpp index 82ef717e..f4e000b4 100644 --- a/include/exiv2/types.hpp +++ b/include/exiv2/types.hpp @@ -40,12 +40,6 @@ */ #define EXV_CALL_MEMBER_FN(object,ptrToMember) ((object).*(ptrToMember)) -#ifndef _MSC_VER -#define EXV_UNUSED [[gnu::unused]] -#else -#define EXV_UNUSED -#endif - // ***************************************************************************** // forward declarations struct tm; diff --git a/src/canonmn_int.cpp b/src/canonmn_int.cpp index aa58f8b3..5fc630c9 100644 --- a/src/canonmn_int.cpp +++ b/src/canonmn_int.cpp @@ -437,7 +437,7 @@ namespace Exiv2 { // Categories, tag 0x0023 - EXV_UNUSED constexpr TagDetails canonCategories[] = { + [[maybe_unused]] constexpr TagDetails canonCategories[] = { { 0x0001, N_("People") }, { 0x0002, N_("Scenery") }, { 0x0004, N_("Events") }, @@ -2110,7 +2110,7 @@ namespace Exiv2 { }; //! ManualFlashOutput, tag 0x0029 - EXV_UNUSED constexpr TagDetails canonCsManualFlashOutput[] = { + [[maybe_unused]] constexpr TagDetails canonCsManualFlashOutput[] = { { 0x0000, N_("n/a") }, { 0x0500, N_("Full") }, { 0x0502, N_("Medium") }, diff --git a/src/minoltamn_int.cpp b/src/minoltamn_int.cpp index b5b6b64e..6e761fa4 100644 --- a/src/minoltamn_int.cpp +++ b/src/minoltamn_int.cpp @@ -63,7 +63,7 @@ namespace Exiv2 { }; //! Lookup table to translate Minolta image quality values to readable labels - EXV_UNUSED constexpr TagDetails minoltaImageQuality[] = { + [[maybe_unused]] constexpr TagDetails minoltaImageQuality[] = { { 0, N_("Raw") }, { 1, N_("Super Fine") }, { 2, N_("Fine") }, @@ -273,7 +273,7 @@ namespace Exiv2 { }; //! Lookup table to translate Minolta Std camera settings AF points values to readable labels - EXV_UNUSED constexpr TagDetails minoltaAFPointsStd[] = { + [[maybe_unused]] constexpr TagDetails minoltaAFPointsStd[] = { { 0, N_("Center") }, { 1, N_("Top") }, { 2, N_("Top-right") }, diff --git a/src/olympusmn_int.cpp b/src/olympusmn_int.cpp index 2a4e6c02..9c71c469 100644 --- a/src/olympusmn_int.cpp +++ b/src/olympusmn_int.cpp @@ -490,7 +490,7 @@ namespace Exiv2 { }; //! FocusMode, tag 0x0301 - EXV_UNUSED constexpr TagDetails olympusCsFocusMode[] = { + [[maybe_unused]] constexpr TagDetails olympusCsFocusMode[] = { { 0, N_("Single AF") }, { 1, N_("Sequential shooting AF") }, { 2, N_("Continuous AF") },