From: Timo Heister Date: Mon, 24 Jun 2013 13:23:19 +0000 (+0000) Subject: better eof handling in CellId X-Git-Tag: v8.0.0~245 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4722a446e80a93c0495607f7647a4d2b24d2cf3c;p=dealii.git better eof handling in CellId git-svn-id: https://svn.dealii.org/trunk@29873 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/grid/cell_id.h b/deal.II/include/deal.II/grid/cell_id.h index 5dee60740f..16192ca3f4 100644 --- a/deal.II/include/deal.II/grid/cell_id.h +++ b/deal.II/include/deal.II/grid/cell_id.h @@ -77,7 +77,12 @@ inline std::ostream& operator<< (std::ostream& os, const CellId& cid) */ inline std::istream& operator>> (std::istream& is, CellId& cid) { - is >> cid.coarse_cell_id; + unsigned int cellid; + is >> cellid; + if (is.eof()) + return is; + + cid.coarse_cell_id = cellid; char dummy; is >> dummy; Assert(dummy=='_', ExcMessage("invalid CellId"));