From: Jeff Genovy <29107334+jefgen@users.noreply.github.com> Date: Sat, 23 Mar 2019 00:43:28 +0000 (-0700) Subject: ICU-20516 Fix MSVC Warning C4003: not enough arguments for function-like macro invocation X-Git-Tag: release-64-1~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b5ad35dda8089d798f05508bf7f17a3049e9eca0;p=icu ICU-20516 Fix MSVC Warning C4003: not enough arguments for function-like macro invocation --- 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); }