DeveloperConsole::Consume for strings

This commit is contained in:
2015-12-29 22:54:07 +01:00
parent c5b4ea84a0
commit c0b31dc92c
+15 -11
View File
@@ -39,21 +39,25 @@ public:
};
}
static void Consume(const std::string& command)
{
if (command.empty()) {
return;
}
boost::char_separator<char> argumentSeparator(" ");
tokenizer tokens(command, argumentSeparator);
for (tokenizer::const_iterator it = tokens.begin(); it != tokens.end(); it++) {
consumeToken(it, tokens.end());
}
}
static void Consume(std::istream& stream)
{
std::string input;
std::getline(stream, input);
if (input.empty()) {
return;
}
boost::char_separator<char> argumentSeparator(" ");
tokenizer tokens(input, argumentSeparator);
for (tokenizer::const_iterator it = tokens.begin(); it != tokens.end(); it++) {
consumeToken(it, tokens.end());
}
Consume(input);
/*if (stream.peek() == '\n') {
printValue(key);