Commit f40c34b7 authored by Simon Boyé's avatar Simon Boyé

Vitelotte: More refactoring + removed some warnings triggered in release mode.

parent df463b56
......@@ -145,7 +145,7 @@ VGMesh<_Scalar, _Dim, _Chan>::
case EDGE_GRADIENT:
return attr;
}
assert(false);
abort();
}
......@@ -185,7 +185,7 @@ VGMesh<_Scalar, _Dim, _Chan>::
assert(hasEdgeGradient());
return edgeGradientNode(h);
}
assert(false);
abort();
}
......
......@@ -32,8 +32,8 @@ public:
enum Version
{
Version1_0 = 0x100,
LastestVersion = Version1_0
VERSION_1_0 = 0x100,
LATEST_VERSION = VERSION_1_0
};
......@@ -42,7 +42,7 @@ public:
/**
* \brief Constructor
*/
inline MVGWriter(Version version=LastestVersion)
inline MVGWriter(Version version=LATEST_VERSION)
: m_version(version) {}
/**
......@@ -64,11 +64,11 @@ protected:
template < typename Mesh >
void writeMvg(std::ostream& out, const Mesh& mesh,
typename MVGWriter<Mesh>::Version version=MVGWriter<Mesh>::LastestVersion);
typename MVGWriter<Mesh>::Version version=MVGWriter<Mesh>::LATEST_VERSION);
template < typename Mesh >
void writeMvgToFile(const std::string& filename, const Mesh& mesh,
typename MVGWriter<Mesh>::Version version=MVGWriter<Mesh>::LastestVersion);
typename MVGWriter<Mesh>::Version version=MVGWriter<Mesh>::LATEST_VERSION);
} // namespace Vitelotte
......
......@@ -18,7 +18,7 @@ MVGWriter<_Mesh>::write(std::ostream& _out, const Mesh& mesh) const
typedef typename Mesh::HalfedgeAroundFaceCirculator
HalfedgeAroundFaceCirculator;
assert(m_version == Version1_0);
assert(m_version == VERSION_1_0);
// Ensure that the stream we read encode numbers using the C locale
_out.imbue(std::locale::classic());
......
......@@ -232,7 +232,7 @@ Document::Mesh& Document::getMesh(MeshType type)
case SOLVED_MESH:
return m_solvedMesh;
}
assert(false);
abort();
}
......@@ -290,9 +290,8 @@ void Document::splitNode(Mesh::Halfedge h, Mesh::HalfedgeAttribute nid)
Mesh::Halfedge oh = m_mesh.oppositeHalfedge(h);
Mesh::HalfedgeAttribute onid = m_mesh.oppositeAttribute(nid);
Mesh::Node on = m_mesh.halfedgeNode(oh, onid);
assert(n == on);
assert(n == m_mesh.halfedgeNode(oh, onid));
if(!n.isValid())
return;
......@@ -310,9 +309,8 @@ void Document::mergeNode(Mesh::Halfedge h, Mesh::HalfedgeAttribute nid)
Mesh::Halfedge oh = m_mesh.oppositeHalfedge(h);
Mesh::HalfedgeAttribute onid = m_mesh.oppositeAttribute(nid);
Mesh::Node on = m_mesh.halfedgeNode(oh, onid);
assert(n != on);
assert(n != m_mesh.halfedgeNode(oh, onid));
undoStack()->push(new SetNode(this, oh, onid, n));
}
......
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