summaryrefslogtreecommitdiff
path: root/src/texteff.cpp
diff options
context:
space:
mode:
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;
}