summaryrefslogtreecommitdiff
path: root/src/main/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/main.cpp')
-rw-r--r--src/main/main.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/main/main.cpp b/src/main/main.cpp
index 595915100..4731c536e 100644
--- a/src/main/main.cpp
+++ b/src/main/main.cpp
@@ -108,15 +108,13 @@ int main(int argc, char *argv[]) {
}
// Parse and execute commands until we are done
- while(!parser->done()) {
- // Parse the next command
- Command *cmd = parser->parseNextCommand();
- if(cmd) {
- if(options.verbosity > 0)
- cout << "Invoking: " << *cmd << endl;
- cmd->invoke(&smt);
- delete cmd;
+ Command* cmd;
+ while((cmd = parser->parseNextCommand())) {
+ if(options.verbosity > 0) {
+ cout << "Invoking: " << *cmd << endl;
}
+ cmd->invoke(&smt);
+ delete cmd;
}
// Remove the parser
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback