From: varocarbas Date: Sun, 6 Nov 2016 14:41:33 +0000 (+0100) Subject: Removal of the ansicurrSymbol variable. (dotnet/coreclr#7999) X-Git-Tag: submit/tizen/20210909.063632~11030^2~8960 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=782dffe4adb45a213968b1037c353697cedccc36;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Removal of the ansicurrSymbol variable. (dotnet/coreclr#7999) Commit migrated from https://github.com/dotnet/coreclr/commit/8351597b3af6bf188eb328fe5e2b3b8eb979c831 --- diff --git a/src/coreclr/src/mscorlib/src/System/Number.cs b/src/coreclr/src/mscorlib/src/System/Number.cs index d832f72..a4b88a9 100644 --- a/src/coreclr/src/mscorlib/src/System/Number.cs +++ b/src/coreclr/src/mscorlib/src/System/Number.cs @@ -742,20 +742,10 @@ namespace System { string groupSep; // group separator from NumberFormatInfo. string currSymbol = null; // currency symbol from NumberFormatInfo. - // The alternative currency symbol used in ANSI codepage, that can not roundtrip between ANSI and Unicode. - // Currently, only ja-JP and ko-KR has non-null values (which is U+005c, backslash) - string ansicurrSymbol = null; // currency symbol from NumberFormatInfo. - Boolean parsingCurrency = false; if ((options & NumberStyles.AllowCurrencySymbol) != 0) { currSymbol = numfmt.CurrencySymbol; -#if !FEATURE_COREFX_GLOBALIZATION - if (numfmt.ansiCurrencySymbol != null) { - ansicurrSymbol = numfmt.ansiCurrencySymbol; - } -#endif - // The idea here is to match the currency separators and on failure match the number separators to keep the perf of VB's IsNumeric fast. // The values of decSep are setup to use the correct relevant separator (currency in the if part and decimal in the else part). decSep = numfmt.CurrencyDecimalSeparator; @@ -787,10 +777,9 @@ namespace System { state |= StateSign | StateParens; number.sign = true; } - else if ((currSymbol != null && (next = MatchChars(p, currSymbol)) != null) || (ansicurrSymbol != null && (next = MatchChars(p, ansicurrSymbol)) != null)) { + else if (currSymbol != null && (next = MatchChars(p, currSymbol)) != null) { state |= StateCurrency; currSymbol = null; - ansicurrSymbol = null; // We already found the currency symbol. There should not be more currency symbols. Set // currSymbol to NULL so that we won't search it again in the later code path. p = next - 1; @@ -887,9 +876,8 @@ namespace System { else if (ch == ')' && ((state & StateParens) != 0)) { state &= ~StateParens; } - else if ((currSymbol != null && (next = MatchChars(p, currSymbol)) != null) || (ansicurrSymbol != null && (next = MatchChars(p, ansicurrSymbol)) != null)) { + else if (currSymbol != null && (next = MatchChars(p, currSymbol)) != null) { currSymbol = null; - ansicurrSymbol = null; p = next - 1; } else {