Commit 7bf65c20 authored by Jan Möbius's avatar Jan Möbius

More warnings fixed

parent 3fe68691
Pipeline #3361 passed with stage
in 35 minutes and 13 seconds
......@@ -863,7 +863,7 @@ void CoordsysNode::boundingCircle(std::vector<Vec2f> &_in, Vec2f &_center, float
for (unsigned int i = 0; i < _in.size () - 1; i++)
for (unsigned int j = i + 1; j < _in.size (); j++)
{
Vec2f cen = (_in[i] + _in[j]) * 0.5;
Vec2f cen = (_in[i] + _in[j]) * 0.5f;
float rad = (_in[i] - cen).length ();
bool allin = true;
......
......@@ -301,9 +301,9 @@ add_primitive(GlutPrimitiveType _type, Vec3d _pos, Vec3d _axis, ACG::Vec4f _colo
//----------------------------------------------------------------------------
void
GlutPrimitiveNode::draw_obj(int _idx) const
GlutPrimitiveNode::draw_obj(size_t _idx) const
{
if (_idx < 0 || _idx >= (int)primitives_.size()) // range check
if ( _idx >= primitives_.size()) // range check
return;
Vec3d axis = primitives_[_idx].axis;
......@@ -390,7 +390,7 @@ pick(GLState& _state , PickTarget _target)
case PICK_ANYTHING:
case PICK_FACE:
{
for (int i = 0; i < (int)primitives_.size(); ++i)
for (size_t i = 0; i < primitives_.size(); ++i)
{
_state.pick_set_name(i);
glPushMatrix();
......
......@@ -217,7 +217,7 @@ public:
/// drawing the primitive
void draw(GLState& _state, const DrawModes::DrawMode& _drawMode);
void draw_obj(int _idx) const;
void draw_obj(size_t _idx) const;
/// picking
void pick(GLState& _state, PickTarget _target);
......
......@@ -372,7 +372,7 @@ void LineNode::pick(GLState& _state , PickTarget _target)
ACG::GLState::vertexPointer( &(points_)[0] );
ACG::GLState::enableClientState(GL_VERTEX_ARRAY);
const unsigned int n_edges = n_points() - 1;
const size_t n_edges = n_points() - 1;
switch (_target)
{
......@@ -414,25 +414,25 @@ void LineNode::pick_edges(GLState& _state, unsigned int _offset)
if (line_mode_ == PolygonMode)
{
const unsigned int n_edges = n_points() - 1;
for (unsigned int i = 0; i < n_edges; ++i)
const size_t n_edges = n_points() - 1;
for (size_t i = 0; i < n_edges; ++i)
{
_state.pick_set_name(i + _offset);
glBegin(GL_LINES);
glArrayElement(i);
glArrayElement(i + 1);
glArrayElement(static_cast<GLint>(i));
glArrayElement(static_cast<GLint>(i + 1));
glEnd();
}
}
else if (line_mode_ == LineSegmentsMode)
{
const unsigned int n_edges = n_points() / 2;
for (unsigned int i = 0; i < n_edges; ++i)
const size_t n_edges = n_points() / 2;
for (size_t i = 0; i < n_edges; ++i)
{
_state.pick_set_name(i + _offset);
glBegin(GL_LINES);
glArrayElement(2*i);
glArrayElement(2*i + 1);
glArrayElement(static_cast<GLint>(2*i));
glArrayElement(static_cast<GLint>(2*i + 1));
glEnd();
}
}
......
......@@ -266,7 +266,7 @@ enter(GLState& _state, const DrawModes::DrawMode& /*_drawmode*/) {
ACG::GLState::enable(GL_TEXTURE_2D);
ACG::GLState::enable(GL_BLEND);
ACG::GLState::enable(GL_ALPHA_TEST);
ACG::GLState::alphaFunc(GL_GREATER, 0.2);
ACG::GLState::alphaFunc(GL_GREATER, 0.2f);
ACG::GLState::blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
if (alwaysOnTop_)
ACG::GLState::disable(GL_DEPTH_TEST);
......
......@@ -106,8 +106,8 @@ class DLLEXPORT QtPlaneSelect : public QObject
public:
ACG::Vec3d getNormal( ) { return normal; }
ACG::Vec3d getSourcePoint( ) { return sourcePoint3D; }
unsigned int getNode() { return nodeIdx_; };
unsigned int getTargetIndex() { return targetIdx_; };
size_t getNode() { return nodeIdx_; };
size_t getTargetIndex() { return targetIdx_; };
/*******************************************************************************
......@@ -117,8 +117,8 @@ class DLLEXPORT QtPlaneSelect : public QObject
ACG::GLState& glState;
ACG::Vec3d sourcePoint3D;
ACG::Vec3d normal;
unsigned int nodeIdx_;
unsigned int targetIdx_;
size_t nodeIdx_;
size_t targetIdx_;
bool isDragging;
PlaneNode* planeNode_;
......
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