Improve performance of function

This commit is contained in:
oakes
2014-01-09 23:43:47 -05:00
parent 4c4b5a4dc2
commit 0e2998826f

View File

@@ -25,7 +25,7 @@
(if (isa? (type layer) MapLayer)
layer
(->> (tiled-map-layers screen)
(filter #(= layer (.getName ^MapLayer %)))
(drop-while #(not= layer (.getName ^MapLayer %)))
first)))
(defn tiled-map-layer-name