aboutsummaryrefslogtreecommitdiffstats
path: root/solc
diff options
context:
space:
mode:
Diffstat (limited to 'solc')
-rw-r--r--solc/CommandLineInterface.cpp17
1 files changed, 2 insertions, 15 deletions
diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp
index b4c9fe82..fe1461b4 100644
--- a/solc/CommandLineInterface.cpp
+++ b/solc/CommandLineInterface.cpp
@@ -430,14 +430,7 @@ void CommandLineInterface::readInputFilesAndConfigureRemappings()
m_allowedDirectories.push_back(boost::filesystem::path(path).remove_filename());
}
if (addStdin)
- {
- string s;
- while (!cin.eof())
- {
- getline(cin, s);
- m_sourceCodes[g_stdinFileName].append(s + '\n');
- }
- }
+ m_sourceCodes[g_stdinFileName] = dev::readStandardInput();
}
bool CommandLineInterface::parseLibraryOption(string const& _input)
@@ -731,13 +724,7 @@ bool CommandLineInterface::processInput()
if (m_args.count(g_argStandardJSON))
{
- string input;
- while (!cin.eof())
- {
- string tmp;
- getline(cin, tmp);
- input.append(tmp + "\n");
- }
+ string input = dev::readStandardInput();
StandardCompiler compiler(fileReader);
cout << compiler.compile(input) << endl;
return true;