summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/mlua_metatable.h
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-02-21 18:40:03 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-02-21 18:40:14 +0300
commit477a6ea70d0bb1b1dfe9cbd9a15b6dad0284ddeb (patch)
tree247eed13a5231c3983e343f0b7fc2a95012353c2 /plugins/MirLua/src/mlua_metatable.h
parent9d0174ebe2bd005418855b18f737c36d5c20ab4a (diff)
all another C++'11 iterators
Diffstat (limited to 'plugins/MirLua/src/mlua_metatable.h')
-rw-r--r--plugins/MirLua/src/mlua_metatable.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/MirLua/src/mlua_metatable.h b/plugins/MirLua/src/mlua_metatable.h
index 6b4f916668..7fb8c27578 100644
--- a/plugins/MirLua/src/mlua_metatable.h
+++ b/plugins/MirLua/src/mlua_metatable.h
@@ -217,14 +217,12 @@ private:
CMStringA data(MT::name);
data += "(";
- for (int i = 0; i < fields.getCount(); i++) {
- CMTField &field = fields[i];
-
- data += field.GetName();
+ for (auto &it : fields) {
+ data += it->GetName();
data += "=";
- MTValue value = field.GetValue(obj);
- int type = field.GetType();
+ MTValue value = it->GetValue(obj);
+ int type = it->GetType();
switch (type) {
case LUA_TNIL:
data.Append("nil");