Diff

util/indexedbheap.lua @ 8382:e5d00bf4a4d5

util: Various minor changes to please [luacheck]
author Kim Alvefur <zash@zash.se>
date Fri, 10 Nov 2017 05:42:32 +0100
parent 6151:a34a14054532
child 11115:7d4c292f178e
line wrap: on
line diff
--- a/util/indexedbheap.lua	Fri Nov 10 05:34:29 2017 +0100
+++ b/util/indexedbheap.lua	Fri Nov 10 05:42:32 2017 +0100
@@ -110,7 +110,7 @@
 	self.priorities[k] = priority;
 
 	k = _percolate_up(self.priorities, k, self.ids, self.index);
-	k = _percolate_down(self.priorities, k, self.ids, self.index);
+	_percolate_down(self.priorities, k, self.ids, self.index);
 end
 function indexed_heap:remove_index(k)
 	local result = self.priorities[k];
@@ -132,7 +132,7 @@
 
 	if size > k then
 		k = _percolate_up(self.priorities, k, self.ids, self.index);
-		k = _percolate_down(self.priorities, k, self.ids, self.index);
+		_percolate_down(self.priorities, k, self.ids, self.index);
 	end
 
 	return result, item, result_sync;