From 8c2576ee68fd796ada804cfd131209d89a554699 Mon Sep 17 00:00:00 2001 From: Shane Carr Date: Thu, 8 Feb 2018 03:22:44 +0000 Subject: [PATCH] ICU-13574 Adding missing const qualified to getConstDigitSymbol(). X-SVN-Rev: 40860 --- icu4c/source/i18n/unicode/dcfmtsym.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/icu4c/source/i18n/unicode/dcfmtsym.h b/icu4c/source/i18n/unicode/dcfmtsym.h index ebcaa4cb943..f7752fd77a8 100644 --- a/icu4c/source/i18n/unicode/dcfmtsym.h +++ b/icu4c/source/i18n/unicode/dcfmtsym.h @@ -422,9 +422,12 @@ public: * to accessing the symbol from getConstSymbol with the corresponding * key, such as kZeroDigitSymbol or kOneDigitSymbol. * + * @param digit The digit, an integer between 0 and 9 inclusive. + * If outside the range 0 to 9, the zero digit is returned. + * @return the format symbol for the given digit. * @internal This API is currently for ICU use only. */ - inline const UnicodeString& getConstDigitSymbol(int32_t digit); + inline const UnicodeString& getConstDigitSymbol(int32_t digit) const; /** * Returns that pattern stored in currecy info. Internal API for use by NumberFormat API. @@ -510,7 +513,7 @@ DecimalFormatSymbols::getConstSymbol(ENumberFormatSymbol symbol) const { return *strPtr; } -inline const UnicodeString& DecimalFormatSymbols::getConstDigitSymbol(int32_t digit) { +inline const UnicodeString& DecimalFormatSymbols::getConstDigitSymbol(int32_t digit) const { if (digit < 0 || digit > 9) { digit = 0; }