Codechange: Remove min/max functions in favour of STL variants (#8502)

This commit is contained in:
Charles Pigott
2021-01-08 10:16:18 +00:00
committed by GitHub
parent c1fddb9a6a
commit 9b800a96ed
181 changed files with 900 additions and 954 deletions

View File

@@ -170,7 +170,7 @@ struct MemoryDumper {
size_t t = this->GetSize();
while (t > 0) {
size_t to_write = min(MEMORY_CHUNK_SIZE, t);
size_t to_write = std::min(MEMORY_CHUNK_SIZE, t);
writer->Write(this->blocks[i++], to_write);
t -= to_write;
@@ -856,7 +856,7 @@ static void SlSaveLoadConv(void *ptr, VarType conv)
static inline size_t SlCalcNetStringLen(const char *ptr, size_t length)
{
if (ptr == nullptr) return 0;
return min(strlen(ptr), length - 1);
return std::min(strlen(ptr), length - 1);
}
/**