From a0f36a50e6324f570985f5010eb0543ec0673aeb Mon Sep 17 00:00:00 2001 From: Henry Wilson Date: Mon, 18 Feb 2019 22:39:06 +0000 Subject: Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back() --- src/script/squirrel_helper.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/script') 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; } -- cgit v1.2.3-70-g09d2