compilation issue on Windows

This commit is contained in:
Mohamed Ali Chebbi 2023-02-11 00:01:01 +01:00 committed by Rosen Penev
parent 51ef600fe6
commit b8b4a041a1
2 changed files with 4 additions and 4 deletions

View File

@ -61,12 +61,12 @@ std::string readStringTag(BasicIo::UniquePtr& io, size_t length) {
return Exiv2::toString(FieldBuf.data()).substr(0, length);
}
std::string getAspectRatio(size_t width, size_t height) {
std::string getAspectRatio(uint64_t width, uint64_t height) {
if (height == 0 || width == 0)
return std::to_string(width) + ":" + std::to_string(height);
int ratioWidth = width / std::gcd(width, height);
int ratioHeight = height / std::gcd(width, height);
auto ratioWidth = width / std::gcd(width, height);
auto ratioHeight = height / std::gcd(width, height);
return std::to_string(ratioWidth) + ":" + std::to_string(ratioHeight);
}

View File

@ -56,7 +56,7 @@ std::string utf16ToUtf8(const std::wstring& wstr);
/*!
@brief Calculates Aspect Ratio of a video
*/
[[nodiscard]] std::string getAspectRatio(size_t width, size_t height);
[[nodiscard]] std::string getAspectRatio(uint64_t width, uint64_t height);
} // namespace Exiv2
#endif // HELPER_FUNCTIONS_HPP