make code better

This commit is contained in:
Henry Hiles 2023-04-06 14:46:22 -04:00
parent 8210f983d3
commit 306b905c2b

View file

@ -23,7 +23,7 @@ fun HourlyWeatherDataDto.toHourlyWeatherDataMap(): Map<Int, List<HourlyWeatherDa
temperature = temperatures[index].roundToInt(), temperature = temperatures[index].roundToInt(),
apparentTemperature = apparentTemperatures[index].roundToInt(), apparentTemperature = apparentTemperatures[index].roundToInt(),
windSpeed = windSpeeds[index].roundToInt(), windSpeed = windSpeeds[index].roundToInt(),
precipitationProbability = if (index in precipitationProbabilities.indices) precipitationProbabilities[index] else null, precipitationProbability = precipitationProbabilities.getOrNull(index),
weatherType = WeatherType.fromWMO(weatherCodes[index]) weatherType = WeatherType.fromWMO(weatherCodes[index])
) )
) )