From b22291889d7bfde630ea53fe102943852922b87f Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Wed, 20 Sep 2017 09:40:28 +0200 Subject: [PATCH] WB's comments part II. --- source/grid/grid_in.cc | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/source/grid/grid_in.cc b/source/grid/grid_in.cc index 9b2bbca1a9..3baac76adb 100644 --- a/source/grid/grid_in.cc +++ b/source/grid/grid_in.cc @@ -2609,18 +2609,16 @@ void GridIn::read_assimp(const std::string &filename, // ignore it if ( (dim == 2) && mesh->mPrimitiveTypes != aiPrimitiveType_POLYGON) { - std::stringstream s; - s << "Incompatible mesh " << m - << "/" << scene->mNumMeshes; - AssertThrow(ignore_unsupported_types, ExcMessage(s.str())); + AssertThrow(ignore_unsupported_types, + ExcMessage("Incompatible mesh " + std::to_string(m) + + "/" + std::to_string(scene->mNumMeshes))); continue; } else if ( (dim == 1) && mesh->mPrimitiveTypes != aiPrimitiveType_LINE) { - std::stringstream s; - s << "Incompatible mesh " << m - << "/" << scene->mNumMeshes; - AssertThrow(ignore_unsupported_types, ExcMessage(s.str())); + AssertThrow(ignore_unsupported_types, + ExcMessage("Incompatible mesh " + std::to_string(m) + + "/" + std::to_string(scene->mNumMeshes))); continue; } // Vertices @@ -2652,12 +2650,12 @@ void GridIn::read_assimp(const std::string &filename, } else { - std::stringstream s; - s << "Face " << i << " of mesh " - << m << " has " << mFaces[i].mNumIndices - << " vertices. We expected only " - << GeometryInfo::vertices_per_cell; - AssertThrow(ignore_unsupported_types, ExcMessage(s.str())); + AssertThrow(ignore_unsupported_types, + ExcMessage("Face " + std::to_string(i) + " of mesh " + + std::to_string(m) + " has " + + std::to_string(mFaces[i].mNumIndices) + + " vertices. We expected only " + + std::to_string(GeometryInfo::vertices_per_cell))); } } cells.resize(valid_cell); -- 2.39.5