- if (!data.dirPrice[i].hDay.empty() &&
- !data.dirPrice[i].mDay.empty() &&
- !data.dirPrice[i].hNight.empty() &&
- !data.dirPrice[i].mNight.empty())
- stream << "<time" << i << " value=\"" << data.dirPrice[i].hDay.data() << ":"
- << data.dirPrice[i].mDay.data() << "-"
- << data.dirPrice[i].hNight.data() << ":"
- << data.dirPrice[i].mNight.data() << "\"/>";
+ if (data.dirPrice[i].hDay ||
+ data.dirPrice[i].mDay ||
+ data.dirPrice[i].hNight ||
+ data.dirPrice[i].mNight)
+ stream << "<time" << i << " value=\"" << data.dirPrice[i].hDay.value() << ":"
+ << data.dirPrice[i].mDay.value() << "-"
+ << data.dirPrice[i].hNight.value() << ":"
+ << data.dirPrice[i].mNight.value() << "\"/>";