mirror of https://github.com/CGAL/cgal
Fix some I/O returns
This commit is contained in:
parent
87e85c2634
commit
97eddd9135
|
|
@ -107,7 +107,7 @@ public:
|
|||
std::getline(input, s);
|
||||
}
|
||||
|
||||
return true;
|
||||
return !input.fail();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -143,7 +143,7 @@ bool read_GOCAD(std::istream& in,
|
|||
name = builder.name;
|
||||
color = builder.color;
|
||||
|
||||
return g.is_valid(); // @fixme keep validity check?
|
||||
return is_valid(g); // @fixme keep validity check?
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ bool read_OBJ(std::istream& input,
|
|||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return !input.fail();
|
||||
}
|
||||
|
||||
} // namespace CGAL
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ bool read_OFF(std::istream& in,
|
|||
scanner.skip_to_next_vertex(i);
|
||||
}
|
||||
|
||||
if(!in)
|
||||
if(!in.good())
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -77,7 +77,7 @@ bool read_OFF(std::istream& in,
|
|||
std::size_t no;
|
||||
scanner.scan_facet(no, i);
|
||||
|
||||
if(!in)
|
||||
if(!in.good())
|
||||
return false;
|
||||
|
||||
IO::internal::resize(polygons[i], no);
|
||||
|
|
@ -114,7 +114,7 @@ bool read_OFF(std::istream& in,
|
|||
}
|
||||
}
|
||||
|
||||
return in.good();
|
||||
return !in.fail();
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
@ -163,7 +163,7 @@ bool read_OFF(std::istream& in,
|
|||
}
|
||||
}
|
||||
|
||||
return in.good();
|
||||
return !in.fail();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ bool parse_ASCII_STL(std::istream& input,
|
|||
std::cout << "Parsing ASCII file..." << std::endl;
|
||||
|
||||
if(!input.good())
|
||||
return true;
|
||||
return false;
|
||||
|
||||
// Here, we have already read the word 'solid'
|
||||
|
||||
|
|
@ -158,7 +158,7 @@ bool parse_ASCII_STL(std::istream& input,
|
|||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return !input.fail();
|
||||
}
|
||||
|
||||
template <class PointRange, class TriangleRange>
|
||||
|
|
@ -178,7 +178,7 @@ bool parse_binary_STL(std::istream& input,
|
|||
input.seekg(0, std::ios::beg);
|
||||
|
||||
if(!input.good())
|
||||
return true;
|
||||
return false;
|
||||
|
||||
// Discard the first 80 chars (unused header)
|
||||
int pos = 0;
|
||||
|
|
@ -281,7 +281,7 @@ bool parse_binary_STL(std::istream& input,
|
|||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
return !input.fail();
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
|
|
|
|||
Loading…
Reference in New Issue