[weather] More const ref arg passing

parent d179c64f
......@@ -800,7 +800,7 @@ WeatherData::ForecastInfo WeatherData::ForecastPeriod::getWeather() const
return result;
}
int WeatherData::ForecastPeriod::getMaxTemp(QVector<WeatherData::ForecastInfo *> forecastInfos) const
int WeatherData::ForecastPeriod::getMaxTemp(const QVector<WeatherData::ForecastInfo*>& forecastInfos) const
{
int result = -273;
foreach(const WeatherData::ForecastInfo * forecast, forecastInfos) {
......@@ -810,7 +810,7 @@ int WeatherData::ForecastPeriod::getMaxTemp(QVector<WeatherData::ForecastInfo *>
return result;
}
int WeatherData::ForecastPeriod::getMinTemp(QVector<WeatherData::ForecastInfo *> forecastInfos) const
int WeatherData::ForecastPeriod::getMinTemp(const QVector<WeatherData::ForecastInfo*>& forecastInfos) const
{
int result = 100;
foreach(const WeatherData::ForecastInfo * forecast, forecastInfos) {
......
......@@ -87,8 +87,8 @@ public:
QVector<WeatherData::ForecastInfo *> dayForecasts;
QVector<WeatherData::ForecastInfo *> nightForecasts;
private:
int getMaxTemp(QVector<WeatherData::ForecastInfo *> forecastInfos) const;
int getMinTemp(QVector<WeatherData::ForecastInfo *> forecastInfos) const;
int getMaxTemp(const QVector<WeatherData::ForecastInfo*>& forecastInfos) const;
int getMinTemp(const QVector<WeatherData::ForecastInfo*>& forecastInfos) const;
};
QVector<WeatherData::ForecastPeriod *> forecasts;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment