]> granicus.if.org Git - icu/commitdiff
ICU-11104 MSVC compiler warnings, apply patch from Chromium.
authorAndy Heninger <andy.heninger@gmail.com>
Fri, 30 Jan 2015 02:18:02 +0000 (02:18 +0000)
committerAndy Heninger <andy.heninger@gmail.com>
Fri, 30 Jan 2015 02:18:02 +0000 (02:18 +0000)
X-SVN-Rev: 36995

icu4c/source/i18n/decimfmt.cpp
icu4c/source/i18n/digitlst.cpp
icu4c/source/i18n/regexcmp.cpp

index f8df10abe9964b261dafbcc04c9b190e3f661235..a0ee233ccd5eecc7bbdb983bc5bc09dc6c84a24e 100644 (file)
@@ -1,6 +1,6 @@
 /*
 *******************************************************************************
-* Copyright (C) 1997-2014, International Business Machines Corporation and    *
+* Copyright (C) 1997-2015, International Business Machines Corporation and    *
 * others. All Rights Reserved.                                                *
 *******************************************************************************
 *
@@ -1434,7 +1434,7 @@ DecimalFormat::_format(int64_t number,
         // Slide the number to the start of the output str
     U_ASSERT(destIdx >= 0);
     int32_t length = MAX_IDX - destIdx -1;
-    /*int32_t prefixLen = */ appendAffix(appendTo, number, handler, number<0, TRUE);
+    /*int32_t prefixLen = */ appendAffix(appendTo, static_cast<double>(number), handler, number<0, TRUE);
     int32_t maxIntDig = getMaximumIntegerDigits();
     int32_t destlength = length<=maxIntDig?length:maxIntDig; // dest length pinned to max int digits
 
@@ -1458,7 +1458,7 @@ DecimalFormat::_format(int64_t number,
                     destlength);
     handler.addAttribute(kIntegerField, intBegin, appendTo.length());
 
-    /*int32_t suffixLen =*/ appendAffix(appendTo, number, handler, number<0, FALSE);
+    /*int32_t suffixLen =*/ appendAffix(appendTo, static_cast<double>(number), handler, number<0, FALSE);
 
     //outputStr[length]=0;
     
index b0e60107c6bbef7c1733ef2118e8c2ca864fc801..51738bec027d5e98dfcb5cc9ecb4e70182858184 100644 (file)
@@ -1,6 +1,6 @@
 /*
 **********************************************************************
-*   Copyright (C) 1997-2014, International Business Machines
+*   Copyright (C) 1997-2015, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 **********************************************************************
 *
@@ -704,7 +704,7 @@ DigitList::set(int64_t source)
     U_ASSERT(uprv_strlen(str) < sizeof(str));
 
     uprv_decNumberFromString(fDecNumber, str, &fContext);
-    internalSetDouble(source);
+    internalSetDouble(static_cast<double>(source));
 }
 
 /**
index afed0f169e5895b7231240b60605091a148715e0..c3877a86aaa59e89bb9353c951914a33a44c343c 100644 (file)
@@ -1,7 +1,7 @@
 //
 //  file:  regexcmp.cpp
 //
-//  Copyright (C) 2002-2014 International Business Machines Corporation and others.
+//  Copyright (C) 2002-2015 International Business Machines Corporation and others.
 //  All Rights Reserved.
 //
 //  This file contains the ICU regular expression compiler, which is responsible
@@ -3478,7 +3478,7 @@ int32_t   RegexCompile::maxMatchLength(int32_t start, int32_t end) {
                     break;
                 }
 
-                int32_t maxLoopCount = fRXPat->fCompiledPat->elementAti(loc+3);
+                int32_t maxLoopCount = static_cast<int32_t>(fRXPat->fCompiledPat->elementAti(loc+3));
                 if (maxLoopCount == -1) {
                     // Unbounded Loop. No upper bound on match length.
                     currentLen = INT32_MAX;