general comment: minor modifications to compile with g++. Almost all

insertions of "typename" keyword and new line at the end of file
This commit is contained in:
ganovelli 2004-05-11 14:12:13 +00:00
parent a05cc7fc6e
commit 2f4f632fc7
1 changed files with 8 additions and 6 deletions

View File

@ -24,6 +24,9 @@
History History
$Log: not supported by cvs2svn $ $Log: not supported by cvs2svn $
Revision 1.6 2004/05/10 13:24:21 cignoni
Updated names of adj functions and added ending newline
Revision 1.5 2004/04/21 14:06:10 ganovelli Revision 1.5 2004/04/21 14:06:10 ganovelli
#ifndef added #ifndef added
@ -107,7 +110,7 @@ static VertexIterator AddVertices(MeshType &m,int n, PointerUpdater<VertexPointe
for(int i=0; i<n; ++i) for(int i=0; i<n; ++i)
{ {
m.vert.push_back(MeshType::VertexType()); m.vert.push_back(typename MeshType::VertexType());
m.vert.back().ClearFlags(); m.vert.back().ClearFlags();
} }
@ -127,7 +130,7 @@ static VertexIterator AddVertices(MeshType &m,int n, PointerUpdater<VertexPointe
// e poiche' lo spazio e' cambiato si ricalcola anche last da zero // e poiche' lo spazio e' cambiato si ricalcola anche last da zero
unsigned int siz=m.vert.size()-n; unsigned int siz=m.vert.size()-n;
if(last!=0) if(last!=(VertexIterator)0)
{ {
last = m.vert.begin(); last = m.vert.begin();
advance(last,siz); advance(last,siz);
@ -157,18 +160,17 @@ static FaceIterator AddFaces(MeshType &m, int n)
*/ */
static FaceIterator AddFaces(MeshType &m, int n, PointerUpdater<FacePointer> &pu) static FaceIterator AddFaces(MeshType &m, int n, PointerUpdater<FacePointer> &pu)
{ {
FaceIterator last=0; FaceIterator last = (FaceIterator)0;
pu.Clear(); pu.Clear();
if(m.face.empty()) { if(m.face.empty()) {
pu.oldBase=0; // if the vector is empty we cannot find the last valid element pu.oldBase=0; // if the vector is empty we cannot find the last valid element
last=0;
} else { } else {
pu.oldBase=&*m.face.begin(); pu.oldBase=&*m.face.begin();
last=m.face.end(); last=m.face.end();
} }
for(int i=0; i<n; ++i) for(int i=0; i<n; ++i)
{ {
m.face.push_back(MeshType::FaceType()); m.face.push_back(typename MeshType::FaceType());
m.face.back().ClearFlags(); m.face.back().ClearFlags();
} }
@ -198,7 +200,7 @@ static FaceIterator AddFaces(MeshType &m, int n, PointerUpdater<FacePointer> &pu
} }
// e poiche' lo spazio e' cambiato si ricalcola anche last da zero // e poiche' lo spazio e' cambiato si ricalcola anche last da zero
unsigned int siz=m.face.size()-n; unsigned int siz=m.face.size()-n;
if(last!=0) if(last!=(FaceIterator)0)
{ {
last = m.face.begin(); last = m.face.begin();
advance(last,siz); advance(last,siz);