Added location_set:size method.

This commit is contained in:
Guillaume Melquiond 2010-10-03 13:30:34 +00:00
parent e8b58ddc28
commit 930cd8fe63

View File

@ -17,6 +17,14 @@ function methods:empty()
return next(self.values)
end
function methods:size()
local sz = 0
for p,v in pairs(self.values) do
sz = sz + 1
end
return sz
end
function methods:clear()
self.values = {}
end