From 34c532b8636072efde45f0c398b8d70e08729c85 Mon Sep 17 00:00:00 2001 From: heister Date: Mon, 24 Jun 2013 13:23:19 +0000 Subject: [PATCH] better eof handling in CellId git-svn-id: https://svn.dealii.org/trunk@29873 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/grid/cell_id.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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")); -- 2.39.5