Commit f6251b9c authored by Jan Möbius's avatar Jan Möbius

Fixed a lot of cppcheck warnings

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@13296 383ad7c9-94d9-4d36-a494-682f7c89f535
parent e18893f0
......@@ -256,7 +256,7 @@ void GLState::clearBuffers ()
glScissor( left_,bottom_,width_,height_ );
// Clear restricted region
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
// Reset to originalsettings
glScissor( origBox[0], origBox[1], origBox[2], origBox[3] );
......
......@@ -66,7 +66,9 @@ namespace ACG {
GLTrackball::
GLTrackball(GLState& _state)
: glstate_(_state),
center_(0,0,0)
center_(0,0,0) ,
last_point_ok_(false),
action_(ROTATION)
{
for (int i=0; i<10; ++i)
button_down_[i] = false;
......
......@@ -67,7 +67,9 @@ namespace ACG {
GlutExaminer::
GlutExaminer(const char* _title, int _width, int _height)
: GlutViewer(_title, _width, _height),
trackball_(glstate_)
trackball_(glstate_),
center_(Vec3f(0.0,0.0,0.0)),
radius_(1.0)
{
init();
}
......
......@@ -111,8 +111,11 @@ public:
unsigned int slices, stacks;
// Constructor
Primitive()
Primitive(GlutPrimitiveType _t)
{
// Set the type
type = _t;
// default axis is negative z
axis = Vec3d(0,0,1);
......@@ -175,8 +178,7 @@ public:
setColor_(true)
{
// add a single primitive of the given type
Primitive p;
p.type = _type;
Primitive p(_type);
primitives_.push_back(p);
}
......
......@@ -166,7 +166,6 @@ private:
/// Contains all orientations to draw
unsigned int orientation_;
bool ok_;
};
......
......@@ -91,7 +91,7 @@ TextureNode::TextureNode( BaseNode* _parent,
TextureNode::~TextureNode()
{
for (std::vector<TextureInfo>::iterator texturesIt = textures_.begin(); texturesIt != textures_.end(); texturesIt++) {
for (std::vector<TextureInfo>::iterator texturesIt = textures_.begin(); texturesIt != textures_.end(); ++texturesIt) {
if ( glIsTexture( texturesIt->id ) ) {
glDeleteTextures( 1, &(texturesIt->id) );
}
......
......@@ -137,6 +137,8 @@ TranslationManipulatorNode( BaseNode* _parent, const std::string& _name )
sphere_(0),
manipulator_radius_(20.0),
manipulator_height_(20),
set_manipulator_radius_(1.0),
set_manipulator_height_(1.0),
manipulator_slices_(10),
manipulator_stacks_(10),
any_axis_clicked_(false),
......
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