From 392a9f8abe25032260a82a2e7038b2f0f640ced2 Mon Sep 17 00:00:00 2001 From: Hugo van der Merwe <17109322+hugovdm@users.noreply.github.com> Date: Wed, 1 Jul 2020 00:29:05 +0200 Subject: [PATCH] Add LongNameHandler::LongNameHandler(). AllowShortFunctionsOnASingleLine: false --- icu4c/source/i18n/number_longnames.cpp | 2 +- icu4c/source/i18n/number_longnames.h | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/icu4c/source/i18n/number_longnames.cpp b/icu4c/source/i18n/number_longnames.cpp index 012fae7d2b9..9904c5b7c96 100644 --- a/icu4c/source/i18n/number_longnames.cpp +++ b/icu4c/source/i18n/number_longnames.cpp @@ -422,7 +422,7 @@ LongNameMultiplexer::forMeasureUnits(const Locale &loc, const MaybeStackVectorfLongNameHandlers.emplaceBackAndCheckErrorCode(status, nullptr, nullptr); + result->fLongNameHandlers.emplaceBackAndCheckErrorCode(status); result->fMeasureUnits[i] = *units[i]; // Fill in LongNameHandler: LongNameHandler::forMeasureUnit(loc, *units[i], diff --git a/icu4c/source/i18n/number_longnames.h b/icu4c/source/i18n/number_longnames.h index f12767513e1..b0bdbc347d5 100644 --- a/icu4c/source/i18n/number_longnames.h +++ b/icu4c/source/i18n/number_longnames.h @@ -52,7 +52,11 @@ class LongNameHandler : public MicroPropsGenerator, public ModifierStore, public const MicroPropsGenerator *parent; LongNameHandler(const PluralRules *rules, const MicroPropsGenerator *parent) - : rules(rules), parent(parent) {} + : rules(rules), parent(parent) { + } + + LongNameHandler() : rules(nullptr), parent(nullptr) { + } friend class MemoryPool; // To enable emplaceBack(); -- 2.40.0