Commit 50b8a1f9 authored by Simon Boyé's avatar Simon Boyé

Vitelotte: Removed a big bunch of warnings.

parent c11c70aa
......@@ -8,8 +8,8 @@ namespace Vitelotte
template < class _Mesh, class _ElementBuilder >
FemSolver<_Mesh, _ElementBuilder>::FemSolver(Mesh* _mesh, const ElementBuilder& elementBuilder)
: m_mesh(_mesh),
m_solved(false),
m_elementBuilder(elementBuilder)
m_elementBuilder(elementBuilder),
m_solved(false)
{
}
......
......@@ -14,7 +14,7 @@ FVElementBuilder<_Mesh, _Scalar>::FVElementBuilder(Scalar sigma)
template < class _Mesh, typename _Scalar >
unsigned
FVElementBuilder<_Mesh, _Scalar>::
nCoefficients(const Mesh& mesh, Face element) const
nCoefficients(const Mesh& /*mesh*/, Face /*element*/) const
{
return 81;
}
......@@ -32,9 +32,9 @@ FVElementBuilder<_Mesh, _Scalar>::
return;
}
typename Mesh::HalfedgeAroundFaceCirculator hit = mesh.halfedges(element);
// TODO: remove some code duplication by moving stuff here
// typename Mesh::HalfedgeAroundFaceCirculator hit = mesh.halfedges(element);
// bool flat = false;
// for(int i = 0; i < 3; ++i)
// {
......@@ -293,7 +293,7 @@ template < class _Mesh, typename _Scalar >
typename FVElementBuilder<_Mesh, _Scalar>::Vector3
FVElementBuilder<_Mesh, _Scalar>::funcVertexBasis(
const int _i1, int _deriv, const Vector3& _a, const Vector3& _b,
const Vector3& _c, const Vector3& _d, const Vector3& _l,
const Vector3& _c, const Vector3& _d, const Vector3& /*_l*/,
const Scalar _area) const
{
const size_t i2 = (_i1+1)%3;
......@@ -325,7 +325,7 @@ template < class _Mesh, typename _Scalar >
typename FVElementBuilder<_Mesh, _Scalar>::Vector3
FVElementBuilder<_Mesh, _Scalar>::funcMidpointBasis(
const int _i1, int _deriv, const Vector3& _a, const Vector3& _b,
const Vector3& _c, const Vector3& _d, const Vector3& _l,
const Vector3& _c, const Vector3& /*_d*/, const Vector3& /*_l*/,
const Scalar _area) const
{
const size_t i2 = (_i1+1)%3;
......@@ -353,7 +353,7 @@ template < class _Mesh, typename _Scalar >
typename FVElementBuilder<_Mesh, _Scalar>::Vector3
FVElementBuilder<_Mesh, _Scalar>::funcMidpointDerivBasis(
const int _i1, int _deriv, const Vector3& _a, const Vector3& _b,
const Vector3& _c, const Vector3& _d, const Vector3& _l,
const Vector3& _c, const Vector3& /*_d*/, const Vector3& _l,
const Scalar _area) const
{
const Vector3& d1 = (_deriv & Deriv_0_Y) ? _c : _b;
......
......@@ -13,7 +13,7 @@ LinearElementBuilder<_Mesh, _Scalar>::LinearElementBuilder()
template < class _Mesh, typename _Scalar >
unsigned
LinearElementBuilder<_Mesh, _Scalar>::
nCoefficients(const Mesh& mesh, Face element) const
nCoefficients(const Mesh& /*mesh*/, Face /*element*/) const
{
return 9;
}
......
......@@ -16,7 +16,7 @@ MorleyElementBuilder<_Mesh, _Scalar>::MorleyElementBuilder(Scalar sigma)
template < class _Mesh, typename _Scalar >
unsigned
MorleyElementBuilder<_Mesh, _Scalar>::
nCoefficients(const Mesh& mesh, Face element) const
nCoefficients(const Mesh& /*mesh*/, Face /*element*/) const
{
return 36;
}
......
......@@ -57,7 +57,7 @@ QuadraticElementBuilder<_Mesh, _Scalar>::QuadraticElementBuilder()
template < class _Mesh, typename _Scalar >
unsigned
QuadraticElementBuilder<_Mesh, _Scalar>::
nCoefficients(const Mesh& mesh, Face element) const
nCoefficients(const Mesh& /*mesh*/, Face /*element*/) const
{
return 36;
}
......
......@@ -17,8 +17,10 @@ bool
MVGReader<_Mesh>::read(std::istream& in, Mesh& mesh)
{
m_mesh = &mesh;
doRead(in);
bool r = doRead(in);
m_mesh = 0;
return r;
}
......
// Generated by shader2cpp.
// 2015-01-09T13:54:33.104329
// 2015-01-09T14:26:21.853483
#ifndef PATATE_VITELOTTE_UTILS_SHADER_H
......@@ -482,4 +482,4 @@ static const char* vert_common_glsl =
}
}
#endif PATATE_VITELOTTE_UTILS_SHADER_H
#endif
......@@ -6,10 +6,10 @@ namespace Vitelotte
VGMeshRendererGL2DefaultShader::VGMeshRendererGL2DefaultShader()
: m_viewMatrix(Eigen::Matrix4f::Identity()),
m_singularTriangles(false),
: m_nodesTextureSizeLoc(0),
m_viewMatrix(Eigen::Matrix4f::Identity()),
m_nodes(0),
m_nodesTextureSizeLoc(0)
m_singularTriangles(false)
{
}
......@@ -213,7 +213,7 @@ inline void VGMeshGL2Renderer<_Mesh>::updateMesh()
// Compute number of singular and normal triangles
m_nSingulars = m_pMesh->nSingularFaces();
m_nTriangles = m_pMesh->nFaces() - m_nSingulars;
int nNodes = m_nTriangles * 6 + m_nSingulars * 7;
//int nNodes = m_nTriangles * 6 + m_nSingulars * 7;
m_nodeTextureSize = 4;
int nTriRows = 0;
int nSingRows = 0;
......
......@@ -7,9 +7,9 @@ namespace Vitelotte
VGMeshRendererDefaultShader::VGMeshRendererDefaultShader()
: m_viewMatrix(Eigen::Matrix4f::Identity()),
m_singularTriangles(false),
m_nodes(0),
m_baseNodeIndex(0)
m_baseNodeIndex(0),
m_singularTriangles(false)
{
}
......@@ -85,7 +85,7 @@ VGMeshRendererDefaultShader::useShader(TriangleType triangleType)
inline
void
VGMeshRendererDefaultShader::
setNodesTexture(TriangleType triangleType, int texUnit, int baseOffset)
setNodesTexture(TriangleType /*triangleType*/, int texUnit, int baseOffset)
{
m_nodes = texUnit;
m_baseNodeIndex = baseOffset;
......
......@@ -5,7 +5,7 @@ namespace PatateCommon
{
bool defaultErrorCallback(const std::string& msg, void* ptr)
bool defaultErrorCallback(const std::string& msg, void* /*ptr*/)
{
std::cout << "Mvg parse error: " << msg << "\n";
return true;
......@@ -119,8 +119,10 @@ bool
OBJReader<_Mesh>::read(std::istream& in, Mesh& mesh)
{
m_mesh = &mesh;
doRead(in);
bool r = doRead(in);
m_mesh = 0;
return r;
}
......
......@@ -61,6 +61,6 @@ if namespaces:
print(file=out)
if options.include_guard:
print("#endif", options.include_guard, file=out)
print("#endif", file=out)
out.close()
......@@ -52,7 +52,6 @@ OrthographicCamera::cameraToNormalized(const Eigen::Vector2f& camera) const
void OrthographicCamera::changeAspectRatio(float ratio)
{
Eigen::Vector2f sizes = m_viewBox.sizes().head<2>();
float prev = sizes(0) / sizes(1);
float sum = sizes(0) + sizes(1);
float h = sum / (1+ratio);
......
......@@ -141,8 +141,6 @@ void VGNodeRenderer::update(const Mesh& mesh, float zoom)
{
clear();
float offset = m_nodeOffset / zoom;
for(Mesh::EdgeIterator eit = mesh.edgesBegin();
eit != mesh.edgesEnd(); ++eit)
{
......
......@@ -20,7 +20,7 @@ ValueEditor::~ValueEditor()
}
void ValueEditor::resizeEvent(QResizeEvent* event)
void ValueEditor::resizeEvent(QResizeEvent* /*event*/)
{
updateSelection();
}
......@@ -465,7 +465,7 @@ void ValueEditor::select(const Eigen::Vector2f& pos)
update();
}
if(!m_selection.h.isValid());
if(!m_selection.h.isValid())
{
int h = selectGradientHandle(pos);
if(h != m_selectedGradientHandle)
......@@ -526,8 +526,6 @@ int ValueEditor::selectGradientHandle(const Eigen::Vector2f& pos) const
void ValueEditor::drawVertex(QPainter& p)
{
Mesh& m = m_document->mesh();
Eigen::Vector2f center(width() / 2, height() / 2);
for(EdgeList::iterator deit = m_edges.begin();
......@@ -710,7 +708,7 @@ void ValueEditor::drawGradientNode(QPainter& p, const Eigen::Vector2f& pos,
Mesh::Node n = m_document->meshNode(h, Document::EdgeGradientNode);
if(n.isValid() && m_document->mesh().isConstraint(n))
{
Eigen::Vector4f value = nodeValue(n);
//Eigen::Vector4f value = nodeValue(n);
for(int i = 0; i < 4; ++i)
{
QColor color = QColor::fromRgbF(i == 0, i == 1, i == 2);
......
......@@ -298,7 +298,7 @@ public:
}
void keyReleaseEvent(const SDL_KeyboardEvent& event)
void keyReleaseEvent(const SDL_KeyboardEvent& /*event*/)
{
}
......
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