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

Side by Side Diff: src/sfnt/SkOTUtils.h

Issue 1037793002: C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla} (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: git cl web Created 5 years, 9 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/svg/SkSVGDevice.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 2012 Google Inc. 2 * Copyright 2012 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 #ifndef SkOTUtils_DEFINED 8 #ifndef SkOTUtils_DEFINED
9 #define SkOTUtils_DEFINED 9 #define SkOTUtils_DEFINED
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 int typesCount) 47 int typesCount)
48 : fTypes(types), fTypesCount(typesCount), fTypesIndex(0) 48 : fTypes(types), fTypesCount(typesCount), fTypesIndex(0)
49 , fNameTableData(nameTableData), fFamilyNameIter(*nameTableData, fTy pes[fTypesIndex]) 49 , fNameTableData(nameTableData), fFamilyNameIter(*nameTableData, fTy pes[fTypesIndex])
50 { } 50 { }
51 51
52 /** Creates an iterator over all the family names in the 'name' table of a typeface. 52 /** Creates an iterator over all the family names in the 'name' table of a typeface.
53 * If no valid 'name' table can be found, returns NULL. 53 * If no valid 'name' table can be found, returns NULL.
54 */ 54 */
55 static LocalizedStrings_NameTable* CreateForFamilyNames(const SkTypeface & typeface); 55 static LocalizedStrings_NameTable* CreateForFamilyNames(const SkTypeface & typeface);
56 56
57 bool next(SkTypeface::LocalizedString* localizedString) SK_OVERRIDE; 57 bool next(SkTypeface::LocalizedString* localizedString) override;
58 private: 58 private:
59 static SkOTTableName::Record::NameID::Predefined::Value familyNameTypes[ 3]; 59 static SkOTTableName::Record::NameID::Predefined::Value familyNameTypes[ 3];
60 60
61 SkOTTableName::Record::NameID::Predefined::Value* fTypes; 61 SkOTTableName::Record::NameID::Predefined::Value* fTypes;
62 int fTypesCount; 62 int fTypesCount;
63 int fTypesIndex; 63 int fTypesIndex;
64 SkAutoTDeleteArray<SkOTTableName> fNameTableData; 64 SkAutoTDeleteArray<SkOTTableName> fNameTableData;
65 SkOTTableName::Iterator fFamilyNameIter; 65 SkOTTableName::Iterator fFamilyNameIter;
66 }; 66 };
67 67
68 /** An implementation of LocalizedStrings which has one name. */ 68 /** An implementation of LocalizedStrings which has one name. */
69 class LocalizedStrings_SingleName : public SkTypeface::LocalizedStrings { 69 class LocalizedStrings_SingleName : public SkTypeface::LocalizedStrings {
70 public: 70 public:
71 LocalizedStrings_SingleName(SkString name, SkString language) 71 LocalizedStrings_SingleName(SkString name, SkString language)
72 : fName(name), fLanguage(language), fHasNext(true) 72 : fName(name), fLanguage(language), fHasNext(true)
73 { } 73 { }
74 74
75 bool next(SkTypeface::LocalizedString* localizedString) SK_OVERRIDE { 75 bool next(SkTypeface::LocalizedString* localizedString) override {
76 localizedString->fString = fName; 76 localizedString->fString = fName;
77 localizedString->fLanguage = fLanguage; 77 localizedString->fLanguage = fLanguage;
78 78
79 bool hadNext = fHasNext; 79 bool hadNext = fHasNext;
80 fHasNext = false; 80 fHasNext = false;
81 return hadNext; 81 return hadNext;
82 } 82 }
83 83
84 private: 84 private:
85 SkString fName; 85 SkString fName;
86 SkString fLanguage; 86 SkString fLanguage;
87 bool fHasNext; 87 bool fHasNext;
88 }; 88 };
89 }; 89 };
90 90
91 #endif 91 #endif
OLDNEW
« no previous file with comments | « src/ports/SkTypeface_win_dw.cpp ('k') | src/svg/SkSVGDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698