Skip to content

Commit efb0af8

Browse files
committed
fix: make casts explicit to please msvc
1 parent 7867343 commit efb0af8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/canonmn_int.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2752,8 +2752,8 @@ namespace Exiv2 {
27522752
os << "Unknown Lens (" << lensType << ")";
27532753
}
27542754

2755-
int const exifFlMin = pos->value().toLong(1) / pos->value().toFloat(2);
2756-
int const exifFlMax = pos->value().toLong(0) / pos->value().toFloat(2);
2755+
int const exifFlMin = static_cast<int>(static_cast<float>(pos->value().toLong(1)) / pos->value().toFloat(2));
2756+
int const exifFlMax = static_cast<int>(static_cast<float>(pos->value().toLong(0)) / pos->value().toFloat(2));
27572757

27582758
ExifKey aperKey("Exif.CanonCs.MaxAperture");
27592759
pos = metadata->findKey(aperKey);
@@ -2797,8 +2797,8 @@ namespace Exiv2 {
27972797

27982798
auto tc = base_match[5].length() > 0 ? std::stof(base_match[5].str()) : 1.f;
27992799

2800-
int flMax = std::stoi(base_match[2].str()) * tc;
2801-
int flMin = base_match[1].length() > 0 ? std::stoi(base_match[1].str()) * tc : flMax;
2800+
int flMax = static_cast<int>(std::stof(base_match[2].str()) * tc);
2801+
int flMin = base_match[1].length() > 0 ? static_cast<int>(std::stof(base_match[1].str()) * tc) : flMax;
28022802

28032803
auto aperMaxTele = std::stof(base_match[4].str()) * tc;
28042804
auto aperMaxShort = base_match[3].length() > 0 ? std::stof(base_match[3].str()) * tc : aperMaxTele;

0 commit comments

Comments
 (0)