Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: shell/src/Main.cpp

Issue 5163715573841920: Issue 768 - Switch from TR1 to C++11 (Closed)
Patch Set: Created July 11, 2014, 2:24 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: shell/src/Main.cpp
===================================================================
--- a/shell/src/Main.cpp
+++ b/shell/src/Main.cpp
@@ -31,17 +31,17 @@ namespace
void Add(CommandMap& commands, Command* command)
{
commands[command->name] = command;
}
bool ReadCommandLine(std::string& commandLine)
{
std::cout << "> ";
- const bool success = std::getline(std::cin, commandLine);
+ const bool success = std::getline(std::cin, commandLine).good();
if (!success)
std::cout << std::endl;
return success;
}
void ParseCommandLine(const std::string& commandLine, std::string& name,
std::string& arguments)
{

Powered by Google App Engine
This is Rietveld