diff options
author | Henry Wilson <m3henry@googlemail.com> | 2019-02-17 11:20:52 +0000 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2019-03-26 20:15:57 +0000 |
commit | ab711e6942757d775c08c31a6c32d488feba1dba (patch) | |
tree | d102dc6d0e6b9c33e7205b63e3360ebd720a3ebb /src/script | |
parent | 297fd3dda3abe353ebe2fe77c67b011e24d403bc (diff) | |
download | openttd-ab711e6942757d775c08c31a6c32d488feba1dba.tar.xz |
Codechange: Replaced SmallVector::[Begin|End]() with std alternatives
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/script_info.cpp | 4 | ||||
-rw-r--r-- | src/script/squirrel_helper.hpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/script/script_info.cpp b/src/script/script_info.cpp index b95c6e366..47ff2ee5f 100644 --- a/src/script/script_info.cpp +++ b/src/script/script_info.cpp @@ -26,8 +26,8 @@ ScriptInfo::~ScriptInfo() free((*it).name); free((*it).description); if (it->labels != NULL) { - for (LabelMapping::iterator it2 = (*it).labels->Begin(); it2 != (*it).labels->End(); it2++) { - free(it2->second); + for (auto &lbl_map : *(*it).labels) { + free(lbl_map.second); } delete it->labels; } diff --git a/src/script/squirrel_helper.hpp b/src/script/squirrel_helper.hpp index c362601eb..775fe142e 100644 --- a/src/script/squirrel_helper.hpp +++ b/src/script/squirrel_helper.hpp @@ -149,7 +149,7 @@ namespace SQConvert { Array *arr = (Array*)MallocT<byte>(sizeof(Array) + sizeof(int32) * data.size()); arr->size = data.size(); - memcpy(arr->array, data.Begin(), sizeof(int32) * data.size()); + memcpy(arr->array, data.data(), sizeof(int32) * data.size()); ptr->push_back(arr); return arr; |