ICU-20138 Copy fErrorCode in FormattedValue subclass macro.

This commit is contained in:
Shane Carr 2019-02-06 16:03:10 -08:00 committed by Shane F. Carr
parent 8a56b89b03
commit 026095ddc3

View file

@ -63,9 +63,10 @@ struct UFormattedValueImpl : public UMemory, public UFormattedValueApiHelper {
/** Implementation of the methods from U_FORMATTED_VALUE_SUBCLASS_AUTO. */
#define UPRV_FORMATTED_VALUE_SUBCLASS_AUTO_IMPL(Name) \
Name::Name(Name&& src) U_NOEXCEPT { \
delete fData; \
fData = src.fData; \
src.fData = nullptr; \
fErrorCode = src.fErrorCode; \
src.fErrorCode = U_INVALID_STATE_ERROR; \
} \
Name::~Name() { \
delete fData; \
@ -75,6 +76,8 @@ struct UFormattedValueImpl : public UMemory, public UFormattedValueApiHelper {
delete fData; \
fData = src.fData; \
src.fData = nullptr; \
fErrorCode = src.fErrorCode; \
src.fErrorCode = U_INVALID_STATE_ERROR; \
return *this; \
} \
UnicodeString Name::toString(UErrorCode& status) const { \