aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_metadata.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/lua_api/l_metadata.cpp')
-rw-r--r--src/script/lua_api/l_metadata.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/script/lua_api/l_metadata.cpp b/src/script/lua_api/l_metadata.cpp
index 5f4e984cb..494d2dce0 100644
--- a/src/script/lua_api/l_metadata.cpp
+++ b/src/script/lua_api/l_metadata.cpp
@@ -218,10 +218,9 @@ void MetaDataRef::handleToTable(lua_State *L, Metadata *meta)
lua_newtable(L);
{
const StringMap &fields = meta->getStrings();
- for (StringMap::const_iterator
- it = fields.begin(); it != fields.end(); ++it) {
- const std::string &name = it->first;
- const std::string &value = it->second;
+ for (const auto &field : fields) {
+ const std::string &name = field.first;
+ const std::string &value = field.second;
lua_pushlstring(L, name.c_str(), name.size());
lua_pushlstring(L, value.c_str(), value.size());
lua_settable(L, -3);