fix for getline usage with newer compilers
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user