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

Fixed cppcheck warnings

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@13338 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 18a9a9b9
......@@ -100,7 +100,7 @@ BaseObject::BaseObject(const BaseObject& _object) :
std::cerr << "Failed to copy per Object Data: " << mapIter.key().toStdString() << std::endl;
}
mapIter++;
++mapIter;
}
// If the pointer is 0 then we are creating the objectroot
......
......@@ -75,7 +75,7 @@ public: //---------------------------------------------------------------------
typedef BSPTraits Traits;
typedef typename BSPTraits::Point Point;
typedef typename BSPTraits::Handle Handle;
typedef typename BSPTraits::Node Node;
typedef typename BSPTraits::Node Node;
typedef typename Point::value_type Scalar;
typedef ACG::Geometry::PlaneT<Scalar> Plane;
typedef std::vector<Handle> Handles;
......@@ -87,7 +87,7 @@ public: //---------------------------------------------------------------------
/** Constructor: need traits that define the types and
give us the points by traits_.point(PointHandle) */
TriangleBSPCoreT(const BSPTraits& _traits) : traits_(_traits), root_(0) {}
TriangleBSPCoreT(const BSPTraits& _traits) : traits_(_traits), root_(0), nodes(0) {}
/// Destructor
~TriangleBSPCoreT() { delete root_; }
......@@ -120,7 +120,7 @@ protected: //-------------------------------------------------------------------
BSPTraits traits_;
Handles handles_;
Node* root_;
int nodes;
int nodes;
};
......
......@@ -685,7 +685,6 @@ void CoreWidget::updatePopupMenu(const QPoint& _point) {
// =============================================================================
// First do a picking on the current position to check which context we are in.
// =============================================================================
int objectId = -1;
enum CONTEXTTYPE {
COORDSYSCONTEXT ,BACKGROUNDCONTEXT ,OBJECTCONTEXT, NODECONTEXT
......@@ -694,13 +693,12 @@ void CoreWidget::updatePopupMenu(const QPoint& _point) {
// Do picking in the gl area to find an object
unsigned int node_idx, target_idx;
ACG::Vec3d hit_point;
BaseObjectData* object;
ACG::SceneGraph::BaseNode* node = 0;
BaseObjectData* object = 0;
ACG::SceneGraph::BaseNode* node = 0;
if (examiner_widgets_[PluginFunctions::activeExaminer()]->pick( ACG::SceneGraph::PICK_ANYTHING,_point,node_idx, target_idx, &hit_point ) ) {
if ( PluginFunctions::getPickedObject(node_idx, object) ) {
objectId = object->id();
context = OBJECTCONTEXT;
} else {
node = ACG::SceneGraph::find_node( PluginFunctions::getSceneGraphRootNode() , node_idx );
......
......@@ -145,7 +145,8 @@ class StackWidgetInfo {
class MenuInfo {
public:
MenuInfo():
action(0)
action(0),
type(CONTEXTBACKGROUNDMENU)
{}
/// The context item
......@@ -155,7 +156,7 @@ class MenuInfo {
DataType contextType;
/// Type of the context Menu ( Context for what type .. Background,Object,Node)
ContextMenuType type;
ContextMenuType type;
};
/** \brief Struct containing information about pickModes
......
......@@ -57,9 +57,14 @@
#include <OpenFlipper/ACGHelper/DrawModeConverter.hh>
/// Constructor
FileSTLPlugin::FileSTLPlugin()
: saveOptions_(0),
loadOptions_(0) {
FileSTLPlugin::FileSTLPlugin() :
saveOptions_(0),
loadOptions_(0),
saveBinary_(0),
saveDefaultButton_(0),
loadDefaultButton_(0)
{
}
//-----------------------------------------------------------------------------------------------------
......
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