summaryrefslogtreecommitdiff
path: root/cppe/src/IceE/Properties.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cppe/src/IceE/Properties.cpp')
-rw-r--r--cppe/src/IceE/Properties.cpp29
1 files changed, 7 insertions, 22 deletions
diff --git a/cppe/src/IceE/Properties.cpp b/cppe/src/IceE/Properties.cpp
index 1a44c32b180..35800e1a107 100644
--- a/cppe/src/IceE/Properties.cpp
+++ b/cppe/src/IceE/Properties.cpp
@@ -159,7 +159,7 @@ Ice::Properties::parseCommandLineOptions(const string& prefix, const StringSeq&
opt += "=1";
}
- parseLine(opt.substr(2), 0);
+ parseLine(opt.substr(2));
}
else
{
@@ -190,7 +190,7 @@ Ice::Properties::load(const std::string& file)
char line[1024];
while(fgets(line, 1024, in) != NULL)
{
- parseLine(line, _converter);
+ parseLine(line);
}
fclose(in);
}
@@ -203,18 +203,15 @@ Ice::Properties::clone()
}
Ice::Properties::Properties(const Properties* p) :
- _properties(p->_properties),
- _converter(p->_converter)
+ _properties(p->_properties)
{
}
-Ice::Properties::Properties(const StringConverterPtr& converter) :
- _converter(converter)
+Ice::Properties::Properties()
{
}
-Ice::Properties::Properties(StringSeq& args, const PropertiesPtr& defaults, const StringConverterPtr& converter) :
- _converter(converter)
+Ice::Properties::Properties(StringSeq& args, const PropertiesPtr& defaults)
{
if(defaults != 0)
{
@@ -245,7 +242,7 @@ Ice::Properties::Properties(StringSeq& args, const PropertiesPtr& defaults, cons
{
s += "=1";
}
- parseLine(s.substr(2), 0);
+ parseLine(s.substr(2));
loadConfigFiles = true;
}
else
@@ -273,7 +270,7 @@ Ice::Properties::Properties(StringSeq& args, const PropertiesPtr& defaults, cons
}
void
-Ice::Properties::parseLine(const string& line, const StringConverterPtr& converter)
+Ice::Properties::parseLine(const string& line)
{
const string delim = " \t\r\n";
string s = line;
@@ -319,18 +316,6 @@ Ice::Properties::parseLine(const string& line, const StringConverterPtr& convert
value = s.substr(beg, end - beg);
}
- if(converter)
- {
- string tmp;
- converter->fromUTF8(reinterpret_cast<const Byte*>(key.data()),
- reinterpret_cast<const Byte*>(key.data() + key.size()), tmp);
- key.swap(tmp);
-
- converter->fromUTF8(reinterpret_cast<const Byte*>(value.data()),
- reinterpret_cast<const Byte*>(value.data() + value.size()), tmp);
- value.swap(tmp);
- }
-
setProperty(key, value);
}