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

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

Issue 22875037: My clang now doesn't complain about !"foo". (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « tools/flags/SkCommandLineFlags.h ('k') | no next file » | 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 "SkCommandLineFlags.h" 8 #include "SkCommandLineFlags.h"
9 #include "SkTDArray.h" 9 #include "SkTDArray.h"
10 10
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 break; 271 break;
272 case SkFlagInfo::kInt_FlagType: 272 case SkFlagInfo::kInt_FlagType:
273 i++; 273 i++;
274 flag->setInt(atoi(argv[i])); 274 flag->setInt(atoi(argv[i]));
275 break; 275 break;
276 case SkFlagInfo::kDouble_FlagType: 276 case SkFlagInfo::kDouble_FlagType:
277 i++; 277 i++;
278 flag->setDouble(atof(argv[i])); 278 flag->setDouble(atof(argv[i]));
279 break; 279 break;
280 default: 280 default:
281 SkASSERT(!"Invalid flag type"); 281 SkDEBUGFAIL("Invalid flag type");
282 } 282 }
283 break; 283 break;
284 } 284 }
285 flag = flag->next(); 285 flag = flag->next();
286 } 286 }
287 if (!flagMatched) { 287 if (!flagMatched) {
288 SkDebugf("Got unknown flag \"%s\". Exiting.\n", argv[i]); 288 SkDebugf("Got unknown flag \"%s\". Exiting.\n", argv[i]);
289 exit(-1); 289 exit(-1);
290 } 290 }
291 } 291 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 if (matchStart ? (!matchEnd || matchLen == testLen) 327 if (matchStart ? (!matchEnd || matchLen == testLen)
328 && strncmp(name, matchName, matchLen) == 0 328 && strncmp(name, matchName, matchLen) == 0
329 : matchEnd ? matchLen <= testLen 329 : matchEnd ? matchLen <= testLen
330 && strncmp(name + testLen - matchLen, matchName, matchLen) == 0 330 && strncmp(name + testLen - matchLen, matchName, matchLen) == 0
331 : strstr(name, matchName) != 0) { 331 : strstr(name, matchName) != 0) {
332 return matchExclude; 332 return matchExclude;
333 } 333 }
334 } 334 }
335 return !anyExclude; 335 return !anyExclude;
336 } 336 }
OLDNEW
« no previous file with comments | « tools/flags/SkCommandLineFlags.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698