Commit 46b6922f authored by Jan Möbius's avatar Jan Möbius
Browse files

Fixed cppcheck warnings

parent e2491c8b
......@@ -352,8 +352,9 @@ void SkeletonObject::updateIndices(const AnimationHandle &_hAni)
removeAdditionalNode(pTransNode, "SkeletonPlugin", nameTransformNode.c_str());
++i;
continue;
} else {
bAdditionalNodes = false;
}
bAdditionalNodes = false;
}while(bAdditionalNodes);
}
......@@ -382,24 +383,25 @@ void SkeletonObject::showIndices(bool _bVisible)
pMatNode->set_status(ACG::SceneGraph::BaseNode::HideSubtree);
// find and prune redundant nodes
unsigned int i = skeleton_->jointCount();
unsigned int jointCount = skeleton_->jointCount();
bool bAdditionalNodes = true;
do{
std::stringstream buf;
std::string nameTransformNode;
buf << "TextNode " << i << " Transform";
buf << "TextNode " << jointCount << " Transform";
nameTransformNode = buf.str();
ACG::SceneGraph::TransformNode *pTransNode;
if(getAdditionalNode(pTransNode, "SkeletonPlugin", nameTransformNode.c_str()))
{
removeAdditionalNode(pTransNode, "SkeletonPlugin", nameTransformNode.c_str());
++i;
++jointCount;
continue;
} else {
bAdditionalNodes = false;
}
bAdditionalNodes = false;
}while(bAdditionalNodes);
} while(bAdditionalNodes);
// add or update nodes
PoseT<OpenMesh::Vec3d>* ref = skeleton_->referencePose();
......@@ -543,8 +545,9 @@ void SkeletonObject::updateMotionPath(const AnimationHandle &_hAni)
removeAdditionalNode(pTransNode, "SkeletonPlugin", nameTransformNode.c_str());
++i;
continue;
} else {
bAdditionalNodes = false;
}
bAdditionalNodes = false;
}while(bAdditionalNodes);
}
......@@ -573,23 +576,24 @@ void SkeletonObject::showMotionPath(bool _visible)
pMatNode->set_status(ACG::SceneGraph::BaseNode::HideSubtree);
// find and prune redundant nodes
unsigned int i = skeleton_->jointCount();
unsigned int jointCount = skeleton_->jointCount();
bool bAdditionalNodes = true;
do{
std::stringstream buf;
std::string nameTransformNode;
buf << "LineNode " << i << " Transform";
buf << "LineNode " << jointCount << " Transform";
nameTransformNode = buf.str();
ACG::SceneGraph::TransformNode *pTransNode;
if(getAdditionalNode(pTransNode, "SkeletonPlugin", nameTransformNode.c_str()))
{
removeAdditionalNode(pTransNode, "SkeletonPlugin", nameTransformNode.c_str());
++i;
++jointCount;
continue;
} else {
bAdditionalNodes = false;
}
bAdditionalNodes = false;
}while(bAdditionalNodes);
......
......@@ -44,7 +44,7 @@
//-----------------------------------------------------------------------------
SkeletonBackup::SkeletonBackup(SkeletonObject* _skelObj, QString _name, UpdateType _type)
SkeletonBackup::SkeletonBackup(SkeletonObject* _skelObj, const QString& _name, UpdateType _type)
: BaseBackup( _skelObj, _name, _type ),
skelObj_(_skelObj)
{
......
......@@ -53,7 +53,7 @@ class SkeletonBackup : public BaseBackup
{
public:
SkeletonBackup(SkeletonObject* _skelObj, QString _name, UpdateType _type);
SkeletonBackup(SkeletonObject* _skelObj, const QString& _name, UpdateType _type);
~SkeletonBackup();
public:
......
Supports Markdown
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