summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2002-07-25 17:43:40 +0000
committerMarc Laukien <marc@zeroc.com>2002-07-25 17:43:40 +0000
commit6f3a691d9fa9b118bcc7dad907cece01d12ced3f (patch)
treea8263f7461fd4865ff2cdcde11a7fdf1c610f847 /cpp/src
parentadded dummy --ice (diff)
downloadice-6f3a691d9fa9b118bcc7dad907cece01d12ced3f.tar.bz2
ice-6f3a691d9fa9b118bcc7dad907cece01d12ced3f.tar.xz
ice-6f3a691d9fa9b118bcc7dad907cece01d12ced3f.zip
empty prefix is now permissible
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/PropertiesI.cpp9
-rw-r--r--cpp/src/Ice/PropertiesI.h1
2 files changed, 8 insertions, 2 deletions
diff --git a/cpp/src/Ice/PropertiesI.cpp b/cpp/src/Ice/PropertiesI.cpp
index f6e70233ce9..44874bc6623 100644
--- a/cpp/src/Ice/PropertiesI.cpp
+++ b/cpp/src/Ice/PropertiesI.cpp
@@ -116,12 +116,19 @@ Ice::PropertiesI::getCommandLineOptions()
StringSeq
Ice::PropertiesI::parseCommandLineOptions(const string& prefix, const StringSeq& options)
{
+ string pfx = prefix;
+ if(!pfx.empty() && pfx[pfx.size() - 1] != '.')
+ {
+ pfx += '.';
+ }
+ pfx = "--" + pfx;
+
StringSeq result;
StringSeq::size_type i;
for(i = 0; i < options.size(); i++)
{
string opt = options[i];
- if(opt.find("--" + prefix + ".") == 0)
+ if(opt.find(pfx) == 0)
{
if(opt.find('=') == string::npos)
{
diff --git a/cpp/src/Ice/PropertiesI.h b/cpp/src/Ice/PropertiesI.h
index 6bcce73a0a3..18d39db9878 100644
--- a/cpp/src/Ice/PropertiesI.h
+++ b/cpp/src/Ice/PropertiesI.h
@@ -13,7 +13,6 @@
#include <IceUtil/Mutex.h>
#include <Ice/Properties.h>
-#include <set>
namespace Ice
{