Skip to content

Commit

Permalink
fix for getline usage with newer compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
john30 committed May 21, 2016
1 parent 13cf5b2 commit 6e99890
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/lib/ebus/filereader.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ class FileReader
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);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/ebus/test/test_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/lib/ebus/test/test_message.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 6e99890

Please sign in to comment.