Skip to content

Commit

Permalink
Fixed formatting of usages of getOrPut to have lambda outside of parens
Browse files Browse the repository at this point in the history
  • Loading branch information
dmccabe committed Oct 7, 2018
1 parent e1e4cb5 commit 2a46d86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/com/darkgravity/khexgrid/map/HexagonalVertexCache.kt
Expand Up @@ -10,7 +10,7 @@ class HexagonalVertexCache(private val map: HexagonalMap) {

operator fun get(tile: HexagonalTile) = this[tile.location]

operator fun get(coordinate: CubeCoordinate) = locationVertices.getOrPut(coordinate, { CachedEntry(map.polygonVertices(coordinate))} )
operator fun get(coordinate: CubeCoordinate) = locationVertices.getOrPut(coordinate) { CachedEntry(map.polygonVertices(coordinate))}

class CachedEntry(val vertices: FloatArray) {
private val xCoordinates = vertices.filterIndexed { index, _ -> index % 2 == 0 }
Expand Down

0 comments on commit 2a46d86

Please sign in to comment.