Preserve original newlines in solidity::util::readUntilEnd()

This commit is contained in:
TerranCivilian
2021-10-05 20:24:24 +02:00
committed by Kamil Śliwak
parent 967b282159
commit 020ecc2131
4 changed files with 30 additions and 12 deletions
+3 -10
View File
@@ -74,16 +74,9 @@ string solidity::util::readFileAsString(boost::filesystem::path const& _file)
string solidity::util::readUntilEnd(istream& _stdin)
{
string ret;
while (!_stdin.eof())
{
string tmp;
// NOTE: this will read until EOF or NL
getline(_stdin, tmp);
ret.append(tmp);
ret.append("\n");
}
return ret;
ostringstream ss;
ss << _stdin.rdbuf();
return ss.str();
}
#if defined(_WIN32)