|
|
@ -158,3 +158,16 @@ bool SimpleWeatherService::CurrentWeather::operator==(const SimpleWeatherService
|
|
|
|
this->maxTemperature == other.maxTemperature && this->minTemperature == other.maxTemperature &&
|
|
|
|
this->maxTemperature == other.maxTemperature && this->minTemperature == other.maxTemperature &&
|
|
|
|
std::strcmp(this->location.data(), other.location.data()) == 0;
|
|
|
|
std::strcmp(this->location.data(), other.location.data()) == 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool SimpleWeatherService::Forecast::Day::operator==(const SimpleWeatherService::Forecast::Day& other) const {
|
|
|
|
|
|
|
|
return this->iconId == other.iconId && this->maxTemperature == other.maxTemperature && this->minTemperature == other.maxTemperature;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool SimpleWeatherService::Forecast::operator==(const SimpleWeatherService::Forecast& other) const {
|
|
|
|
|
|
|
|
for (int i = 0; i < this->nbDays; i++) {
|
|
|
|
|
|
|
|
if (this->days[i] != other.days[i]) {
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return this->timestamp == other.timestamp && this->nbDays == other.nbDays;
|
|
|
|
|
|
|
|
}
|
|
|
|