mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 14:31:31 +00:00
ICU-20138 Copy fErrorCode in FormattedValue subclass macro.
This commit is contained in:
parent
8a56b89b03
commit
026095ddc3
1 changed files with 4 additions and 1 deletions
|
@ -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 { \
|
||||
|
|
Loading…
Add table
Reference in a new issue