Changeset

7020:6ab9c691c4c6

util.array: Just use table.remove as array:pop()
author Kim Alvefur <zash@zash.se>
date Wed, 23 Dec 2015 08:39:22 +0100
parents 7019:abcd5ec3ee41
children 7021:f436446661ca
files util/array.lua
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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);