summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/preproc/c_file.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/preproc/c_file.cpp b/tools/preproc/c_file.cpp
index 3a026d0d2..b550a53fa 100644
--- a/tools/preproc/c_file.cpp
+++ b/tools/preproc/c_file.cpp
@@ -34,13 +34,11 @@
CFile::CFile(std::string filename) : m_filename(filename)
{
if (filename == "-") {
- std::string s;
+ std::string s, b;
while (!std::cin.eof()) {
- std::string b;
std::getline(std::cin, b);
- b += "\n";
- s += b;
+ s += b + "\n";
}
m_size = s.size();
m_buffer = new char[m_size + 1];