Unverified Commit 67f5fcf7 authored by Jeff Kriske's avatar Jeff Kriske Committed by GitHub
Browse files

For std::min and std::max cast to like data types (#2389)


Signed-off-by: default avatarJeff Kriske <kriske_jeffery_e@lilly.com>
parent 75f5b57e
......@@ -55,7 +55,7 @@ bool SeekableBuffer::readBytes(
size_t maxBytes,
uint64_t timeoutMs) {
// Resize to th minimum 4K page or less
buffer_.resize(std::min(maxBytes, 4 * 1024UL));
buffer_.resize(std::min(maxBytes, size_t(4 * 1024UL)));
end_ = 0;
eof_ = false;
......@@ -72,7 +72,7 @@ bool SeekableBuffer::readBytes(
if (res > 0) {
end_ += res;
if (end_ == buffer_.size()) {
buffer_.resize(std::min(end_ * 4UL, maxBytes));
buffer_.resize(std::min(size_t(end_ * 4UL), maxBytes));
}
} else if (res == 0) {
eof_ = true;
......
......@@ -395,8 +395,8 @@ void setFormatDimensions(
}
}
// prevent zeros
destW = std::max(destW, 1UL);
destH = std::max(destH, 1UL);
destW = std::max(destW, size_t(1UL));
destH = std::max(destH, size_t(1UL));
}
} // namespace Util
} // namespace ffmpeg
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment