From b04369cc6b78c5f1ccf42b9e36a57f0065931b35 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 11 Dec 2018 14:55:00 +0100 Subject: [PATCH] Don't assert OFF type --- Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h index b5099136f3e..947c0c8aeae 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h @@ -2095,8 +2095,14 @@ private: //------------------------------------------------------- private data std::string off; is >> sm_skip_comments; is >> off; - CGAL_assertion( (off == "OFF") || (off == "COFF") || (off == "NOFF") || (off == "CNOFF")); - + if(! ( + (off == "OFF") || (off == "COFF") || (off == "NOFF") || (off == "CNOFF") + ) + ) + { + is.setstate(std::ios::failbit); + return false; + } is >> n >> f >> e; if(!is){ return false;