From bd5025785f833df3255e7000dd9a526907956a7a Mon Sep 17 00:00:00 2001 From: Gauthier Becker <gauthierbecker@gmail.com> Date: Mon, 1 Apr 2013 16:19:11 +0000 Subject: [PATCH] Add const on methods that should be const --- Geo/GModel.cpp | 4 ++-- Geo/GModel.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Geo/GModel.cpp b/Geo/GModel.cpp index 89d962b925..15f0c3ab68 100644 --- a/Geo/GModel.cpp +++ b/Geo/GModel.cpp @@ -356,7 +356,7 @@ void GModel::snapVertices() } } -void GModel::getEntities(std::vector<GEntity*> &entities) +void GModel::getEntities(std::vector<GEntity*> &entities) const { entities.clear(); entities.insert(entities.end(), vertices.begin(), vertices.end()); @@ -706,7 +706,7 @@ int GModel::getMeshStatus(bool countDiscrete) return -1; } -int GModel::getNumMeshVertices() +int GModel::getNumMeshVertices() const { std::vector<GEntity*> entities; getEntities(entities); diff --git a/Geo/GModel.h b/Geo/GModel.h index 6913e2c7d5..f39687a46b 100644 --- a/Geo/GModel.h +++ b/Geo/GModel.h @@ -280,7 +280,7 @@ class GModel void snapVertices(); // fill a vector containing all the entities in the model - void getEntities(std::vector<GEntity*> &entities); + void getEntities(std::vector<GEntity*> &entities) const; // return the highest number associated with an elementary entity of // a given dimension (or the highest overall if dim < 0) @@ -360,7 +360,7 @@ class GModel void setMeshElementIndex(MElement *e, int index); // return the total number of vertices in the mesh - int getNumMeshVertices(); + int getNumMeshVertices() const; // access a mesh vertex by tag, using the vertex cache MVertex *getMeshVertexByTag(int n); -- GitLab