summaryrefslogtreecommitdiff
path: root/src/texteff.cpp
diff options
context:
space:
mode:
authorHenry Wilson <m3henry@googlemail.com>2019-02-18 22:39:06 +0000
committerPeterN <peter@fuzzle.org>2019-03-26 20:15:57 +0000
commita0f36a50e6324f570985f5010eb0543ec0673aeb (patch)
tree09f9c9abd097acc244f80366da42cb8702c7ed19 /src/texteff.cpp
parentca2f33c6d025c0c45fb4bc472493290445312de5 (diff)
downloadopenttd-a0f36a50e6324f570985f5010eb0543ec0673aeb.tar.xz
Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back()
Diffstat (limited to 'src/texteff.cpp')
-rw-r--r--src/texteff.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/texteff.cpp b/src/texteff.cpp
index 92c201704..c81d9a95d 100644
--- a/src/texteff.cpp
+++ b/src/texteff.cpp
@@ -48,20 +48,20 @@ TextEffectID AddTextEffect(StringID msg, int center, int y, uint8 duration, Text
for (i = 0; i < _text_effects.size(); i++) {
if (_text_effects[i].string_id == INVALID_STRING_ID) break;
}
- if (i == _text_effects.size()) _text_effects.Append();
+ if (i == _text_effects.size()) _text_effects.emplace_back();
- TextEffect *te = _text_effects.data() + i;
+ TextEffect &te = _text_effects[i];
/* Start defining this object */
- te->string_id = msg;
- te->duration = duration;
- te->params_1 = GetDParam(0);
- te->params_2 = GetDParam(1);
- te->mode = mode;
+ te.string_id = msg;
+ te.duration = duration;
+ te.params_1 = GetDParam(0);
+ te.params_2 = GetDParam(1);
+ te.mode = mode;
/* Make sure we only dirty the new area */
- te->width_normal = 0;
- te->UpdatePosition(center, y, msg);
+ te.width_normal = 0;
+ te.UpdatePosition(center, y, msg);
return i;
}