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

Unified Diff: src/utils/SkRTConf.cpp

Issue 20136003: search registered rtconf variables backwards and break when we find the (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkRTConf.cpp
diff --git a/src/utils/SkRTConf.cpp b/src/utils/SkRTConf.cpp
index bc2031f2e847ee001a6a44509feb3189d5fdd55e..e0977fe42f21e39a21a04909610853dc0fdb9cc3 100644
--- a/src/utils/SkRTConf.cpp
+++ b/src/utils/SkRTConf.cpp
@@ -215,9 +215,10 @@ static inline void str_replace(char *s, char search, char replace) {
template<typename T> bool SkRTConfRegistry::parse(const char *name, T* value) {
SkString *str = NULL;
- for (int i = 0 ; i < fConfigFileKeys.count() ; i++) {
+ for (int i = fConfigFileKeys.count() - 1 ; i >= 0; i--) {
if (fConfigFileKeys[i]->equals(name)) {
str = fConfigFileValues[i];
+ break;
}
}
« 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