util.stanza: Optimisation, remove useless if...then in stanza:children() iterator
authorMatthew Wild <mwild1@gmail.com>
Sun, 29 Aug 2010 14:07:00 +0000 (15:07 +0100)
committerMatthew Wild <mwild1@gmail.com>
Sun, 29 Aug 2010 14:07:00 +0000 (15:07 +0100)
util/stanza.lua

index e787cacfe21fedcc6753d0a70ae3531e9e0853b5..3ab4bb42f8cad52daf20b5da27a74df938f73225 100644 (file)
@@ -122,8 +122,7 @@ function stanza_mt:children()
        local i = 0;
        return function (a)
                        i = i + 1
-                       local v = a[i]
-                       if v then return v; end
+                       return a[i];
                end, self, i;
 end