@@ -742,16 +742,15 @@ int Params::evalDelete(const std::string& optArg) {
742742 switch (action_) {
743743 case Action::none:
744744 action_ = Action::erase;
745- target_ = CommonTarget (0 );
745+ target_ = static_cast < CommonTarget> (0 );
746746 // fallthrough
747747 case Action::erase: {
748748 const auto rc = parseCommonTargets (optArg, " erase" );
749749 if (rc > 0 ) {
750- target_ |= CommonTarget (rc);
750+ target_ |= static_cast < CommonTarget> (rc);
751751 return 0 ;
752- } else {
753- return 1 ;
754752 }
753+ return 1 ;
755754 }
756755 default :
757756 std::cerr << progname () << " : " << _ (" Option -d is not compatible with a previous option\n " );
@@ -764,16 +763,15 @@ int Params::evalExtract(const std::string& optArg) {
764763 case Action::none:
765764 case Action::modify:
766765 action_ = Action::extract;
767- target_ = CommonTarget (0 );
766+ target_ = static_cast < CommonTarget> (0 );
768767 // fallthrough
769768 case Action::extract: {
770769 const auto rc = parseCommonTargets (optArg, " extract" );
771770 if (rc > 0 ) {
772- target_ |= CommonTarget (rc);
771+ target_ |= static_cast < CommonTarget> (rc);
773772 return 0 ;
774- } else {
775- return 1 ;
776773 }
774+ return 1 ;
777775 }
778776 default :
779777 std::cerr << progname () << " : " << _ (" Option -e is not compatible with a previous option\n " );
@@ -786,16 +784,15 @@ int Params::evalInsert(const std::string& optArg) {
786784 case Action::none:
787785 case Action::modify:
788786 action_ = Action::insert;
789- target_ = CommonTarget (0 );
787+ target_ = static_cast < CommonTarget> (0 );
790788 // fallthrough
791789 case Action::insert: {
792790 const auto rc = parseCommonTargets (optArg, " insert" );
793791 if (rc > 0 ) {
794- target_ |= CommonTarget (rc);
792+ target_ |= static_cast < CommonTarget> (rc);
795793 return 0 ;
796- } else {
797- return 1 ;
798794 }
795+ return 1 ;
799796 }
800797 default :
801798 std::cerr << progname () << " : " << _ (" Option -i is not compatible with a previous option\n " );
@@ -1139,7 +1136,7 @@ void printUnrecognizedArgument(const char argc, const std::string& action) {
11391136
11401137int64_t parseCommonTargets (const std::string& optArg, const std::string& action) {
11411138 int64_t rc = 0 ;
1142- Params::CommonTarget target = Params::CommonTarget (0 );
1139+ auto target = static_cast < Params::CommonTarget> (0 );
11431140 Params::CommonTarget all = Params::ctExif | Params::ctIptc | Params::ctComment | Params::ctXmp;
11441141 Params::CommonTarget extra = Params::ctXmpSidecar | Params::ctExif | Params::ctIptc | Params::ctXmp;
11451142 for (size_t i = 0 ; rc == 0 && i < optArg.size (); ++i) {
@@ -1175,7 +1172,7 @@ int64_t parseCommonTargets(const std::string& optArg, const std::string& action)
11751172 target |= extra; // -eX
11761173 if (i > 0 ) { // -eXX or -iXX
11771174 target |= Params::ctXmpRaw;
1178- target = Params::CommonTarget (target & ~extra); // turn off those bits
1175+ target = static_cast < Params::CommonTarget> (target & ~extra); // turn off those bits
11791176 }
11801177 break ;
11811178
@@ -1196,7 +1193,7 @@ int64_t parseCommonTargets(const std::string& optArg, const std::string& action)
11961193 break ;
11971194 }
11981195 }
1199- return rc ? rc : int64_t (target);
1196+ return rc ? rc : static_cast < int64_t > (target);
12001197}
12011198
12021199int parsePreviewNumbers (Params::PreviewNumbers& previewNumbers, const std::string& optArg, int j) {
0 commit comments