Use memset to initialize data instead of a loop.
This commit is contained in:
parent
7a6c1e5fd7
commit
1f745442b8
|
@ -698,13 +698,9 @@ bool BackupDevice::load_no_gba(const char *fname)
|
||||||
if (fread(in_buf, 1, fsize, fsrc) == fsize)
|
if (fread(in_buf, 1, fsize, fsrc) == fsize)
|
||||||
{
|
{
|
||||||
out_buf = new u8 [8 * 1024 * 1024 / 8];
|
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;
|
u32 size = 0;
|
||||||
|
|
||||||
|
memset(out_buf, 0xFF, 8 * 1024 * 1024 / 8);
|
||||||
if (no_gba_unpackSAV(in_buf, fsize, out_buf, size) == 0)
|
if (no_gba_unpackSAV(in_buf, fsize, out_buf, size) == 0)
|
||||||
{
|
{
|
||||||
//printf("New size %i byte(s)\n", size);
|
//printf("New size %i byte(s)\n", size);
|
||||||
|
|
Loading…
Reference in New Issue