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

Side by Side Diff: src/utils/SkRTConf.cpp

Issue 15300019: fix boolean check for unknown rtconf variables in files. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 7 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 | « no previous file | 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 "SkRTConf.h" 8 #include "SkRTConf.h"
9 #include "SkOSFile.h" 9 #include "SkOSFile.h"
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 if (configFileSize == 0) { 69 if (configFileSize == 0) {
70 printAll(path); 70 printAll(path);
71 } 71 }
72 sk_fclose(fp); 72 sk_fclose(fp);
73 } 73 }
74 74
75 // Run through every provided configuration option and print a warning if the us er hasn't 75 // Run through every provided configuration option and print a warning if the us er hasn't
76 // declared a correponding configuration object somewhere. 76 // declared a correponding configuration object somewhere.
77 void SkRTConfRegistry::validate() const { 77 void SkRTConfRegistry::validate() const {
78 for (int i = 0 ; i < fConfigFileKeys.count() ; i++) { 78 for (int i = 0 ; i < fConfigFileKeys.count() ; i++) {
79 if (fConfs.find(fConfigFileKeys[i]->c_str())) { 79 if (!fConfs.find(fConfigFileKeys[i]->c_str())) {
80 SkDebugf("WARNING: You have config value %s in your configuration fi le, but I've never heard of that.\n", fConfigFileKeys[i]->c_str()); 80 SkDebugf("WARNING: You have config value %s in your configuration fi le, but I've never heard of that.\n", fConfigFileKeys[i]->c_str());
81 } 81 }
82 } 82 }
83 } 83 }
84 84
85 void SkRTConfRegistry::printAll(const char *fname) const { 85 void SkRTConfRegistry::printAll(const char *fname) const {
86 SkWStream *o; 86 SkWStream *o;
87 87
88 if (NULL != fname) { 88 if (NULL != fname) {
89 o = new SkFILEWStream(fname); 89 o = new SkFILEWStream(fname);
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 template void SkRTConfRegistry::set(const char *name, int value); 286 template void SkRTConfRegistry::set(const char *name, int value);
287 template void SkRTConfRegistry::set(const char *name, unsigned int value); 287 template void SkRTConfRegistry::set(const char *name, unsigned int value);
288 template void SkRTConfRegistry::set(const char *name, float value); 288 template void SkRTConfRegistry::set(const char *name, float value);
289 template void SkRTConfRegistry::set(const char *name, double value); 289 template void SkRTConfRegistry::set(const char *name, double value);
290 template void SkRTConfRegistry::set(const char *name, char * value); 290 template void SkRTConfRegistry::set(const char *name, char * value);
291 291
292 SkRTConfRegistry &skRTConfRegistry() { 292 SkRTConfRegistry &skRTConfRegistry() {
293 static SkRTConfRegistry r; 293 static SkRTConfRegistry r;
294 return r; 294 return r;
295 } 295 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698