Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(262)

Side by Side Diff: third_party/WebKit/Source/platform/text/LocaleWin.cpp

Issue 2668903003: Replace WTF::emptyString{16Bit}() with a static global (Closed)
Patch Set: Replace WTF::emptyString{16Bit}() with a static global Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 String negativeSign = getLocaleInfoString(LOCALE_SNEGATIVESIGN); 463 String negativeSign = getLocaleInfoString(LOCALE_SNEGATIVESIGN);
464 enum NegativeFormat { 464 enum NegativeFormat {
465 NegativeFormatParenthesis = 0, 465 NegativeFormatParenthesis = 0,
466 NegativeFormatSignPrefix = 1, 466 NegativeFormatSignPrefix = 1,
467 NegativeFormatSignSpacePrefix = 2, 467 NegativeFormatSignSpacePrefix = 2,
468 NegativeFormatSignSuffix = 3, 468 NegativeFormatSignSuffix = 3,
469 NegativeFormatSpaceSignSuffix = 4, 469 NegativeFormatSpaceSignSuffix = 4,
470 }; 470 };
471 DWORD negativeFormat = NegativeFormatSignPrefix; 471 DWORD negativeFormat = NegativeFormatSignPrefix;
472 getLocaleInfo(LOCALE_INEGNUMBER, negativeFormat); 472 getLocaleInfo(LOCALE_INEGNUMBER, negativeFormat);
473 String negativePrefix = emptyString(); 473 String negativePrefix = emptyString;
474 String negativeSuffix = emptyString(); 474 String negativeSuffix = emptyString;
475 switch (negativeFormat) { 475 switch (negativeFormat) {
476 case NegativeFormatParenthesis: 476 case NegativeFormatParenthesis:
477 negativePrefix = "("; 477 negativePrefix = "(";
478 negativeSuffix = ")"; 478 negativeSuffix = ")";
479 break; 479 break;
480 case NegativeFormatSignSpacePrefix: 480 case NegativeFormatSignSpacePrefix:
481 negativePrefix = negativeSign + " "; 481 negativePrefix = negativeSign + " ";
482 break; 482 break;
483 case NegativeFormatSignSuffix: 483 case NegativeFormatSignSuffix:
484 negativeSuffix = negativeSign; 484 negativeSuffix = negativeSign;
485 break; 485 break;
486 case NegativeFormatSpaceSignSuffix: 486 case NegativeFormatSpaceSignSuffix:
487 negativeSuffix = " " + negativeSign; 487 negativeSuffix = " " + negativeSign;
488 break; 488 break;
489 case NegativeFormatSignPrefix: // Fall through. 489 case NegativeFormatSignPrefix: // Fall through.
490 default: 490 default:
491 negativePrefix = negativeSign; 491 negativePrefix = negativeSign;
492 break; 492 break;
493 } 493 }
494 m_didInitializeNumberData = true; 494 m_didInitializeNumberData = true;
495 setLocaleData(symbols, emptyString(), emptyString(), negativePrefix, 495 setLocaleData(symbols, emptyString, emptyString, negativePrefix,
496 negativeSuffix); 496 negativeSuffix);
497 } 497 }
498 } 498 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/text/LocaleICU.cpp ('k') | third_party/WebKit/Source/platform/weborigin/KURL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698