summaryrefslogtreecommitdiff
path: root/src/script
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/script
parentca2f33c6d025c0c45fb4bc472493290445312de5 (diff)
downloadopenttd-a0f36a50e6324f570985f5010eb0543ec0673aeb.tar.xz
Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back()
Diffstat (limited to 'src/script')
-rw-r--r--src/script/squirrel_helper.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/script/squirrel_helper.hpp b/src/script/squirrel_helper.hpp
index 8d1ee29fc..c362601eb 100644
--- a/src/script/squirrel_helper.hpp
+++ b/src/script/squirrel_helper.hpp
@@ -117,7 +117,7 @@ namespace SQConvert {
sq_getstring(vm, -1, &tmp);
char *tmp_str = stredup(tmp);
sq_poptop(vm);
- *ptr->Append() = (void *)tmp_str;
+ ptr->push_back((void *)tmp_str);
str_validate(tmp_str, tmp_str + strlen(tmp_str));
return tmp_str;
}
@@ -137,7 +137,7 @@ namespace SQConvert {
while (SQ_SUCCEEDED(sq_next(vm, -2))) {
SQInteger tmp;
if (SQ_SUCCEEDED(sq_getinteger(vm, -1, &tmp))) {
- *data.Append() = (int32)tmp;
+ data.push_back((int32)tmp);
} else {
sq_pop(vm, 4);
throw sq_throwerror(vm, "a member of an array used as parameter to a function is not numeric");
@@ -151,7 +151,7 @@ namespace SQConvert {
arr->size = data.size();
memcpy(arr->array, data.Begin(), sizeof(int32) * data.size());
- *ptr->Append() = arr;
+ ptr->push_back(arr);
return arr;
}