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

Side by Side Diff: tools/flags/SkCommandLineFlags.h

Issue 373383003: ios fixes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: only build gyp on ios Created 6 years, 5 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 | « tools/Resources.cpp ('k') | tools/iOSShell.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 #ifndef SK_COMMAND_LINE_FLAGS_H 8 #ifndef SK_COMMAND_LINE_FLAGS_H
9 #define SK_COMMAND_LINE_FLAGS_H 9 #define SK_COMMAND_LINE_FLAGS_H
10 10
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 */ 130 */
131 bool contains(const char* string) const { 131 bool contains(const char* string) const {
132 for (int i = 0; i < fStrings.count(); i++) { 132 for (int i = 0; i < fStrings.count(); i++) {
133 if (fStrings[i].equals(string)) { 133 if (fStrings[i].equals(string)) {
134 return true; 134 return true;
135 } 135 }
136 } 136 }
137 return false; 137 return false;
138 } 138 }
139 139
140 void set(int i, const char* str) {
141 fStrings[i].set(str);
142 }
143
140 private: 144 private:
141 void reset() { fStrings.reset(); } 145 void reset() { fStrings.reset(); }
142 146
143 void append(const char* string) { 147 void append(const char* string) {
144 fStrings.push_back().set(string); 148 fStrings.push_back().set(string);
145 } 149 }
146 150
147 void append(const char* string, size_t length) { 151 void append(const char* string, size_t length) {
148 fStrings.push_back().set(string, length); 152 fStrings.push_back().set(string, length);
149 } 153 }
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 double* fDoubleValue; 441 double* fDoubleValue;
438 double fDefaultDouble; 442 double fDefaultDouble;
439 SkCommandLineFlags::StringArray* fStrings; 443 SkCommandLineFlags::StringArray* fStrings;
440 // Both for the help string and in case fStrings is empty. 444 // Both for the help string and in case fStrings is empty.
441 SkString fDefaultString; 445 SkString fDefaultString;
442 446
443 // In order to keep a linked list. 447 // In order to keep a linked list.
444 SkFlagInfo* fNext; 448 SkFlagInfo* fNext;
445 }; 449 };
446 #endif // SK_COMMAND_LINE_FLAGS_H 450 #endif // SK_COMMAND_LINE_FLAGS_H
OLDNEW
« no previous file with comments | « tools/Resources.cpp ('k') | tools/iOSShell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698