1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-09-18 16:32:32 +02:00

Removed whitespace from lines for the LoaderIPL

This commit is contained in:
Timmy Sjöstedt 2013-06-30 23:55:38 +02:00
parent a2b06209bb
commit f510a274a0

View File

@ -3,6 +3,7 @@
#include <fstream> #include <fstream>
#include <string> #include <string>
#include <sstream> #include <sstream>
#include <algorithm>
enum SectionTypes enum SectionTypes
{ {
@ -26,6 +27,7 @@ bool LoaderIPL::load(const std::string& filename)
{ {
std::string line; std::string line;
getline(str, line); getline(str, line);
line.erase(std::find_if(line.rbegin(), line.rend(), std::not1(std::ptr_fun<int, int>(std::isspace))).base(), line.end());
if(!line.empty() && line[0] == '#') if(!line.empty() && line[0] == '#')
{ {