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; ostringstream field;
char prev = FIELD_SEPARATOR; char prev = FIELD_SEPARATOR;
bool empty = true, read = false; bool empty = true, read = false;
while (getline(ifs, line) != 0) { while (getline(ifs, line)) {
read = true; read = true;
lineNo++; lineNo++;
trim(line); trim(line);
+1 -1
View File
@@ -408,7 +408,7 @@ int main()
string item; string item;
vector<string> entries; vector<string> entries;
while (getline(isstr, item, FIELD_SEPARATOR) != 0) while (getline(isstr, item, FIELD_SEPARATOR))
entries.push_back(item); entries.push_back(item);
if (fields != NULL) { if (fields != NULL) {
+2 -2
View File
@@ -145,7 +145,7 @@ int main()
size_t pos = 0; size_t pos = 0;
string token; string token;
istringstream stream(check[2]); istringstream stream(check[2]);
while (getline(stream, token, VALUE_SEPARATOR) != 0) { while (getline(stream, token, VALUE_SEPARATOR)) {
if (pos >= mstrs.size()) if (pos >= mstrs.size())
mstrs.resize(pos+1); mstrs.resize(pos+1);
else if (mstrs[pos]!=NULL) else if (mstrs[pos]!=NULL)
@@ -161,7 +161,7 @@ int main()
pos = 0; pos = 0;
stream.str(check[3]); stream.str(check[3]);
stream.clear(); stream.clear();
while (getline(stream, token, VALUE_SEPARATOR) != 0) { while (getline(stream, token, VALUE_SEPARATOR)) {
if (pos >= sstrs.size()) if (pos >= sstrs.size())
sstrs.resize(pos+1); sstrs.resize(pos+1);
else if (sstrs[pos]!=NULL) else if (sstrs[pos]!=NULL)