- DIRPRICE_DATA_RES & operator= (const DIRPRICE_DATA & rvalue)
- {
- hDay = rvalue.hDay;
- mDay = rvalue.mDay;
- hNight = rvalue.hNight;
- mNight = rvalue.mNight;
- priceDayA = rvalue.priceDayA;
- priceNightA = rvalue.priceNightA;
- priceDayB = rvalue.priceDayB;
- priceNightB = rvalue.priceNightB;
- threshold = rvalue.threshold;
- singlePrice = rvalue.singlePrice;
- noDiscount = rvalue.noDiscount;
+ DirPriceDataOpt(const DirPriceData& data) noexcept
+ : hDay(data.hDay),
+ mDay(data.mDay),
+ hNight(data.hNight),
+ mNight(data.mNight),
+ priceDayA(data.priceDayA),
+ priceNightA(data.priceNightA),
+ priceDayB(data.priceDayB),
+ priceNightB(data.priceNightB),
+ threshold(data.threshold),
+ singlePrice(data.singlePrice),
+ noDiscount(data.noDiscount)
+ {}
+
+ DirPriceDataOpt(const DirPriceDataOpt&) = default;
+ DirPriceDataOpt& operator=(const DirPriceDataOpt&) = default;
+ DirPriceDataOpt(DirPriceDataOpt&&) = default;
+ DirPriceDataOpt& operator=(DirPriceDataOpt&&) = default;
+
+ DirPriceDataOpt & operator=(const DirPriceData& rhs) noexcept
+ {
+ hDay = rhs.hDay;
+ mDay = rhs.mDay;
+ hNight = rhs.hNight;
+ mNight = rhs.mNight;
+ priceDayA = rhs.priceDayA;
+ priceNightA = rhs.priceNightA;
+ priceDayB = rhs.priceDayB;
+ priceNightB = rhs.priceNightB;
+ threshold = rhs.threshold;
+ singlePrice = rhs.singlePrice;
+ noDiscount = rhs.noDiscount;