From 9b800a96ed32720ff60b74e498a0e0a6351004f9 Mon Sep 17 00:00:00 2001 From: Charles Pigott Date: Fri, 8 Jan 2021 10:16:18 +0000 Subject: Codechange: Remove min/max functions in favour of STL variants (#8502) --- src/strgen/strgen.cpp | 2 +- src/strgen/strgen_base.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/strgen') diff --git a/src/strgen/strgen.cpp b/src/strgen/strgen.cpp index 87bac5ab6..9377e6362 100644 --- a/src/strgen/strgen.cpp +++ b/src/strgen/strgen.cpp @@ -304,7 +304,7 @@ struct HeaderFileWriter : HeaderWriter, FileWriter { /* Find the plural form with the most amount of cases. */ int max_plural_forms = 0; for (uint i = 0; i < lengthof(_plural_forms); i++) { - max_plural_forms = max(max_plural_forms, _plural_forms[i].plural_count); + max_plural_forms = std::max(max_plural_forms, _plural_forms[i].plural_count); } fprintf(this->fh, diff --git a/src/strgen/strgen_base.cpp b/src/strgen/strgen_base.cpp index 7e43471b2..60e27e752 100644 --- a/src/strgen/strgen_base.cpp +++ b/src/strgen/strgen_base.cpp @@ -388,7 +388,7 @@ void EmitPlural(Buffer *buffer, char *buf, int value) int argidx = _cur_argidx; int offset = -1; int expected = _plural_forms[_lang.plural_form].plural_count; - const char **words = AllocaM(const char *, max(expected, MAX_PLURALS)); + const char **words = AllocaM(const char *, std::max(expected, MAX_PLURALS)); int nw = 0; /* Parse out the number, if one exists. Otherwise default to prev arg. */ @@ -489,7 +489,7 @@ static uint ResolveCaseName(const char *str, size_t len) { /* First get a clean copy of only the case name, then resolve it. */ char case_str[CASE_GENDER_LEN]; - len = min(lengthof(case_str) - 1, len); + len = std::min(lengthof(case_str) - 1, len); memcpy(case_str, str, len); case_str[len] = '\0'; -- cgit v1.2.3-54-g00ecf