Append new lines to the lineinput string instead of doing concatenation in filefuncs.cpp
This commit is contained in:
parent
f227182713
commit
54aa4105b8
|
@ -8,7 +8,7 @@ string getFileContent(const string& file)
|
|||
string lineinput, fullinput;
|
||||
fileStream.open(file, ios::in);
|
||||
if (fileStream.is_open()) while (getline(fileStream, lineinput)) {
|
||||
fullinput.append(lineinput + "\n");
|
||||
fullinput.append(lineinput += '\n');
|
||||
} else throw Yerbacon::Exception("Could not open \"" + file + "\".");
|
||||
fileStream.close();
|
||||
return fullinput;
|
||||
|
|
Loading…
Reference in New Issue