From 438f1f363b67f0f8b74032015c4c23235fae08a3 Mon Sep 17 00:00:00 2001 From: Markus Scherer Date: Wed, 30 May 2018 19:15:02 +0000 Subject: [PATCH] ICU-13667 LocalizedNumberFormatterAsFormat is in the old Format class hierarchy, add ClassID boilerplate; NoUnit move virtual destructor up into first-virtual position, right after constructors X-SVN-Rev: 41487 --- icu4c/source/i18n/number_asformat.cpp | 2 ++ icu4c/source/i18n/number_asformat.h | 3 +++ icu4c/source/i18n/unicode/nounit.h | 12 ++++++------ 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/icu4c/source/i18n/number_asformat.cpp b/icu4c/source/i18n/number_asformat.cpp index 96b0a1c37a..c6bb538932 100644 --- a/icu4c/source/i18n/number_asformat.cpp +++ b/icu4c/source/i18n/number_asformat.cpp @@ -21,6 +21,8 @@ using namespace icu; using namespace icu::number; using namespace icu::number::impl; +UOBJECT_DEFINE_RTTI_IMPLEMENTATION(LocalizedNumberFormatterAsFormat) + LocalizedNumberFormatterAsFormat::LocalizedNumberFormatterAsFormat( const LocalizedNumberFormatter& formatter, const Locale& locale) : fFormatter(formatter), fLocale(locale) { diff --git a/icu4c/source/i18n/number_asformat.h b/icu4c/source/i18n/number_asformat.h index 0ceb0c1479..bf82d72ae3 100644 --- a/icu4c/source/i18n/number_asformat.h +++ b/icu4c/source/i18n/number_asformat.h @@ -87,6 +87,9 @@ class U_I18N_API LocalizedNumberFormatterAsFormat : public Format { */ const LocalizedNumberFormatter& getNumberFormatter() const; + UClassID getDynamicClassID() const U_OVERRIDE; + static UClassID U_EXPORT2 getStaticClassID(); + private: LocalizedNumberFormatter fFormatter; diff --git a/icu4c/source/i18n/unicode/nounit.h b/icu4c/source/i18n/unicode/nounit.h index 290e77e880..288f268d66 100644 --- a/icu4c/source/i18n/unicode/nounit.h +++ b/icu4c/source/i18n/unicode/nounit.h @@ -61,6 +61,12 @@ public: */ NoUnit(const NoUnit& other); + /** + * Destructor. + * @draft ICU 60 + */ + virtual ~NoUnit(); + /** * Return a polymorphic clone of this object. The result will * have the same class as returned by getDynamicClassID(). @@ -86,12 +92,6 @@ public: */ static UClassID U_EXPORT2 getStaticClassID(); - /** - * Destructor. - * @draft ICU 60 - */ - virtual ~NoUnit(); - private: /** * Constructor