util.array: Just use table.remove as array:pop()
authorKim Alvefur <zash@zash.se>
Wed, 23 Dec 2015 08:39:22 +0100
changeset 7023 6ab9c691c4c6
parent 7022 abcd5ec3ee41
child 7024 f436446661ca
util.array: Just use table.remove as array:pop()
util/array.lua
--- a/util/array.lua	Wed Dec 23 08:32:13 2015 +0100
+++ b/util/array.lua	Wed Dec 23 08:39:22 2015 +0100
@@ -128,11 +128,7 @@
 	return self;
 end
 
-function array_methods:pop(x)
-	local v = self[x];
-	t_remove(self, x);
-	return v;
-end
+array_methods.pop = t_remove;
 
 function array_methods:concat(sep)
 	return t_concat(array.map(self, tostring), sep);