Use memset to initialize data instead of a loop.

This commit is contained in:
riccardom 2010-02-02 17:06:55 +00:00
parent 7a6c1e5fd7
commit 1f745442b8
1 changed files with 2 additions and 6 deletions

View File

@ -698,13 +698,9 @@ bool BackupDevice::load_no_gba(const char *fname)
if (fread(in_buf, 1, fsize, fsrc) == fsize)
{
out_buf = new u8 [8 * 1024 * 1024 / 8];
for (int jj = 0; jj < 8 * 1024 * 1024 / 8; jj++)
{
out_buf[jj] = 0xFF;
}
u32 size = 0;
memset(out_buf, 0xFF, 8 * 1024 * 1024 / 8);
if (no_gba_unpackSAV(in_buf, fsize, out_buf, size) == 0)
{
//printf("New size %i byte(s)\n", size);