summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/PropertiesI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/PropertiesI.cpp')
-rw-r--r--cpp/src/Ice/PropertiesI.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/cpp/src/Ice/PropertiesI.cpp b/cpp/src/Ice/PropertiesI.cpp
index e8a7a9b8c16..0306455ce54 100644
--- a/cpp/src/Ice/PropertiesI.cpp
+++ b/cpp/src/Ice/PropertiesI.cpp
@@ -70,19 +70,18 @@ Ice::PropertiesI::getPropertyAsIntWithDefault(const string& key, Int value)
}
}
-StringSeq
-Ice::PropertiesI::getProperties(const string& prefix)
+PropertyDict
+Ice::PropertiesI::getPropertiesForPrefix(const string& prefix)
{
IceUtil::Mutex::Lock sync(*this);
- StringSeq result;
+ PropertyDict result;
map<string, string>::const_iterator p;
for (p = _properties.begin(); p != _properties.end(); ++p)
{
- if (prefix.empty() || p->first.find(prefix) == 0)
+ if (prefix.empty() || p->first.compare(0, prefix.size(), prefix) == 0)
{
- result.push_back(p->first);
- result.push_back(p->second);
+ result.insert(*p);
}
}