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

Side by Side Diff: src/sfnt/SkOTTable_name.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 years, 3 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
« no previous file with comments | « src/ports/SkTypeface_win_dw.cpp ('k') | src/sfnt/SkOTUtils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkOTTable_name.h" 8 #include "SkOTTable_name.h"
9 9
10 #include "SkEndian.h" 10 #include "SkEndian.h"
(...skipping 13 matching lines...) Expand all
24 unsigned c2 = SkEndian_SwapBE16(*src++); 24 unsigned c2 = SkEndian_SwapBE16(*src++);
25 SkASSERT(SkUTF16_IsLowSurrogate(c2)); 25 SkASSERT(SkUTF16_IsLowSurrogate(c2));
26 26
27 c = (c << 10) + c2 + (0x10000 - (0xD800 << 10) - 0xDC00); 27 c = (c << 10) + c2 + (0x10000 - (0xD800 << 10) - 0xDC00);
28 } 28 }
29 *srcPtr = src; 29 *srcPtr = src;
30 return c; 30 return c;
31 } 31 }
32 32
33 static void SkStringFromUTF16BE(const uint16_t* utf16be, size_t length, SkString & utf8) { 33 static void SkStringFromUTF16BE(const uint16_t* utf16be, size_t length, SkString & utf8) {
34 SkASSERT(utf16be != NULL); 34 SkASSERT(utf16be != nullptr);
35 35
36 utf8.reset(); 36 utf8.reset();
37 size_t numberOf16BitValues = length / 2; 37 size_t numberOf16BitValues = length / 2;
38 const uint16_t* end = utf16be + numberOf16BitValues; 38 const uint16_t* end = utf16be + numberOf16BitValues;
39 while (utf16be < end) { 39 while (utf16be < end) {
40 utf8.appendUnichar(SkUTF16BE_NextUnichar(&utf16be)); 40 utf8.appendUnichar(SkUTF16BE_NextUnichar(&utf16be));
41 } 41 }
42 } 42 }
43 43
44 /** UnicodeFromMacRoman[macRomanPoint - 0x80] -> unicodeCodePoint. 44 /** UnicodeFromMacRoman[macRomanPoint - 0x80] -> unicodeCodePoint.
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 BCP47FromLanguageID, SK_ARRAY_COUNT(BCP47FromLanguageID), target, sizeof (target)); 525 BCP47FromLanguageID, SK_ARRAY_COUNT(BCP47FromLanguageID), target, sizeof (target));
526 if (languageIndex >= 0) { 526 if (languageIndex >= 0) {
527 record.language = BCP47FromLanguageID[languageIndex].bcp47; 527 record.language = BCP47FromLanguageID[languageIndex].bcp47;
528 return true; 528 return true;
529 } 529 }
530 530
531 // Unknown language, return the BCP 47 code 'und' for 'undetermined'. 531 // Unknown language, return the BCP 47 code 'und' for 'undetermined'.
532 record.language = "und"; 532 record.language = "und";
533 return true; 533 return true;
534 } 534 }
OLDNEW
« no previous file with comments | « src/ports/SkTypeface_win_dw.cpp ('k') | src/sfnt/SkOTUtils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698