Commit b6114761 authored by Sylvain Thery's avatar Sylvain Thery

Replace the next(d) of map by d = next(d) : better functional syntax

parent f29d13fe
......@@ -91,7 +91,7 @@ public:
virtual Dart end() ;
virtual void next(Dart& d) ;
virtual Dart next(Dart& d) ;
virtual bool foreach_dart_of_vertex(Dart d, FunctorType& f, unsigned int thread = 0) ;
......
......@@ -152,12 +152,13 @@ inline Dart ImplicitHierarchicalMap::end()
return Map2::end() ;
}
inline void ImplicitHierarchicalMap::next(Dart& d)
inline Dart ImplicitHierarchicalMap::next(Dart& d)
{
do
{
Map2::next(d) ;
} while(d != Map2::end() && m_dartLevel[d] > m_curLevel) ;
return d;
}
inline bool ImplicitHierarchicalMap::foreach_dart_of_vertex(Dart d, FunctorType& f, unsigned int thread)
......
......@@ -354,7 +354,7 @@ public:
virtual Dart end() ;
virtual void next(Dart& d) ;
virtual Dart next(Dart& d) ;
virtual bool foreach_dart_of_vertex(Dart d, FunctorType& f, unsigned int thread = 0) ;
......
......@@ -213,12 +213,13 @@ inline Dart ImplicitHierarchicalMap3::end()
return Map3::end() ;
}
inline void ImplicitHierarchicalMap3::next(Dart& d)
inline Dart ImplicitHierarchicalMap3::next(Dart& d)
{
do
{
Map3::next(d) ;
} while(d != Map3::end() && m_dartLevel[d] > m_curLevel) ;
return d;
}
inline bool ImplicitHierarchicalMap3::foreach_dart_of_vertex(Dart d, FunctorType& f, unsigned int thread)
......
......@@ -47,7 +47,8 @@ namespace GL2
{
/**
* Class that allors
* Class that update VBO to allow the rendering of per face color rendering
* Warning: do not use same position & color VBO than with pervertex rendering !
*/
class ColorPerFaceRender
{
......
......@@ -41,13 +41,9 @@ namespace GL2
{
//inline ColorPerFaceRender::ColorPerFaceRender(Utils::VBO& vboPosition, Utils::VBO& vboColor):
// m_vboPos(vboPosition), m_vboColors(vboColor), m_nbTris(0)
//{
//}
inline ColorPerFaceRender::ColorPerFaceRender():
m_nbTris(0)
m_nbTris(0)
{
}
......
......@@ -55,7 +55,7 @@ class MapBrowser
public:
virtual Dart begin() = 0;
virtual Dart end() = 0;
virtual void next(Dart& d) = 0;
virtual Dart next(Dart& d) = 0;
};
class AttributeHandlerGen ;
......@@ -540,7 +540,7 @@ public:
* in the order of storage
* @param d reference to the dart to be modified
*/
void next(Dart& d) ;
Dart next(Dart& d) ;
/**
* Apply a functor on each dart of the map
......
......@@ -360,7 +360,7 @@ inline Dart GenericMap::end()
return Dart::create(m_attribs[DART].end()) ;
}
inline void GenericMap::next(Dart& d)
inline Dart GenericMap::next(Dart& d)
{
if (m_isMultiRes)
{
......@@ -371,6 +371,7 @@ inline void GenericMap::next(Dart& d)
}
else
m_attribs[DART].next(d.index) ;
return d;
}
/****************************************
......
......@@ -57,7 +57,7 @@ Dart TraversorCell<MAP>::begin()
current = m.begin() ;
while(current != m.end() && (m.isBoundaryMarked(current) || !m_good(current)))
m.next(current) ;
current = m.next(current) ;
if(current == m.end())
current = NIL ;
......@@ -92,7 +92,7 @@ Dart TraversorCell<MAP>::next()
while(current != NIL && (ismarked || m.isBoundaryMarked(current) || !m_good(current)))
{
m.next(current) ;
current = m.next(current) ;
if(current == m.end())
current = NIL ;
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment