From b8b4a041a1e6c7f8dcfa0bd8b7770e89aaaa7a75 Mon Sep 17 00:00:00 2001 From: Mohamed Ali Chebbi Date: Sat, 11 Feb 2023 00:01:01 +0100 Subject: [PATCH] compilation issue on Windows --- src/helper_functions.cpp | 6 +++--- src/helper_functions.hpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/helper_functions.cpp b/src/helper_functions.cpp index 05dce550..7bb8bb47 100644 --- a/src/helper_functions.cpp +++ b/src/helper_functions.cpp @@ -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); } diff --git a/src/helper_functions.hpp b/src/helper_functions.hpp index 7d8467a8..23f564d4 100644 --- a/src/helper_functions.hpp +++ b/src/helper_functions.hpp @@ -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