summaryrefslogtreecommitdiff
path: root/src/script/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/api')
-rw-r--r--src/script/api/script_controller.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/script/api/script_controller.cpp b/src/script/api/script_controller.cpp
index adfcf2acd..e74f27e4a 100644
--- a/src/script/api/script_controller.cpp
+++ b/src/script/api/script_controller.cpp
@@ -77,9 +77,9 @@ ScriptController::ScriptController(CompanyID company) :
ScriptController::~ScriptController()
{
- for (LoadedLibraryList::iterator iter = this->loaded_library.begin(); iter != this->loaded_library.end(); iter++) {
- free((*iter).second);
- free((*iter).first);
+ for (const auto &item : this->loaded_library) {
+ free(item.second);
+ free(item.first);
}
this->loaded_library.clear();
@@ -129,9 +129,9 @@ ScriptController::~ScriptController()
char fake_class[1024];
- LoadedLibraryList::iterator iter = controller->loaded_library.find(library_name);
- if (iter != controller->loaded_library.end()) {
- strecpy(fake_class, (*iter).second, lastof(fake_class));
+ LoadedLibraryList::iterator it = controller->loaded_library.find(library_name);
+ if (it != controller->loaded_library.end()) {
+ strecpy(fake_class, (*it).second, lastof(fake_class));
} else {
int next_number = ++controller->loaded_library_count;