From 33dfe0729fecaf2f40a7d61a9fd8bdcbfba33255 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 7 Oct 2015 10:53:54 +0200 Subject: Reduce variable scope Change-Id: I1269bd713bae10f9b6c1d3e797dd7043d24fa8d3 --- i18npool/source/localedata/LocaleNode.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'i18npool') diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx index a60588f5f8dd..e3884dde48c3 100644 --- a/i18npool/source/localedata/LocaleNode.cxx +++ b/i18npool/source/localedata/LocaleNode.cxx @@ -503,8 +503,7 @@ void LCCTYPENode::generateCode (const OFileWriter &of) const fprintf( stderr, "Warning: %s\n", "QuotationEnd equals DoubleQuotationEnd. Not necessarily an issue, but unusual."); // Known good values, exclude ASCII single (U+0027, ') and double (U+0022, ") quotes. - int ic; - switch (ic = aQuoteStart.toChar()) + switch (int ic = aQuoteStart.toChar()) { case 0x2018: // LEFT SINGLE QUOTATION MARK case 0x201a: // SINGLE LOW-9 QUOTATION MARK @@ -518,7 +517,7 @@ void LCCTYPENode::generateCode (const OFileWriter &of) const fprintf( stderr, "Warning: %s U+%04X %s\n", "QuotationStart may be wrong:", ic, OSTR( aQuoteStart)); } - switch (ic = aQuoteEnd.toChar()) + switch (int ic = aQuoteEnd.toChar()) { case 0x2019: // RIGHT SINGLE QUOTATION MARK case 0x201a: // SINGLE LOW-9 QUOTATION MARK @@ -532,7 +531,7 @@ void LCCTYPENode::generateCode (const OFileWriter &of) const fprintf( stderr, "Warning: %s U+%04X %s\n", "QuotationEnd may be wrong:", ic, OSTR( aQuoteEnd)); } - switch (ic = aDoubleQuoteStart.toChar()) + switch (int ic = aDoubleQuoteStart.toChar()) { case 0x00ab: // LEFT-POINTING DOUBLE ANGLE QUOTATION MARK case 0x00bb: // RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK @@ -546,7 +545,7 @@ void LCCTYPENode::generateCode (const OFileWriter &of) const fprintf( stderr, "Warning: %s U+%04X %s\n", "DoubleQuotationStart may be wrong:", ic, OSTR( aDoubleQuoteStart)); } - switch (ic = aDoubleQuoteEnd.toChar()) + switch (int ic = aDoubleQuoteEnd.toChar()) { case 0x00ab: // LEFT-POINTING DOUBLE ANGLE QUOTATION MARK case 0x00bb: // RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK -- cgit v1.2.3