simplifying a forloop

This commit is contained in:
tibbi 2016-11-17 20:20:28 +01:00
parent d44880bed2
commit f6b4387d30
1 changed files with 1 additions and 3 deletions

View File

@ -168,9 +168,7 @@ class MainActivity : SimpleActivity(), EventListFragment.DeleteListener, ChangeV
private fun getYears(targetYear: Int): List<Int> {
val years = ArrayList<Int>(PREFILLED_YEARS)
for (i in targetYear - PREFILLED_YEARS / 2..targetYear + PREFILLED_YEARS / 2)
years.add(i)
years += targetYear - PREFILLED_YEARS / 2..targetYear + PREFILLED_YEARS / 2
return years
}