Commit 8db5e15a authored by Jan Möbius's avatar Jan Möbius

Avoid some warnings

parent 57eed126
......@@ -71,7 +71,7 @@ Properties::~Properties()
void Properties::clean_properties()
{
for(vector<BaseProperty*>::iterator it = properties_.begin(); it != properties_.end(); ++it)
if((*it) != 0)
if((*it) != nullptr)
(*it)->clear();
size_ = 0;
}
......@@ -85,7 +85,7 @@ void Properties::clean_properties()
void Properties::clear_properties()
{
for(vector<BaseProperty*>::iterator it = properties_.begin(); it != properties_.end(); ++it)
if((*it) != 0)
if((*it) != nullptr)
delete *it;
properties_.clear();
property_names_.clear();
......@@ -107,7 +107,7 @@ void Properties::insert_property_at(int _index)
size_ += 1;
for(vector<BaseProperty*>::iterator it = properties_.begin(); it != properties_.end(); ++it)
if(*it != 0)
if(*it != nullptr)
(*it)->insert_at(_index);
}
......@@ -124,7 +124,7 @@ void Properties::remove_property_at(int _index)
size_ -= 1;
for(vector<BaseProperty*>::iterator it = properties_.begin(); it != properties_.end(); ++it)
if(*it != 0)
if(*it != nullptr)
(*it)->remove_at(_index);
}
......
......@@ -78,7 +78,7 @@ class SkeletonNodeT : public BaseNode
{
public:
// static name of this class
ACG_CLASSNAME(SkeletonNodeT);
ACG_CLASSNAME(SkeletonNodeT)
typedef typename SkeletonType::Point Point;
typedef JointT<typename SkeletonType::Point> Joint;
......@@ -88,7 +88,7 @@ public:
public:
/// Constructor
SkeletonNodeT(SkeletonType &_skeleton, BaseNode *_parent=0, std::string _name="<SkeletonNode>");
SkeletonNodeT(SkeletonType &_skeleton, BaseNode *_parent=nullptr, std::string _name="<SkeletonNode>");
/// Destructor
~SkeletonNodeT();
......
......@@ -933,9 +933,7 @@ void SkeletonNodeT<SkeletonType>::getRenderObjects(IRenderer* _renderer,
// simulate glPointSize( ) with sphere
const double sphereSize = unprojectPointSize((double)_state.point_size(),
pose->globalTranslation( (*it)->id() ),
_state);
const double sphereSize = unprojectPointSize((double)_state.point_size(), pose->globalTranslation( (*it)->id() ), _state);
sphere_->addToRenderer(_renderer, &ro, sphereSize, ACG::Vec3f(pose->globalTranslation( (*it)->id() )));
}
......@@ -1035,12 +1033,12 @@ void SkeletonNodeT<SkeletonType>::getRenderObjects(IRenderer* _renderer,
{
boneInstanceDecl_ = *cone_->getVertexDecl();
boneInstanceDecl_.addElement(GL_FLOAT, 4, VERTEX_USAGE_SHADER_INPUT, (size_t)0, "inModelView0", 1, boneInstanceData_.id());
boneInstanceDecl_.addElement(GL_FLOAT, 4, VERTEX_USAGE_SHADER_INPUT, (size_t)0, "inModelView1", 1, boneInstanceData_.id());
boneInstanceDecl_.addElement(GL_FLOAT, 4, VERTEX_USAGE_SHADER_INPUT, (size_t)0, "inModelView2", 1, boneInstanceData_.id());
boneInstanceDecl_.addElement(GL_FLOAT, 3, VERTEX_USAGE_SHADER_INPUT, (size_t)0, "inModelViewIT0", 1, boneInstanceData_.id());
boneInstanceDecl_.addElement(GL_FLOAT, 3, VERTEX_USAGE_SHADER_INPUT, (size_t)0, "inModelViewIT1", 1, boneInstanceData_.id());
boneInstanceDecl_.addElement(GL_FLOAT, 3, VERTEX_USAGE_SHADER_INPUT, (size_t)0, "inModelViewIT2", 1, boneInstanceData_.id());
boneInstanceDecl_.addElement(GL_FLOAT, 4, VERTEX_USAGE_SHADER_INPUT, static_cast<size_t>(0), "inModelView0", 1, boneInstanceData_.id());
boneInstanceDecl_.addElement(GL_FLOAT, 4, VERTEX_USAGE_SHADER_INPUT, static_cast<size_t>(0), "inModelView1", 1, boneInstanceData_.id());
boneInstanceDecl_.addElement(GL_FLOAT, 4, VERTEX_USAGE_SHADER_INPUT, static_cast<size_t>(0), "inModelView2", 1, boneInstanceData_.id());
boneInstanceDecl_.addElement(GL_FLOAT, 3, VERTEX_USAGE_SHADER_INPUT, static_cast<size_t>(0), "inModelViewIT0", 1, boneInstanceData_.id());
boneInstanceDecl_.addElement(GL_FLOAT, 3, VERTEX_USAGE_SHADER_INPUT, static_cast<size_t>(0), "inModelViewIT1", 1, boneInstanceData_.id());
boneInstanceDecl_.addElement(GL_FLOAT, 3, VERTEX_USAGE_SHADER_INPUT, static_cast<size_t>(0), "inModelViewIT2", 1, boneInstanceData_.id());
}
ro.vertexDecl = &boneInstanceDecl_;
......
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