mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Preserve original newlines in solidity::util::readUntilEnd()
This commit is contained in:
committed by
Kamil Śliwak
parent
967b282159
commit
020ecc2131
+3
-10
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user