Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[all] Fix warnings and strange double incrementation on iterator #364

Merged
merged 5 commits into from
Sep 1, 2017
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions SofaKernel/framework/sofa/helper/LCPcalc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -954,10 +954,8 @@ void projection(LCP &fineLevel, LCP &coarseLevel, int nbContactsCoarse, const st
/// all parameters as input
/// output=> change value of F in fineLevel

void prolongation(LCP &fineLevel, LCP &coarseLevel, const std::vector<int> &projectionTable, const std::vector<int> &projectionConstraints, std::vector<double> & projectionValues, std::vector<bool> &contact_is_projected, bool verbose)

void prolongation(LCP &fineLevel, LCP &coarseLevel, const std::vector<int> &projectionTable, const std::vector<int> &projectionConstraints, std::vector<double> & projectionValues, std::vector<bool> &contact_is_projected, bool /*verbose*/)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest using SOFA_UNUSED instead of commenting the function signature.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @damienmarchal , correct the PR I will

{

int numContactsFine = fineLevel.getDim()/3;

if (numContactsFine != (int)contact_is_projected.size() || numContactsFine != (int)projectionTable.size() )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,6 @@ void DefaultMultiMatrixAccessor::computeGlobalMatrix()
{
interactionList.push_back(it->first);
}
++it;
}


Expand Down
4 changes: 2 additions & 2 deletions applications/plugins/SofaPython/PythonMainScriptController.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class SOFA_SOFAPYTHON_API PythonMainScriptController : public ScriptController
protected:
PythonMainScriptController( const char* filename );

void handleEvent(core::objectmodel::Event *event);
void handleEvent(core::objectmodel::Event *event) override;

/// @name Script interface
/// Function that needs to be implemented for each script language
Expand All @@ -81,7 +81,7 @@ class SOFA_SOFAPYTHON_API PythonMainScriptController : public ScriptController
virtual void script_onMouseButtonLeft(const int posX,const int posY,const bool pressed) override;
virtual void script_onMouseButtonRight(const int posX,const int posY,const bool pressed) override;
virtual void script_onMouseButtonMiddle(const int posX,const int posY,const bool pressed) override;
virtual void script_onMouseWheel(const int posX,const int posY,const int delta);
virtual void script_onMouseWheel(const int posX,const int posY,const int delta) override;

/// called each frame
virtual void script_onBeginAnimationStep(const double dt) override ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ template<class DataTypes>
OglTetrahedralModel<DataTypes>::OglTetrahedralModel()
: m_topology(NULL)
, m_positions(initData(&m_positions, "position", "Vertices coordinates"))
, depthTest(initData(&depthTest, (bool)false, "depthTest", "Set Depth Test"))
, blending(initData(&blending, (bool)false, "blending", "Set Blending"))
, modified(false)
, lastMeshRev(-1)
, useTopology(false)
, depthTest(initData(&depthTest, (bool)false, "depthTest", "Set Depth Test"))
, blending(initData(&blending, (bool)false, "blending", "Set Blending"))
{
}

Expand Down
10 changes: 5 additions & 5 deletions applications/plugins/VolumetricRendering/OglVolumetricModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ int OglVolumetricModelClass = sofa::core::RegisterObject("Volumetric model for O


OglVolumetricModel::OglVolumetricModel()
: b_modified(false)
, b_useTopology(false)
, b_tboCreated(false)
: d_tetrahedra(initData(&d_tetrahedra, "tetrahedra", "Tetrahedra to draw"))
, d_hexahedra(initData(&d_hexahedra, "hexahedra", "Hexahedra to draw"))
, d_volumeScale(initData(&d_volumeScale, (float)1.0, "volumeScale", "Scale for each volumetric primitive"))
, d_depthTest(initData(&d_depthTest, (bool)false, "depthTest", "Set Depth Test"))
, d_blending(initData(&d_blending, (bool)false, "blending", "Set Blending"))
, d_defaultColor(initData(&d_defaultColor, defaulttype::Vec4f(), "defaultColor", "Color for each volume (if the attribute a_vertexColor is not detected)"))
, d_tetrahedra(initData(&d_tetrahedra, "tetrahedra", "Tetrahedra to draw"))
, d_hexahedra(initData(&d_hexahedra, "hexahedra", "Hexahedra to draw"))
, b_modified(false)
, b_useTopology(false)
, b_tboCreated(false)
{
addAlias(&d_defaultColor, "color");
}
Expand Down