From b5ad35dda8089d798f05508bf7f17a3049e9eca0 Mon Sep 17 00:00:00 2001 From: Jeff Genovy <29107334+jefgen@users.noreply.github.com> Date: Fri, 22 Mar 2019 17:43:28 -0700 Subject: [PATCH] ICU-20516 Fix MSVC Warning C4003: not enough arguments for function-like macro invocation --- icu4c/source/i18n/number_output.cpp | 5 +++-- icu4c/source/i18n/numrange_fluent.cpp | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/icu4c/source/i18n/number_output.cpp b/icu4c/source/i18n/number_output.cpp index 1e86f2f9833..6f4e2482044 100644 --- a/icu4c/source/i18n/number_output.cpp +++ b/icu4c/source/i18n/number_output.cpp @@ -16,6 +16,7 @@ namespace number { UPRV_FORMATTED_VALUE_SUBCLASS_AUTO_IMPL(FormattedNumber) +#define UPRV_NOARG UBool FormattedNumber::nextFieldPosition(FieldPosition& fieldPosition, UErrorCode& status) const { UPRV_FORMATTED_VALUE_METHOD_GUARD(FALSE) @@ -30,12 +31,12 @@ void FormattedNumber::getAllFieldPositions(FieldPositionIterator& iterator, UErr void FormattedNumber::getAllFieldPositionsImpl(FieldPositionIteratorHandler& fpih, UErrorCode& status) const { - UPRV_FORMATTED_VALUE_METHOD_GUARD() + UPRV_FORMATTED_VALUE_METHOD_GUARD(UPRV_NOARG) fData->getStringRef().getAllFieldPositions(fpih, status); } void FormattedNumber::getDecimalQuantity(impl::DecimalQuantity& output, UErrorCode& status) const { - UPRV_FORMATTED_VALUE_METHOD_GUARD() + UPRV_FORMATTED_VALUE_METHOD_GUARD(UPRV_NOARG) output = fData->quantity; } diff --git a/icu4c/source/i18n/numrange_fluent.cpp b/icu4c/source/i18n/numrange_fluent.cpp index 079d5194b03..b284561cdc2 100644 --- a/icu4c/source/i18n/numrange_fluent.cpp +++ b/icu4c/source/i18n/numrange_fluent.cpp @@ -377,6 +377,7 @@ LocalizedNumberRangeFormatter::getFormatter(UErrorCode& status) const { UPRV_FORMATTED_VALUE_SUBCLASS_AUTO_IMPL(FormattedNumberRange) +#define UPRV_NOARG UBool FormattedNumberRange::nextFieldPosition(FieldPosition& fieldPosition, UErrorCode& status) const { UPRV_FORMATTED_VALUE_METHOD_GUARD(FALSE) @@ -391,7 +392,7 @@ void FormattedNumberRange::getAllFieldPositions(FieldPositionIterator& iterator, void FormattedNumberRange::getAllFieldPositionsImpl( FieldPositionIteratorHandler& fpih, UErrorCode& status) const { - UPRV_FORMATTED_VALUE_METHOD_GUARD() + UPRV_FORMATTED_VALUE_METHOD_GUARD(UPRV_NOARG) fData->getStringRef().getAllFieldPositions(fpih, status); } -- 2.40.0