diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2008-02-13 13:48:36 -0330 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2008-02-13 13:48:36 -0330 |
commit | 51454ae5a6219fb8e3a6464b35f545b620001279 (patch) | |
tree | 42ad16d4151a9ffb5f7675c5307c5e20f01cd159 /cpp/src/Ice/PropertiesI.cpp | |
parent | Added deprecated warning to error outputs (diff) | |
download | ice-51454ae5a6219fb8e3a6464b35f545b620001279.tar.bz2 ice-51454ae5a6219fb8e3a6464b35f545b620001279.tar.xz ice-51454ae5a6219fb8e3a6464b35f545b620001279.zip |
Bug 2491 - Use getPropertyAsList
Diffstat (limited to 'cpp/src/Ice/PropertiesI.cpp')
-rw-r--r-- | cpp/src/Ice/PropertiesI.cpp | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/cpp/src/Ice/PropertiesI.cpp b/cpp/src/Ice/PropertiesI.cpp index cc60f9bde79..bf8840badbe 100644 --- a/cpp/src/Ice/PropertiesI.cpp +++ b/cpp/src/Ice/PropertiesI.cpp @@ -101,7 +101,7 @@ Ice::PropertiesI::getPropertyAsListWithDefault(const string& key, const StringSe p->second.used = true; StringSeq result; - if(!IceUtilInternal::splitString(p->second.value, " \t\n", result)) + if(!IceUtilInternal::splitString(p->second.value, ", \t\n", result)) { Warning out(getProcessLogger()); out << "mismatched quotes in property " << key << "'s value, returning default value"; @@ -486,29 +486,14 @@ Ice::PropertiesI::loadConfig() if(s && *s != '\0') { value = s; + setProperty("Ice.Config", value); } } - if(!value.empty()) + StringSeq files = getPropertyAsList("Ice.Config"); + for(StringSeq::const_iterator p = files.begin(); p != files.end(); ++p) { - const string delim = " \t\r\n"; - string::size_type beg = value.find_first_not_of(delim); - while(beg != string::npos) - { - string::size_type end = value.find(",", beg); - string file; - if(end == string::npos) - { - file = value.substr(beg); - beg = end; - } - else - { - file = value.substr(beg, end - beg); - beg = value.find_first_not_of("," + delim, end); - } - load(file); - } + load(*p); } PropertyValue pv(value, true); |