summaryrefslogtreecommitdiffstats
path: root/Alc/midi/sf2load.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/midi/sf2load.c')
-rw-r--r--Alc/midi/sf2load.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/Alc/midi/sf2load.c b/Alc/midi/sf2load.c
index 1c7cc10b..91e68d7d 100644
--- a/Alc/midi/sf2load.c
+++ b/Alc/midi/sf2load.c
@@ -346,20 +346,16 @@ static void GenModList_Destruct(GenModList *self)
static GenModList GenModList_clone(const GenModList *self)
{
- ALsizei count, i;
GenModList ret;
GenModList_Construct(&ret);
- count = VECTOR_SIZE(self->gens);
- VECTOR_RESERVE(ret.gens, count);
- for(i = 0;i < count;i++)
- VECTOR_PUSH_BACK(ret.gens, VECTOR_ELEM(self->gens, i));
-
- count = VECTOR_SIZE(self->mods);
- VECTOR_RESERVE(ret.mods, count);
- for(i = 0;i < count;i++)
- VECTOR_PUSH_BACK(ret.mods, VECTOR_ELEM(self->mods, i));
+ VECTOR_INSERT(ret.gens, VECTOR_ITER_END(ret.gens),
+ VECTOR_ITER_BEGIN(self->gens), VECTOR_ITER_END(self->gens)
+ );
+ VECTOR_INSERT(ret.mods, VECTOR_ITER_END(ret.mods),
+ VECTOR_ITER_BEGIN(self->mods), VECTOR_ITER_END(self->mods)
+ );
return ret;
}