summaryrefslogtreecommitdiff
path: root/onlineupdate/source
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-12-30 18:50:11 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-05-19 03:43:27 +0200
commit093e2fb3713176b812f304e583f4c1244234f259 (patch)
treeaeeaa7e22810a5dde0d08a9f8e6d35a306d4c183 /onlineupdate/source
parent5bfba54cf1d4ef2f346e7bccd4e660fc68fa38e0 (diff)
use std::min instead of own code
Change-Id: I4bb62a120c1d791d41cdaaa88faf0fed27cc4787
Diffstat (limited to 'onlineupdate/source')
-rw-r--r--onlineupdate/source/update/updater/updater.cxx10
1 files changed, 2 insertions, 8 deletions
diff --git a/onlineupdate/source/update/updater/updater.cxx b/onlineupdate/source/update/updater/updater.cxx
index eed6a0090695..c60e40eba225 100644
--- a/onlineupdate/source/update/updater/updater.cxx
+++ b/onlineupdate/source/update/updater/updater.cxx
@@ -236,12 +236,6 @@ static const NS_tchar kWhitespace[] = NS_T(" \t");
static const NS_tchar kNL[] = NS_T("\r\n");
static const NS_tchar kQuote[] = NS_T("\"");
-static inline size_t
-mmin(size_t a, size_t b)
-{
- return (a > b) ? b : a;
-}
-
static NS_tchar*
mstrtok(const NS_tchar *delims, NS_tchar **str)
{
@@ -1417,7 +1411,7 @@ PatchFile::LoadSourceFile(FILE* ofile)
size_t r = header.slen;
unsigned char *rb = buf;
while (r) {
- const size_t count = mmin(SSIZE_MAX, r);
+ const size_t count = std::min<size_t>(SSIZE_MAX, r);
size_t c = fread(rb, 1, count, ofile);
if (c != count) {
LOG(("LoadSourceFile: error reading destination file: " LOG_S,
@@ -3857,7 +3851,7 @@ GetManifestContents(const NS_tchar *manifest)
size_t r = ms.st_size;
char *rb = mbuf;
while (r) {
- const size_t count = mmin(SSIZE_MAX, r);
+ const size_t count = std::min<size_t>(SSIZE_MAX, r);
size_t c = fread(rb, 1, count, mfile);
if (c != count) {
LOG(("GetManifestContents: error reading manifest file: " LOG_S, manifest));