COMP: resolve clang/MacOS size ambiguities (fixes #2778)

This commit is contained in:
Gabriel Gerlero
2023-06-12 13:52:55 +02:00
committed by Mark Olesen
parent 1c9ea038d0
commit b13c2c042f
2 changed files with 5 additions and 3 deletions

View File

@ -176,9 +176,10 @@ void exchangeChunkedBuf
const auto proci = slot.first;
const auto count = slot.second.size();
if (proci != myProci)
if (proci != myProci && count > maxCount)
{
maxCount = max(maxCount, count);
// Note: using max() can be ambiguous
maxCount = count;
}
}

View File

@ -1039,7 +1039,8 @@ Foam::Istream& Foam::ISstream::readRaw(char* data, std::streamsize count)
else
{
// Forward seek
is_.seekg(is_.tellg() + count);
// - use absolute positioning (see C++ notes about std::ifstream)
is_.seekg(is_.tellg() + std::istream::pos_type(count));
// Not sure if this is needed (as per rewind)
// some documentation indicates that ifstream needs