Add readStandardInput helper

This commit is contained in:
Alex Beregszaszi
2017-10-18 12:56:11 +01:00
parent 7186e142b8
commit 6f2865228c
4 changed files with 20 additions and 23 deletions
+1 -8
View File
@@ -118,14 +118,7 @@ int main(int argc, char** argv)
string src;
if (infile.empty())
{
string s;
while (!cin.eof())
{
getline(cin, s);
src.append(s);
}
}
src = readStandardInput();
else
src = readFileAsString(infile);