fix for getline usage with newer compilers

This commit is contained in:
john30
2016-05-21 10:03:25 +02:00
parent 13cf5b2d23
commit 6e998909cf
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -238,7 +238,7 @@ public:
ostringstream field;
char prev = FIELD_SEPARATOR;
bool empty = true, read = false;
while (getline(ifs, line) != 0) {
while (getline(ifs, line)) {
read = true;
lineNo++;
trim(line);
+1 -1
View File
@@ -408,7 +408,7 @@ int main()
string item;
vector<string> entries;
while (getline(isstr, item, FIELD_SEPARATOR) != 0)
while (getline(isstr, item, FIELD_SEPARATOR))
entries.push_back(item);
if (fields != NULL) {
+2 -2
View File
@@ -145,7 +145,7 @@ int main()
size_t pos = 0;
string token;
istringstream stream(check[2]);
while (getline(stream, token, VALUE_SEPARATOR) != 0) {
while (getline(stream, token, VALUE_SEPARATOR)) {
if (pos >= mstrs.size())
mstrs.resize(pos+1);
else if (mstrs[pos]!=NULL)
@@ -161,7 +161,7 @@ int main()
pos = 0;
stream.str(check[3]);
stream.clear();
while (getline(stream, token, VALUE_SEPARATOR) != 0) {
while (getline(stream, token, VALUE_SEPARATOR)) {
if (pos >= sstrs.size())
sstrs.resize(pos+1);
else if (sstrs[pos]!=NULL)