Skip to content

Commit

Permalink
Replace for with foreach
Browse files Browse the repository at this point in the history
  • Loading branch information
keyboardsurfer committed Jun 20, 2019
1 parent 3999a86 commit 0f6b4fa
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ class GridItemDividerDecoration(
if (parent.isAnimating) return
val lm = parent.layoutManager ?: return

val childCount = parent.childCount

for (i in 0 until childCount) {
(0 until parent.childCount).forEach { i ->
val child = parent.getChildAt(i)
val viewHolder = parent.getChildViewHolder(child)

Expand Down

0 comments on commit 0f6b4fa

Please sign in to comment.