[Orxonox-commit 2578] r7283 - in code/branches/consolecommands3/src/libraries/core: . command
landauf at orxonox.net
landauf at orxonox.net
Tue Aug 31 03:03:07 CEST 2010
Author: landauf
Date: 2010-08-31 03:03:06 +0200 (Tue, 31 Aug 2010)
New Revision: 7283
Modified:
code/branches/consolecommands3/src/libraries/core/ConfigFileManager.cc
code/branches/consolecommands3/src/libraries/core/command/Executor.cc
Log:
ConfigFileManager added backslashes to strings with special chars when saving them into the config file, but didn't remove them while loading. fixed this issue.
Modified: code/branches/consolecommands3/src/libraries/core/ConfigFileManager.cc
===================================================================
--- code/branches/consolecommands3/src/libraries/core/ConfigFileManager.cc 2010-08-31 00:26:53 UTC (rev 7282)
+++ code/branches/consolecommands3/src/libraries/core/ConfigFileManager.cc 2010-08-31 01:03:06 UTC (rev 7283)
@@ -276,14 +276,17 @@
std::string value, comment;
if (commentposition == std::string::npos)
{
- value = removeTrailingWhitespaces(line.substr(pos1 + 1));
+ value = line.substr(pos1 + 1);
}
else
{
- value = removeTrailingWhitespaces(line.substr(pos1 + 1, commentposition - pos1 - 1));
+ value = line.substr(pos1 + 1, commentposition - pos1 - 1);
comment = removeTrailingWhitespaces(line.substr(commentposition));
}
+ value = removeTrailingWhitespaces(value);
+ value = removeSlashes(value);
+
if (pos2 != std::string::npos && pos3 != std::string::npos && pos3 > pos2 + 1)
{
// There might be an array index
Modified: code/branches/consolecommands3/src/libraries/core/command/Executor.cc
===================================================================
--- code/branches/consolecommands3/src/libraries/core/command/Executor.cc 2010-08-31 00:26:53 UTC (rev 7282)
+++ code/branches/consolecommands3/src/libraries/core/command/Executor.cc 2010-08-31 01:03:06 UTC (rev 7283)
@@ -47,7 +47,7 @@
Executor::Executor(const Executor& other) : name_(other.name_)
{
- for (int i = 0; i < MAX_FUNCTOR_ARGUMENTS; ++i)
+ for (size_t i = 0; i < MAX_FUNCTOR_ARGUMENTS; ++i)
defaultValue_[i] = other.defaultValue_[i];
this->functor_ = other.functor_->clone();
}
More information about the Orxonox-commit
mailing list