- converted map loader to FileRdr and took the opportunity to clean up its interface.
This commit is contained in:
parent
6f8ca2eace
commit
247785bca2
11 changed files with 131 additions and 122 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue