summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2017-12-19 23:22:01 -0500
committerPikalaxALT <pikalaxalt@gmail.com>2017-12-19 23:22:01 -0500
commit474e6100a8f44f18568c2169881adc64a92e841d (patch)
treed27b9c757d5e95cce3cd3c72573a7833c9e532d2 /src
parentf2fa0f7a8938e858abf68a2519b2a017810e420f (diff)
Obliterate explicit memcpy call in m4a lib src
Diffstat (limited to 'src')
-rw-r--r--src/libs/m4a_2.c3
-rw-r--r--src/libs/m4a_4.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/libs/m4a_2.c b/src/libs/m4a_2.c
index 2d3c65848..b694e0ded 100644
--- a/src/libs/m4a_2.c
+++ b/src/libs/m4a_2.c
@@ -85,7 +85,8 @@ void m4aSoundInit(void)
mplayInfo->memAccArea = gMPlayMemAccArea;
}
- memcpy(&gPokemonCrySong, &gPokemonCrySongTemplate, sizeof(struct PokemonCrySong));
+ gPokemonCrySong = gPokemonCrySongTemplate;
+// memcpy(&gPokemonCrySong, &gPokemonCrySongTemplate, sizeof(struct PokemonCrySong));
for (i = 0; i < MAX_POKEMON_CRIES; i++)
{
diff --git a/src/libs/m4a_4.c b/src/libs/m4a_4.c
index 2e1d140b4..da5550252 100644
--- a/src/libs/m4a_4.c
+++ b/src/libs/m4a_4.c
@@ -445,7 +445,7 @@ start_song:
#define CRY ((s32)&gPokemonCrySongs + i * sizeof(struct PokemonCrySong))
#define CRY_OFS(field) offsetof(struct PokemonCrySong, field)
- memcpy((void *)CRY, &gPokemonCrySong, sizeof(struct PokemonCrySong));
+ *(struct PokemonCrySong *)CRY = gPokemonCrySong;
*(u32 *)(CRY + CRY_OFS(tone)) = (u32)tone;
*(u32 *)(CRY + CRY_OFS(part)) = CRY + CRY_OFS(part0);