- if (!stat.cashAdd.empty())
- stream << "<cash add=\"" << stat.cashAdd.data().first << "\" msg=\"" << IconvString(Encode12str(stat.cashAdd.data().second), encoding, "koi8-ru") << "\"/>";
- else if (!stat.cashSet.empty())
- stream << "<cash set=\"" << stat.cashSet.data().first << "\" msg=\"" << IconvString(Encode12str(stat.cashSet.data().second), encoding, "koi8-ru") << "\"/>";
+ if (stat.cashAdd)
+ stream << "<cash add=\"" << stat.cashAdd.value().first << "\" msg=\"" << IconvString(Encode12str(stat.cashAdd.value().second), encoding, "koi8-ru") << "\"/>";
+ else if (stat.cashSet)
+ stream << "<cash set=\"" << stat.cashSet.value().first << "\" msg=\"" << IconvString(Encode12str(stat.cashSet.value().second), encoding, "koi8-ru") << "\"/>";