Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 309 [formatter.get() setUsesGroupingSeparator:NO]; | 309 [formatter.get() setUsesGroupingSeparator:NO]; |
| 310 | 310 |
| 311 RetainPtr<NSNumber> sampleNumber( | 311 RetainPtr<NSNumber> sampleNumber( |
| 312 AdoptNS, [[NSNumber alloc] initWithDouble:9876543210]); | 312 AdoptNS, [[NSNumber alloc] initWithDouble:9876543210]); |
| 313 String nineToZero([formatter.get() stringFromNumber:sampleNumber.get()]); | 313 String nineToZero([formatter.get() stringFromNumber:sampleNumber.get()]); |
| 314 if (nineToZero.length() != 10) | 314 if (nineToZero.length() != 10) |
| 315 return; | 315 return; |
| 316 Vector<String, DecimalSymbolsSize> symbols; | 316 Vector<String, DecimalSymbolsSize> symbols; |
| 317 for (unsigned i = 0; i < 10; ++i) | 317 for (unsigned i = 0; i < 10; ++i) |
| 318 symbols.push_back(nineToZero.substring(9 - i, 1)); | 318 symbols.push_back(nineToZero.substring(9 - i, 1)); |
| 319 ASSERT(symbols.size() == DecimalSeparatorIndex); | 319 DCHECK(symbols.size() == DecimalSeparatorIndex); |
|
tkent
2017/04/09 23:07:01
Use DCHECK_EQ if it doesn't cause a compile failur
Hwanseung Lee
2017/04/11 03:29:38
it was cause a compile failure.
| |
| 320 symbols.push_back([formatter.get() decimalSeparator]); | 320 symbols.push_back([formatter.get() decimalSeparator]); |
| 321 ASSERT(symbols.size() == GroupSeparatorIndex); | 321 DCHECK(symbols.size() == GroupSeparatorIndex); |
|
tkent
2017/04/09 23:07:01
Use DCHECK_EQ if it doesn't cause a compile failur
Hwanseung Lee
2017/04/11 03:29:38
it was cause a compile failure.
| |
| 322 symbols.push_back([formatter.get() groupingSeparator]); | 322 symbols.push_back([formatter.get() groupingSeparator]); |
| 323 ASSERT(symbols.size() == DecimalSymbolsSize); | 323 DCHECK(symbols.size() == DecimalSymbolsSize); |
|
tkent
2017/04/09 23:07:01
Use DCHECK_EQ if it doesn't cause a compile failur
Hwanseung Lee
2017/04/11 03:29:38
it was cause a compile failure.
| |
| 324 | 324 |
| 325 String positivePrefix([formatter.get() positivePrefix]); | 325 String positivePrefix([formatter.get() positivePrefix]); |
| 326 String positiveSuffix([formatter.get() positiveSuffix]); | 326 String positiveSuffix([formatter.get() positiveSuffix]); |
| 327 String negativePrefix([formatter.get() negativePrefix]); | 327 String negativePrefix([formatter.get() negativePrefix]); |
| 328 String negativeSuffix([formatter.get() negativeSuffix]); | 328 String negativeSuffix([formatter.get() negativeSuffix]); |
| 329 setLocaleData(symbols, positivePrefix, positiveSuffix, negativePrefix, | 329 setLocaleData(symbols, positivePrefix, positiveSuffix, negativePrefix, |
| 330 negativeSuffix); | 330 negativeSuffix); |
| 331 } | 331 } |
| 332 } | 332 } |
| OLD | NEW |