- converted map loader to FileRdr and took the opportunity to clean up its interface.

This commit is contained in:
Christoph Oelckers 2018-03-10 21:48:33 +01:00
commit 247785bca2
11 changed files with 131 additions and 122 deletions

View file

@ -95,16 +95,16 @@ void MD5Context::Update(const uint8_t *buf, unsigned len)
memcpy(in, buf, len);
}
void MD5Context::Update(FileReader *file, unsigned len)
void MD5Context::Update(FileRdr &file, unsigned len)
{
uint8_t readbuf[8192];
long t;
while (len != 0)
while (len > 0)
{
t = MIN<long>(len, sizeof(readbuf));
len -= t;
t = file->Read(readbuf, t);
t = (long)file.Read(readbuf, t);
Update(readbuf, t);
}
}