Skip to content

Commit 174c759

Browse files
committed
convert const TagInfo returns to constexpr
Signed-off-by: Rosen Penev <[email protected]>
1 parent f45b67c commit 174c759

23 files changed

+418
-614
lines changed

src/canonmn_int.cpp

Lines changed: 0 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -681,10 +681,6 @@ constexpr TagInfo CanonMakerNote::tagInfo_[] = {
681681
IfdId::canonId, SectionId::makerTags, asciiString, -1, printValue},
682682
};
683683

684-
const TagInfo* CanonMakerNote::tagList() {
685-
return tagInfo_;
686-
}
687-
688684
// Canon Movie Info Tag
689685
constexpr TagInfo CanonMakerNote::tagInfoMv_[] = {
690686
{0x0001, "FrameRate", N_("FrameRate"), N_("FrameRate"), IfdId::canonMvId, SectionId::makerTags, unsignedShort, -1,
@@ -707,10 +703,6 @@ constexpr TagInfo CanonMakerNote::tagInfoMv_[] = {
707703
-1, printValue},
708704
};
709705

710-
const TagInfo* CanonMakerNote::tagListMv() {
711-
return tagInfoMv_;
712-
}
713-
714706
// MyColors, tag 0x001d
715707
constexpr TagDetails canonMyColors[] = {
716708
{0, N_("Off")}, {1, N_("Positive Film")}, {2, N_("Light Skin Tone")}, {3, N_("Dark Skin Tone")},
@@ -725,10 +717,6 @@ constexpr TagInfo CanonMakerNote::tagInfoMc_[] = {
725717
unsignedShort, -1, EXV_PRINT_TAG(canonMyColors)},
726718
};
727719

728-
const TagInfo* CanonMakerNote::tagListMc() {
729-
return tagInfoMc_;
730-
}
731-
732720
// Canon FaceDetect 1 Info Tag
733721
constexpr TagInfo CanonMakerNote::tagInfoFcd1_[] = {
734722
{0x0002, "FacesDetected", N_("Faces Detected"), N_("Faces Detected"), IfdId::canonFcd1Id, SectionId::makerTags,
@@ -755,10 +743,6 @@ constexpr TagInfo CanonMakerNote::tagInfoFcd1_[] = {
755743
signedShort, -1, printValue},
756744
};
757745

758-
const TagInfo* CanonMakerNote::tagListFcd1() {
759-
return tagInfoFcd1_;
760-
}
761-
762746
// Canon FaceDetect 2 Info Tag
763747
constexpr TagInfo CanonMakerNote::tagInfoFcd2_[] = {
764748
{0x0001, "FaceWidth", N_("Face Width"), N_("Faces Width"), IfdId::canonFcd2Id, SectionId::makerTags, unsignedByte,
@@ -767,10 +751,6 @@ constexpr TagInfo CanonMakerNote::tagInfoFcd2_[] = {
767751
unsignedByte, -1, printValue},
768752
};
769753

770-
const TagInfo* CanonMakerNote::tagListFcd2() {
771-
return tagInfoFcd2_;
772-
}
773-
774754
// Canon ContrastInfo, tag 0x001d
775755
constexpr TagDetails canonContrastInfo[] = {
776756
{0x0, N_("Off")},
@@ -784,10 +764,6 @@ constexpr TagInfo CanonMakerNote::tagInfoCo_[] = {
784764
SectionId::makerTags, unsignedShort, -1, EXV_PRINT_TAG(canonContrastInfo)},
785765
};
786766

787-
const TagInfo* CanonMakerNote::tagListCo() {
788-
return tagInfoCo_;
789-
}
790-
791767
// Canon WhiteBalance Info Tag
792768
constexpr TagInfo CanonMakerNote::tagInfoWbi_[] = {
793769
{0x0002, "WB_GRGBLevelsAuto", N_("WB_G RGB Levels Auto"), N_("WB_G RGB Levels Auto"), IfdId::canonWbId,
@@ -812,20 +788,12 @@ constexpr TagInfo CanonMakerNote::tagInfoWbi_[] = {
812788
SectionId::makerTags, unsignedLong, -1, printValue},
813789
};
814790

815-
const TagInfo* CanonMakerNote::tagListWbi() {
816-
return tagInfoWbi_;
817-
}
818-
819791
// Canon FaceDetect 3 Info Tag
820792
constexpr TagInfo CanonMakerNote::tagInfoFcd3_[] = {
821793
{0x0003, "FacesDetected", N_("Face Detected"), N_("Faces Detected"), IfdId::canonFcd3Id, SectionId::makerTags,
822794
unsignedShort, -1, printValue},
823795
};
824796

825-
const TagInfo* CanonMakerNote::tagListFcd3() {
826-
return tagInfoFcd3_;
827-
}
828-
829797
/*
830798
// Canon Aspect Info, tag 0x001d
831799
constexpr TagDetails canonAspectInfo[] = {
@@ -853,10 +821,6 @@ constexpr TagInfo CanonMakerNote::tagInfoAs_[] = {
853821
SectionId::makerTags, unsignedLong, -1, printValue},
854822
};
855823

856-
const TagInfo* CanonMakerNote::tagListAs() {
857-
return tagInfoAs_;
858-
}
859-
860824
// Canon Color Balance Info Tag
861825
constexpr TagInfo CanonMakerNote::tagInfoCbi_[] = {
862826
{0x0001, "WB_RGGBLevelsAuto", N_("WB_RGGB Levels Auto"), N_("WB_RGGB Levels Auto"), IfdId::canonCbId,
@@ -881,20 +845,12 @@ constexpr TagInfo CanonMakerNote::tagInfoCbi_[] = {
881845
SectionId::makerTags, signedShort, -1, printValue},
882846
};
883847

884-
const TagInfo* CanonMakerNote::tagListCbi() {
885-
return tagInfoCbi_;
886-
}
887-
888848
// Canon Flags Tag
889849
constexpr TagInfo CanonMakerNote::tagInfoFl_[] = {
890850
{0x0001, "ModifiedParamFlag", N_("Modified Param Flag"), N_("Modified Param Flag"), IfdId::canonFlId,
891851
SectionId::makerTags, signedShort, -1, printValue},
892852
};
893853

894-
const TagInfo* CanonMakerNote::tagListFl() {
895-
return tagInfoFl_;
896-
}
897-
898854
// Canon Modified ToneCurve Info, tag 0x0001
899855
constexpr TagDetails canonModifiedToneCurve[] = {
900856
{0, N_("Standard")},
@@ -933,10 +889,6 @@ constexpr TagInfo CanonMakerNote::tagInfoMo_[] = {
933889
SectionId::makerTags, signedShort, -1, printValue},
934890
};
935891

936-
const TagInfo* CanonMakerNote::tagListMo() {
937-
return tagInfoMo_;
938-
}
939-
940892
// Canon Preview Quality Info, tag 0x0001
941893
constexpr TagDetails canonPreviewQuality[] = {
942894
{-1, N_("n/a")}, {1, N_("Economy")}, {2, N_("Normal")}, {3, N_("Fine")}, {4, N_("RAW")},
@@ -957,10 +909,6 @@ constexpr TagInfo CanonMakerNote::tagInfoPreI_[] = {
957909
SectionId::makerTags, unsignedLong, -1, printValue},
958910
};
959911

960-
const TagInfo* CanonMakerNote::tagListPreI() {
961-
return tagInfoPreI_;
962-
}
963-
964912
// Canon Color Info Tag
965913
constexpr TagInfo CanonMakerNote::tagInfoCi_[] = {
966914
{0x0001, "Saturation", N_("Saturation"), N_("Saturation"), IfdId::canonCiId, SectionId::makerTags, signedShort, -1,
@@ -971,10 +919,6 @@ constexpr TagInfo CanonMakerNote::tagInfoCi_[] = {
971919
-1, EXV_PRINT_TAG(canonColorSpace)},
972920
};
973921

974-
const TagInfo* CanonMakerNote::tagListCi() {
975-
return tagInfoCi_;
976-
}
977-
978922
// Canon AFMicroAdjMode Quality Info, tag 0x0001
979923
constexpr TagDetails canonAFMicroAdjMode[] = {
980924
{0, N_("Disable")},
@@ -992,10 +936,6 @@ constexpr TagInfo CanonMakerNote::tagInfoAfMiAdj_[] = {
992936
IfdId::canonAfMiAdjId, SectionId::makerTags, signedShort, 1, printValue},
993937
};
994938

995-
const TagInfo* CanonMakerNote::tagListAfMiAdj() {
996-
return tagInfoAfMiAdj_;
997-
}
998-
999939
// Canon VignettingCorr Tag
1000940
constexpr TagInfo CanonMakerNote::tagInfoVigCor_[] = {
1001941
{0x0000, "VignettingCorrVersion", N_("Vignetting Corr Version"), N_("Vignetting Corr Version"),
@@ -1018,10 +958,6 @@ constexpr TagInfo CanonMakerNote::tagInfoVigCor_[] = {
1018958
SectionId::makerTags, signedShort, -1, printValue},
1019959
};
1020960

1021-
const TagInfo* CanonMakerNote::tagListVigCor() {
1022-
return tagInfoVigCor_;
1023-
}
1024-
1025961
// Canon VignettingCorr2 Tag
1026962
constexpr TagInfo CanonMakerNote::tagInfoVigCor2_[] = {
1027963
{0x0005, "PeripheralLightingSetting", N_("Peripheral Lighting Setting"), N_("Peripheral Lighting Setting"),
@@ -1034,10 +970,6 @@ constexpr TagInfo CanonMakerNote::tagInfoVigCor2_[] = {
1034970
IfdId::canonVigCor2Id, SectionId::makerTags, signedLong, 1, printValue} // important to add end of tag
1035971
};
1036972

1037-
const TagInfo* CanonMakerNote::tagListVigCor2() {
1038-
return tagInfoVigCor2_;
1039-
}
1040-
1041973
// Canon AutoLightingOptimizer, tag 0x0002
1042974
constexpr TagDetails canonAutoLightingOptimizer[] = {
1043975
{0, N_("Standard")},
@@ -1095,10 +1027,6 @@ constexpr TagInfo CanonMakerNote::tagInfoLiOp_[] = {
10951027
printValue} // important to add end of tag
10961028
};
10971029

1098-
const TagInfo* CanonMakerNote::tagListLiOp() {
1099-
return tagInfoLiOp_;
1100-
}
1101-
11021030
// Canon LensInfo Tag
11031031
constexpr TagInfo CanonMakerNote::tagInfoLe_[] = {
11041032
{0x0000, "LensSerialNumber", N_("Lens Serial Number"),
@@ -1109,10 +1037,6 @@ constexpr TagInfo CanonMakerNote::tagInfoLe_[] = {
11091037
SectionId::makerTags, undefined, 1, printValue} // important to add end of tag
11101038
};
11111039

1112-
const TagInfo* CanonMakerNote::tagListLe() {
1113-
return tagInfoLe_;
1114-
}
1115-
11161040
// Canon AmbienceSelection, tag 0x0001
11171041
constexpr TagDetails canonAmbienceSelection[] = {
11181042
{0, N_("Standard")}, {1, N_("Vivid")}, {2, N_("Warm")}, {3, N_("Soft")}, {4, N_("Cool")},
@@ -1127,10 +1051,6 @@ constexpr TagInfo CanonMakerNote::tagInfoAm_[] = {
11271051
SectionId::makerTags, signedLong, 1, printValue} // important to add end of tag
11281052
};
11291053

1130-
const TagInfo* CanonMakerNote::tagListAm() {
1131-
return tagInfoAm_;
1132-
}
1133-
11341054
// Canon MultiExposure, tag 0x0001
11351055
constexpr TagDetails canonMultiExposure[] = {
11361056
{0, N_("Off")},
@@ -1158,10 +1078,6 @@ constexpr TagInfo CanonMakerNote::tagInfoMe_[] = {
11581078
SectionId::makerTags, signedLong, 1, printValue} // important to add end of tag
11591079
};
11601080

1161-
const TagInfo* CanonMakerNote::tagListMe() {
1162-
return tagInfoMe_;
1163-
}
1164-
11651081
// Canon FilterInfo, tag 0x0001
11661082
constexpr TagDetails canonFilterInfo[] = {
11671083
{-1, N_("Off")},
@@ -1199,10 +1115,6 @@ constexpr TagInfo CanonMakerNote::tagInfoFil_[] = {
11991115
SectionId::makerTags, signedLong, 1, printValue} // important to add end of tag
12001116
};
12011117

1202-
const TagInfo* CanonMakerNote::tagListFil() {
1203-
return tagInfoFil_;
1204-
}
1205-
12061118
// Canon HDR, tag 0x0001
12071119
constexpr TagDetails canonHdr[] = {
12081120
{0, N_("Off")},
@@ -1226,10 +1138,6 @@ constexpr TagInfo CanonMakerNote::tagInfoHdr_[] = {
12261138
signedLong, 1, printValue},
12271139
};
12281140

1229-
const TagInfo* CanonMakerNote::tagListHdr() {
1230-
return tagInfoHdr_;
1231-
}
1232-
12331141
// Canon AIServoFirstImage, tag 0x0001
12341142
constexpr TagDetails canonAIServoFirstImage[] = {
12351143
{0, N_("Equal Priority")},
@@ -1372,10 +1280,6 @@ constexpr TagInfo CanonMakerNote::tagInfoAfC_[] = {
13721280
SectionId::makerTags, signedLong, 1, printValue} // important to add end of tag
13731281
};
13741282

1375-
const TagInfo* CanonMakerNote::tagListAfC() {
1376-
return tagInfoAfC_;
1377-
}
1378-
13791283
// Canon RawBurstInfo Info Tag
13801284
constexpr TagInfo CanonMakerNote::tagInfoRawB_[] = {
13811285
{0x0001, "RawBurstImageNum", N_("Raw Burst Image Num"), N_("Raw Burst Image Num"), IfdId::canonRawBId,
@@ -1386,10 +1290,6 @@ constexpr TagInfo CanonMakerNote::tagInfoRawB_[] = {
13861290
SectionId::makerTags, signedLong, 1, printValue} // important to add end of tag
13871291
};
13881292

1389-
const TagInfo* CanonMakerNote::tagListRawB() {
1390-
return tagInfoRawB_;
1391-
}
1392-
13931293
//! Macro, tag 0x0001
13941294
constexpr TagDetails canonCsMacro[] = {
13951295
{1, N_("On")},
@@ -2279,10 +2179,6 @@ constexpr TagInfo CanonMakerNote::tagInfoCs_[] = {
22792179
SectionId::makerTags, signedShort, 1, printValue},
22802180
};
22812181

2282-
const TagInfo* CanonMakerNote::tagListCs() {
2283-
return tagInfoCs_;
2284-
}
2285-
22862182
//! AFPointUsed, tag 0x000e
22872183
constexpr TagDetailsBitmask canonSiAFPointUsed[] = {
22882184
{0x0004, N_("left")},
@@ -2390,10 +2286,6 @@ constexpr TagInfo CanonMakerNote::tagInfoSi_[] = {
23902286
SectionId::makerTags, unsignedShort, 1, printValue},
23912287
};
23922288

2393-
const TagInfo* CanonMakerNote::tagListSi() {
2394-
return tagInfoSi_;
2395-
}
2396-
23972289
//! PanoramaDirection, tag 0x0005
23982290
constexpr TagDetails canonPaDirection[] = {
23992291
{0, N_("Left to right")}, {1, N_("Right to left")}, {2, N_("Bottom to top")},
@@ -2411,10 +2303,6 @@ constexpr TagInfo CanonMakerNote::tagInfoPa_[] = {
24112303
SectionId::makerTags, unsignedShort, 1, printValue},
24122304
};
24132305

2414-
const TagInfo* CanonMakerNote::tagListPa() {
2415-
return tagInfoPa_;
2416-
}
2417-
24182306
// Canon Custom Function Tag Info
24192307
constexpr TagInfo CanonMakerNote::tagInfoCf_[] = {
24202308
{0x0001, "NoiseReduction", N_("Noise Reduction"), N_("Long exposure noise reduction"), IfdId::canonCfId,
@@ -2452,10 +2340,6 @@ constexpr TagInfo CanonMakerNote::tagInfoCf_[] = {
24522340
SectionId::makerTags, unsignedShort, 1, printValue},
24532341
};
24542342

2455-
const TagInfo* CanonMakerNote::tagListCf() {
2456-
return tagInfoCf_;
2457-
}
2458-
24592343
//! AFPointsUsed, tag 0x0016
24602344
constexpr TagDetailsBitmask canonPiAFPointsUsed[] = {
24612345
{0x01, N_("right")}, {0x02, N_("mid-right")}, {0x04, N_("bottom")}, {0x08, N_("center")},
@@ -2488,10 +2372,6 @@ constexpr TagInfo CanonMakerNote::tagInfoPi_[] = {
24882372
SectionId::makerTags, unsignedShort, 1, printValue},
24892373
};
24902374

2491-
const TagInfo* CanonMakerNote::tagListPi() {
2492-
return tagInfoPi_;
2493-
}
2494-
24952375
//! BracketMode, tag 0x0003
24962376
constexpr TagDetails canonBracketMode[] = {
24972377
{0, N_("Off")}, {1, N_("AEB")}, {2, N_("FEB")}, {3, N_("ISO")}, {4, N_("WB")},
@@ -2661,10 +2541,6 @@ constexpr TagInfo CanonMakerNote::tagInfoFi_[] = {
26612541
SectionId::makerTags, signedShort, 1, printValue},
26622542
};
26632543

2664-
const TagInfo* CanonMakerNote::tagListFi() {
2665-
return tagInfoFi_;
2666-
}
2667-
26682544
//! Tone Curve Values
26692545
constexpr TagDetails canonToneCurve[] = {
26702546
{0, N_("Standard")},
@@ -2709,10 +2585,6 @@ constexpr TagInfo CanonMakerNote::tagInfoPr_[] = {
27092585
SectionId::makerTags, signedShort, 1, printValue},
27102586
};
27112587

2712-
const TagInfo* CanonMakerNote::tagListPr() {
2713-
return tagInfoPr_;
2714-
}
2715-
27162588
//! canonTimeZoneCity - array of cityID/cityName used by Canon
27172589
constexpr TagDetails canonTimeZoneCity[] = {
27182590
{0x0000, N_("n/a")},
@@ -2764,10 +2636,6 @@ constexpr TagInfo CanonMakerNote::tagInfoTi_[] = {
27642636
SectionId::makerTags, signedLong, 1, printValue},
27652637
};
27662638

2767-
const TagInfo* CanonMakerNote::tagListTi() {
2768-
return tagInfoTi_;
2769-
}
2770-
27712639
std::ostream& CanonMakerNote::printFiFileNumber(std::ostream& os, const Value& value, const ExifData* metadata) {
27722640
if (!metadata || value.typeId() != unsignedLong || value.count() == 0) {
27732641
return os << "(" << value << ")";

0 commit comments

Comments
 (0)