@@ -3432,7 +3432,7 @@ std::ostream& Nikon3MakerNote::printExternalFlashData1Fl6(std::ostream& os, cons
34323432
34333433 if (v0 & 0x01 ) {
34343434 std::ostringstream ossTemp;
3435- printTagBitmask< std::size (nikonFlashAdaptors), nikonFlashAdaptors> (ossTemp, value, metadata);
3435+ EXV_PRINT_TAG_BITMASK (nikonFlashAdaptors)(ossTemp, value, metadata);
34363436 std::string tempStr = ossTemp.str ();
34373437 if (!tempStr.empty ()) {
34383438 os << " , " << tempStr;
@@ -3458,7 +3458,7 @@ std::ostream& Nikon3MakerNote::printExternalFlashData2Fl6(std::ostream& os, cons
34583458
34593459 if (v0 & 0x80 ) {
34603460 os << " , " ;
3461- printTag< std::size (nikonFlashControlMode), nikonFlashControlMode> (os, (value.toUint32 () & 0x0F ), metadata);
3461+ EXV_PRINT_TAG (nikonFlashControlMode)(os, (value.toUint32 () & 0x0F ), metadata);
34623462 }
34633463 os.copyfmt (oss);
34643464 os.flags (f);
@@ -3483,7 +3483,7 @@ std::ostream& Nikon3MakerNote::printExternalFlashData1Fl7(std::ostream& os, cons
34833483 os << (v0 & 0x80 ? _ (" External flash zoom override" ) : _ (" No external flash zoom override" ));
34843484
34853485 std::ostringstream ossTemp;
3486- printTagBitmask< std::size (nikonFlashAdaptors), nikonFlashAdaptors> (ossTemp, value, metadata);
3486+ EXV_PRINT_TAG_BITMASK (nikonFlashAdaptors)(ossTemp, value, metadata);
34873487 std::string tempStr = ossTemp.str ();
34883488 if (!tempStr.empty ()) {
34893489 os << " , " << tempStr;
@@ -3495,17 +3495,9 @@ std::ostream& Nikon3MakerNote::printExternalFlashData1Fl7(std::ostream& os, cons
34953495}
34963496
34973497std::ostream& Nikon3MakerNote::printExternalFlashData2 (std::ostream& os, const Value& value, const ExifData* metadata) {
3498- std::ios::fmtflags f (os.flags ());
3499- if (value.count () != 1 || value.typeId () != unsignedByte) {
3500- os << " (" << value << " )" ;
3501- os.flags (f);
3502- return os;
3503- }
3504-
3505- printTag<std::size (nikonFlashControlMode), nikonFlashControlMode>(os, (value.toUint32 () & 0x0F ), metadata);
3506-
3507- os.flags (f);
3508- return os;
3498+ if (value.count () != 1 || value.typeId () != unsignedByte)
3499+ return os << " (" << value << " )" ;
3500+ return EXV_PRINT_TAG (nikonFlashControlMode)(os, (value.toUint32 () & 0x0F ), metadata);
35093501}
35103502
35113503std::ostream& Nikon3MakerNote::printFlashMasterDataFl6 (std::ostream& os, const Value& value, const ExifData* metadata) {
@@ -3567,20 +3559,9 @@ std::ostream& Nikon3MakerNote::printFlashMasterDataFl7(std::ostream& os, const V
35673559}
35683560
35693561std::ostream& Nikon3MakerNote::printFlashGroupAControlData (std::ostream& os, const Value& value, const ExifData* data) {
3570- std::ios::fmtflags f (os.flags ());
3571- if (value.count () != 1 || value.typeId () != unsignedByte) {
3572- os << " (" << value << " )" ;
3573- os.flags (f);
3574- return os;
3575- }
3576- std::ostringstream oss;
3577- oss.copyfmt (os);
3578-
3579- printTag<std::size (nikonFlashControlMode), nikonFlashControlMode>(os, (value.toUint32 () & 0x0F ), data);
3580-
3581- os.copyfmt (oss);
3582- os.flags (f);
3583- return os;
3562+ if (value.count () != 1 || value.typeId () != unsignedByte)
3563+ return os << " (" << value << " )" ;
3564+ return EXV_PRINT_TAG (nikonFlashControlMode)(os, (value.toUint32 () & 0x0F ), data);
35843565}
35853566
35863567std::ostream& Nikon3MakerNote::printFlashGroupBCControlData (std::ostream& os, const Value& value,
@@ -3595,9 +3576,9 @@ std::ostream& Nikon3MakerNote::printFlashGroupBCControlData(std::ostream& os, co
35953576 oss.copyfmt (os);
35963577 const auto temp = value.toUint32 ();
35973578
3598- printTag< std::size (nikonFlashControlMode), nikonFlashControlMode> (os, (temp >> 4 ), data);
3579+ EXV_PRINT_TAG (nikonFlashControlMode)(os, (temp >> 4 ), data);
35993580 os << " , " ;
3600- printTag< std::size (nikonFlashControlMode), nikonFlashControlMode> (os, (temp & 0x0f ), data);
3581+ EXV_PRINT_TAG (nikonFlashControlMode)(os, (temp & 0x0f ), data);
36013582
36023583 os.copyfmt (oss);
36033584 os.flags (f);
@@ -3779,17 +3760,9 @@ std::ostream& Nikon3MakerNote::printFlashGroupCDataFl7(std::ostream& os, const V
37793760}
37803761
37813762std::ostream& Nikon3MakerNote::printExternalFlashData3 (std::ostream& os, const Value& value, const ExifData* data) {
3782- std::ios::fmtflags f (os.flags ());
3783- if (value.count () != 1 || value.typeId () != unsignedByte) {
3784- os << " (" << value << " )" ;
3785- os.flags (f);
3786- return os;
3787- }
3788-
3789- printTag<std::size (nikonFlashExposureComp), nikonFlashExposureComp>(os, (value.toUint32 (0 ) & 0x04 ), data);
3790-
3791- os.flags (f);
3792- return os;
3763+ if (value.count () != 1 || value.typeId () != unsignedByte)
3764+ return os << " (" << value << " )" ;
3765+ return EXV_PRINT_TAG (nikonFlashExposureComp)(os, (value.toUint32 (0 ) & 0x04 ), data);
37933766}
37943767
37953768std::ostream& Nikon3MakerNote::printCameraExposureCompensation (std::ostream& os, const Value& value, const ExifData*) {
@@ -3805,30 +3778,17 @@ std::ostream& Nikon3MakerNote::printCameraExposureCompensation(std::ostream& os,
38053778}
38063779
38073780std::ostream& Nikon3MakerNote::printExternalFlashData4 (std::ostream& os, const Value& value, const ExifData* metadata) {
3808- std::ios::fmtflags f (os.flags ());
3809- if (value.count () != 1 || value.typeId () != unsignedByte) {
3810- os << " (" << value << " )" ;
3811- os.flags (f);
3812- return os;
3813- }
3814-
3815- printTag<std::size (nikonFlashIlluminationPat), nikonFlashIlluminationPat>(os, value.toUint32 (0 ), metadata);
3816-
3817- os.flags (f);
3818- return os;
3781+ if (value.count () != 1 || value.typeId () != unsignedByte)
3782+ return os << " (" << value << " )" ;
3783+ return EXV_PRINT_TAG (nikonFlashIlluminationPat)(os, value.toUint32 (0 ), metadata);
38193784}
38203785
38213786std::ostream& Nikon3MakerNote::printFlashZoomHeadPosition (std::ostream& os, const Value& value, const ExifData*) {
3822- if (value.count () != 1 || value.typeId () != unsignedByte) {
3787+ if (value.count () != 1 || value.typeId () != unsignedByte)
38233788 return os << " (" << value << " )" ;
3824- }
3825-
3826- auto v0 = value.toUint32 (0 );
3827- if (v0 == 0 ) {
3828- return os << _ (" n/a" );
3829- }
3830-
3831- return os << stringFormat (" {} mm" , v0);
3789+ if (auto v0 = value.toUint32 (0 ))
3790+ return os << stringFormat (" {} mm" , v0);
3791+ return os << _ (" n/a" );
38323792}
38333793
38343794std::ostream& Nikon3MakerNote::printTimeZone (std::ostream& os, const Value& value, const ExifData*) {
0 commit comments