summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2019-05-03 16:27:01 +0200
committerCharles Pigott <charlespigott@googlemail.com>2019-05-04 19:50:53 +0100
commitd0d4fc73a7e06d6be1426e574ea21b850399105e (patch)
treeafaff6e1fd016e4a332821c214617f9a8b095ca1 /src
parent6b492057453d9eb5017ca2d2684654cb58efe4a7 (diff)
downloadopenttd-d0d4fc73a7e06d6be1426e574ea21b850399105e.tar.xz
Codechange: replace grow() usage in AllocateSound()
Diffstat (limited to 'src')
-rw-r--r--src/newgrf_sound.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/newgrf_sound.cpp b/src/newgrf_sound.cpp
index a25c3abcc..0756d798f 100644
--- a/src/newgrf_sound.cpp
+++ b/src/newgrf_sound.cpp
@@ -32,9 +32,9 @@ static std::vector<SoundEntry> _sounds;
*/
SoundEntry *AllocateSound(uint num)
{
- SoundEntry *sound = grow(_sounds, num);
- MemSetT(sound, 0, num);
- return sound;
+ size_t pos = _sounds.size();
+ _sounds.insert(_sounds.end(), num, SoundEntry());
+ return &_sounds[pos];
}