Commit 17398b88 authored by Jan Möbius's avatar Jan Möbius

Fixed cppcheck warnings

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@13345 383ad7c9-94d9-4d36-a494-682f7c89f535
parent b1b443d7
......@@ -320,7 +320,7 @@ bool getObject( const int _identifier , BaseObjectData*& _object ) {
return ( _object != 0 );
}
int getObjectId( const QString _name ) {
int getObjectId( const QString& _name ) {
if(_name.isEmpty()) return -1;
BaseObject* object = objectRoot_->childExists( _name );
......
......@@ -151,7 +151,7 @@ bool getObject( const int _identifier , BaseObjectData*& _object );
/** This functions returns the object's id with the given name.
*/
DLLEXPORT
int getObjectId( const QString _name );
int getObjectId( const QString& _name );
/** \brief Check if an object with this identifier exists.
*
......
......@@ -98,7 +98,7 @@ public:
signals:
// BaseInterface
void updateView();
void updatedObject(int, const UpdateType _type);
void updatedObject(int, const UpdateType& _type);
void nodeVisibilityChanged(int);
// PickingInterface
......
......@@ -109,7 +109,7 @@ void BSplineCurveSelectionPlugin::deleteSelectedControlPoints(int _objectId) {
emit scriptInfo("deleteSelectedControlPoints(ObjectId)");
}
void BSplineCurveSelectionPlugin::selectControlPoints(int _objectId, const IdList _ids, bool _deselect) {
void BSplineCurveSelectionPlugin::selectControlPoints(int _objectId, const IdList& _ids, bool _deselect) {
if( _ids.empty()) return;
......@@ -201,7 +201,6 @@ void BSplineCurveSelectionPlugin::deselectAllKnots(int _objectId) {
}
BSplineCurve* curve = PluginFunctions::splineCurve(object);
BSplineCurveObject* co = PluginFunctions::bsplineCurveObject(object);
if(curve) {
for(unsigned int i = 0; i < curve->n_knots(); ++i) {
......@@ -277,7 +276,7 @@ void BSplineCurveSelectionPlugin::deleteSelectedKnots(int _objectId) {
emit scriptInfo("deleteSelectedKnots(ObjectId)");
}
void BSplineCurveSelectionPlugin::selectKnots(int _objectId, const IdList _ids, bool _deselect) {
void BSplineCurveSelectionPlugin::selectKnots(int _objectId, const IdList& _ids, bool _deselect) {
if(_ids.empty()) return;
......
......@@ -196,7 +196,7 @@ public slots:
void deleteSelectedControlPoints(int _objectId);
/// Select specific control points of a curve
void selectControlPoints(int _objectId, const IdList _ids, bool _deselect = false);
void selectControlPoints(int _objectId, const IdList& _ids, bool _deselect = false);
/// Get current control point selection
IdList getControlPointSelection(int _objectId);
......@@ -216,7 +216,7 @@ public slots:
void deleteSelectedKnots(int _objectId);
/// Select specific knots of a curve
void selectKnots(int _objectId, const IdList _ids, bool _deselect = false);
void selectKnots(int _objectId, const IdList& _ids, bool _deselect = false);
/// Get current knot selection
IdList getKnotSelection(int _objectId);
......
......@@ -150,7 +150,7 @@ void BSplineSurfaceSelectionPlugin::invertControlPointSelection(int _objectId) {
// emit scriptInfo("deleteSelectedControlPoints(ObjectId)");
// }
void BSplineSurfaceSelectionPlugin::selectControlPoints(int _objectId, const IdList _ids, bool _deselect) {
void BSplineSurfaceSelectionPlugin::selectControlPoints(int _objectId, const IdList& _ids, bool _deselect) {
if(_ids.empty() ) return;
......@@ -250,8 +250,7 @@ void BSplineSurfaceSelectionPlugin::deselectAllKnots(int _objectId) {
return;
}
BSplineSurface* surface = PluginFunctions::splineSurface(object);
BSplineSurfaceObject* co = PluginFunctions::bsplineSurfaceObject(object);
BSplineSurface* surface = PluginFunctions::splineSurface(object);
if(surface) {
for(unsigned int i = 0; i < surface->n_knots_m(); ++i) {
......@@ -364,7 +363,7 @@ void BSplineSurfaceSelectionPlugin::deleteSelectedKnotsV(int _objectId) {
// emit scriptInfo("deleteSelectedKnots(ObjectId)");
}
void BSplineSurfaceSelectionPlugin::selectKnots(int _objectId, const IdList _ids_u, const IdList _ids_v, bool _deselect) {
void BSplineSurfaceSelectionPlugin::selectKnots(int _objectId, const IdList& _ids_u, const IdList& _ids_v, bool _deselect) {
if(_ids_u.empty()) return;
......
......@@ -197,7 +197,7 @@ public slots:
// void deleteSelectedControlPointsV(int _objectId);
/// Select specific control points of a curve
void selectControlPoints(int _objectId, const IdList _ids, bool _deselect = false);
void selectControlPoints(int _objectId, const IdList& _ids, bool _deselect = false);
/// Get current control point selection
IdList getControlPointSelection(int _objectId);
......@@ -218,7 +218,7 @@ public slots:
void deleteSelectedKnotsV(int _objectId);
/// Select specific knots of a curve
void selectKnots(int _objectId, const IdList _ids_u, const IdList _ids_v, bool _deselect = false);
void selectKnots(int _objectId, const IdList& _ids_u, const IdList& _ids_v, bool _deselect = false);
/// Get current knot selection
IdList getKnotSelectionU(int _objectId);
......
......@@ -85,6 +85,7 @@ SelectionBasePlugin::SelectionBasePlugin() :
toolBar_(0),
tool_(0),
primitivesBarGroup_(0),
pickModeToolBar_(0),
selectionModesGroup_(0),
toggleSelectionAction_(0),
lassoSelectionAction_(0),
......@@ -98,7 +99,9 @@ nextFreePrimitiveType_(1u),
sphere_mat_node_(0),
sphere_node_(0),
line_node_(0),
lassoSelection_(false) {
lassoSelection_(false),
toolIcon_(0)
{
// Reset active pick mode
currentPickMode_ = NO_SELECTION_PICKING;
......
......@@ -935,7 +935,7 @@ void TextureControlPlugin::slotDrawModeChanged(int _viewerId ) {
}
void TextureControlPlugin::slotObjectUpdated(int _identifier, const UpdateType _type)
void TextureControlPlugin::slotObjectUpdated(int _identifier, const UpdateType& _type)
{
if( !_type.contains(UPDATE_ALL) && !_type.contains(UPDATE_GEOMETRY) && !_type.contains(UPDATE_TOPOLOGY) )
return;
......
......@@ -83,7 +83,7 @@ class TextureControlPlugin : public QObject, BaseInterface, BackupInterface, Tex
// BaseInterface
void updateView();
void updatedObject(int _identifier, const UpdateType _type);
void updatedObject(int _identifier, const UpdateType& _type);
// TextureInterface
void updateTexture( QString , int);
......@@ -103,7 +103,7 @@ class TextureControlPlugin : public QObject, BaseInterface, BackupInterface, Tex
// BaseInterface
void pluginsInitialized();
void slotObjectUpdated(int _identifier, const UpdateType _type);
void slotObjectUpdated(int _identifier, const UpdateType& _type);
void slotDrawModeChanged(int _viewerId );
// TextureInterface
......
......@@ -68,7 +68,7 @@ class TopologyPlugin : public QObject, BaseInterface , MouseInterface, KeyInterf
signals:
// BaseInterface
void updateView();
void updatedObject(int _id, const UpdateType _type);
void updatedObject(int _id, const UpdateType& _type);
// PickingInterface
void addHiddenPickMode( const std::string& _mode );
......
......@@ -46,7 +46,9 @@
#include "OpenFlipper/BasePlugin/PluginFunctions.hh"
#include <OpenFlipper/common/GlobalOptions.hh>
TypeCameraPlugin::TypeCameraPlugin() {
TypeCameraPlugin::TypeCameraPlugin() :
contextMenu_(0)
{
}
......
......@@ -52,28 +52,29 @@
#define DEF2 "Default Light 2.lgt"
TypeLightPlugin::TypeLightPlugin() :
defaultLights_(true),
toolbar_(0),
lightOptions_(0),
lightAction_(0),
moveMode_(0),
translateMode_(0),
rotateMode_(0),
allLightsMode_(0),
onlyTargets_(false),
planeDepth_(0.0f),
transVec_(0.0),
rotation_(true),
radius_(0.0),
depth_(0.0f),
lightCenter_(0.0),
lightRadius_(0.0),
lightId_(-1),
hitLightTrackball_(false),
hitTrackball_(false) {
// Reset transformation matrix
light_matrix_.identity();
defaultLights_(true),
toolbar_(0),
lightOptions_(0),
lightAction_(0),
moveMode_(0),
translateMode_(0),
rotateMode_(0),
allLightsMode_(0),
onlyTargets_(false),
planeDepth_(0.0f),
transVec_(0.0),
rotation_(true),
radius_(0.0),
depth_(0.0f),
lightCenter_(0.0),
lightRadius_(0.0),
lightId_(-1),
hitLightTrackball_(false),
hitTrackball_(false)
{
// Reset transformation matrix
light_matrix_.identity();
}
bool TypeLightPlugin::registerType() {
......
......@@ -81,7 +81,7 @@ class TypeLightPlugin : public QObject, BaseInterface, LoadSaveInterface, Loggin
void deleteObject(int _id);
// BaseInterface
void updatedObject(int _id, const UpdateType _type);
void updatedObject(int _id, const UpdateType& _type);
void updateView();
// ToolbarInterface
......
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