summaryrefslogtreecommitdiff
path: root/src/configreader.cpp
diff options
context:
space:
mode:
authorNaram Qashat <cyberbotx@cyberbotx.com>2010-06-20 18:42:58 -0400
committerNaram Qashat <cyberbotx@cyberbotx.com>2010-06-20 18:42:58 -0400
commit381c9c8870fad4c544f29deec22ba4be3549a731 (patch)
treef5f26e2dd380910b0ddd26e3d885d6bf56d40181 /src/configreader.cpp
parent2528dc80bd1b3e6b2c09db23eb51659e30128110 (diff)
The first of a few "CBX OCDing over code style" commits, focusing on include/* and src/* but not src/core/* or src/modules/*.
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 906e3df7f..fc9a7cb28 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -33,12 +33,12 @@ ConfigReader::ConfigReader(const std::string &filename) : data(new ConfigDataHas
std::string ConfigReader::ReadValue(const std::string &tag, const std::string &name, const std::string &default_value, int index, bool allow_linefeeds)
{
/* Don't need to strlcpy() tag and name anymore, ReadConf() takes const char* */
- std::string result;
+ ci::string result;
- if (!Config.ConfValue(*this->data, tag, name, default_value, index, result, allow_linefeeds))
+ if (!Config.ConfValue(*this->data, ci::string(tag.c_str()), ci::string(name.c_str()), ci::string(default_value.c_str()), index, result, allow_linefeeds))
this->error = CONF_VALUE_NOT_FOUND;
- return result;
+ return result.c_str();
}
std::string ConfigReader::ReadValue(const std::string &tag, const std::string &name, int index, bool allow_linefeeds)
@@ -48,7 +48,7 @@ std::string ConfigReader::ReadValue(const std::string &tag, const std::string &n
bool ConfigReader::ReadFlag(const std::string &tag, const std::string &name, const std::string &default_value, int index)
{
- return Config.ConfValueBool(*this->data, tag, name, default_value, index);
+ return Config.ConfValueBool(*this->data, ci::string(tag.c_str()), ci::string(name.c_str()), ci::string(default_value.c_str()), index);
}
bool ConfigReader::ReadFlag(const std::string &tag, const std::string &name, int index)
@@ -60,7 +60,7 @@ int ConfigReader::ReadInteger(const std::string &tag, const std::string &name, c
{
int result;
- if (!Config.ConfValueInteger(*this->data, tag, name, default_value, index, result))
+ if (!Config.ConfValueInteger(*this->data, ci::string(tag.c_str()), ci::string(name.c_str()), ci::string(default_value.c_str()), index, result))
{
this->error = CONF_VALUE_NOT_FOUND;
return 0;
@@ -99,7 +99,7 @@ int ConfigReader::Enumerate(const std::string &tag)
int ConfigReader::EnumerateValues(const std::string &tag, int index)
{
- return Config.ConfVarEnum(*this->data, tag, index);
+ return Config.ConfVarEnum(*this->data, ci::string(tag.c_str()), index);
}
bool ConfigReader::Verify()