Commit ab9ee0ee authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum

[FIX] fixes a lot of clang warnings. Mainly unused vars.

parent a534dadb
......@@ -139,10 +139,7 @@ public:
*
* \return true if value could be set.
*/
virtual bool setAsString( std::string value )
{
return false;
}
virtual bool setAsString( std::string value );
/**
* Returns the current value as a string. This is useful for debugging or project files. It is not implemented as << operator, since the <<
......@@ -180,5 +177,11 @@ protected:
private:
};
template< typename T >
bool WPropertyList< T >::setAsString( std::string /*value*/ )
{
return false;
}
#endif // WPROPERTYLIST_H
......@@ -162,10 +162,6 @@ protected:
static boost::shared_ptr< WPrototyped > m_prototype;
private:
/**
* We have only on sampling rate for all channels.
*/
double m_samplingRate;
/**
* Description of electrodes
*/
......
......@@ -129,6 +129,9 @@ public:
*/
void requestShaderReload();
// Tell the compiler that we really want to use the base's subscribeSignal.
using WThreadedRunner::subscribeSignal;
/**
* Subscribe a specified handler to the specified signal emited by the GE.
*
......
......@@ -35,8 +35,7 @@
WGEAnimationManipulator::WGEAnimationManipulator( WTimer::ConstSPtr timer ):
m_matrix( osg::Matrixd::identity() ),
m_timer( timer ),
m_homeOffsetTime( timer->elapsed() ),
m_paused( true )
m_homeOffsetTime( timer->elapsed() )
{
// initialize
}
......
......@@ -164,11 +164,6 @@ private:
* This method updates m_matrix per frame according to time elapsed.
*/
void handleFrame();
/**
* If true, the animation is suspended.
*/
bool m_paused;
};
#endif // WGEANIMATIONMANIPULATOR_H
......@@ -71,6 +71,9 @@ public:
*/
virtual ~WGEShader();
// We do not want to override the original function with the same signature as applyDirect.
using osg::Program::apply;
/**
* Apply this shader to the specified node. Use this method to ensure, that reload events can be handled properly during the
* update cycle.
......
......@@ -42,7 +42,7 @@ WOSGButtonLabel::~WOSGButtonLabel()
{
}
bool WOSGButtonLabel::mousePush( double, double, osgWidget::WindowManager* )
bool WOSGButtonLabel::mousePush( double, double, const osgWidget::WindowManager* )
{
m_clicked = true;
if( m_pushable )
......
......@@ -52,7 +52,7 @@ public:
*
* \return bool
*/
bool mousePush( double, double, osgWidget::WindowManager* );
virtual bool mousePush( double, double, const osgWidget::WindowManager* );
/**
* getter for clicked flag, resets the flag to false
......
......@@ -33,28 +33,29 @@
WKdTree::WKdTree( int size, float *pointArray ) :
m_size( size ), m_pointArray( pointArray )
{
WAssert( size > 2, "The current kD-tree implementation works only with at least 3 vertices." );
WAssert( m_size > 2, "The current kD-tree implementation works only with at least 3 vertices." );
m_tree.clear();
m_tree.resize( size );
m_tree.resize( m_size );
wlog::debug( "KdTree" ) << " Start building KdTree";
for( int i = 0; i < size; ++i )
for( int i = 0; i < m_size; ++i )
m_tree[i] = i;
int root = ( size - 1 ) / 2;
int root = ( m_size - 1 ) / 2;
m_root = root;
std::nth_element( m_tree.begin(), m_tree.begin() + root, m_tree.end(), lessy( m_pointArray, 0 ) );
int rootLeft = ( root - 1 ) / 2;
std::nth_element( m_tree.begin(), m_tree.begin() + rootLeft, m_tree.begin() + root - 1, lessy( m_pointArray, 1 ) );
int rootRight = ( size + root ) / 2;
int rootRight = ( m_size + root ) / 2;
std::nth_element( m_tree.begin() + root + 1, m_tree.begin() + rootRight, m_tree.end(), lessy( m_pointArray, 1 ) );
WKdTreeThread *thread1 = new WKdTreeThread( m_pointArray, &m_tree, 0, rootLeft - 1, 2 );
WKdTreeThread *thread2 = new WKdTreeThread( m_pointArray, &m_tree, rootLeft + 1, root - 1, 2 );
WKdTreeThread *thread3 = new WKdTreeThread( m_pointArray, &m_tree, root + 1, rootRight - 1, 2 );
WKdTreeThread *thread4 = new WKdTreeThread( m_pointArray, &m_tree, rootRight + 1, size - 1, 2 );
WKdTreeThread *thread4 = new WKdTreeThread( m_pointArray, &m_tree, rootRight + 1, m_size - 1, 2 );
wlog::debug( "KdTree" ) << "Start threads";
......
......@@ -97,6 +97,9 @@ public:
*/
virtual ~WKernel();
// Tell the compiler that we really want to use the base's subscribeSignal.
using WThreadedRunner::subscribeSignal;
/**
* Subscribe to several signals.
*
......
......@@ -289,6 +289,9 @@ public:
*/
virtual boost::shared_ptr< WModule > factory() const = 0;
// Tell the compiler that we really want to use the base's subscribeSignal.
using WThreadedRunner::subscribeSignal;
/**
* Connects a specified notify function with a signal this module instance is offering.
*
......
......@@ -32,8 +32,6 @@
#include "WRMBranch.h"
/**
* Class to store and manage different ROI's for fiber selection
*/
......@@ -203,8 +201,6 @@ public:
protected:
private:
size_t m_size; //!< number of fibers in the dataset
std::list< boost::shared_ptr< WRMBranch > > m_branches; //!< list of branches in the logical tree structure
/**
......
......@@ -202,7 +202,7 @@ void WModuleProjectFileCombiner::apply()
// if isReady now is false, the module has crashed before it got ready -> remove the module from the list
if( ( *iter ).second->isCrashed()() )
{
addError( "In the module with ID " + ( *iter ).first +
addError( "In the module with ID " + string_utils::toString( ( *iter ).first ) +
std::string( " a problem occurred. Connections and properties relating to this module will fail." ) );
// m_modules.erase( iter );
}
......
......@@ -50,7 +50,6 @@ W_LOADABLE_MODULE( WMArbitraryROIs )
WMArbitraryROIs::WMArbitraryROIs():
WModule(),
m_textureChanged( true ),
m_recompute( boost::shared_ptr< WCondition >( new WCondition() ) ),
m_dataSet(),
m_moduleNode( new WGEGroupNode() ),
......
......@@ -144,11 +144,6 @@ private:
template< typename T > boost::shared_ptr< std::vector< float > > cutArea( boost::shared_ptr< WGrid > inGrid,
boost::shared_ptr< WValueSet< T > > vals );
/**
* True when textures haven changed.
*/
bool m_textureChanged;
/**
* This condition denotes whether we need to recompute the surface
*/
......
......@@ -403,8 +403,6 @@ private:
size_t m_rootCluster; //!< currently selected cluster + offset
size_t m_labelMode; //!< indicates wheter the cluster number, size of custom data should be shown on labels
int m_oldViewHeight; //!< stores the old viewport resolution to check whether a resize happened
int m_oldViewWidth; //!< stores the old viewport resolution to check whether a resize happened
......
......@@ -120,11 +120,6 @@ private:
*/
double m_valueMin;
/**
* The max of the current dataset. We store them here to avoid many calls to getTexture()->minimum()->get() and scale()->get().
*/
double m_valueMax;
/**
* The scaling factor of the current dataset. We store them here to avoid many calls to getTexture()->minimum()->get() and scale()->get().
*/
......
......@@ -149,7 +149,7 @@ WTriangleMesh::SPtr WMeshReaderVTK::operator()( WProgressCombiner::SPtr parentPr
triMesh->addTriangle( tri[0], tri[1], tri[2] );
if( nbCellVerts != 3 )
{
WLogger::getLogger()->addLogMessage( "Number of cell vertices should be 3 but found " + nbCellVerts, "Read Mesh", LL_ERROR );
WLogger::getLogger()->addLogMessage( "Number of cell vertices should be 3 but found " + string_utils::toString( nbCellVerts ) + ".", "Read Mesh", LL_ERROR );
progress->finish();
return boost::shared_ptr< WTriangleMesh >();
}
......@@ -167,7 +167,7 @@ WTriangleMesh::SPtr WMeshReaderVTK::operator()( WProgressCombiner::SPtr parentPr
ifs >> cellType;
if( cellType != 5 )
{
WLogger::getLogger()->addLogMessage( "Invalid cell type: " + cellType, "Read Mesh", LL_ERROR );
WLogger::getLogger()->addLogMessage( "Invalid cell type: " + string_utils::toString( cellType ) + ".", "Read Mesh", LL_ERROR );
progress->finish();
return boost::shared_ptr< WTriangleMesh >();
}
......
......@@ -102,39 +102,6 @@ void WMTransferFunctionColorBar::properties()
WModule::properties();
}
namespace
{
/**
* Formats a given string to have the specified maximum length.
*
* \param str the string
* \param maxLen max length
*
* \return formatted string
*/
std::string format( std::string str, size_t maxLen = 45 )
{
// string will be at least 9 chars long: because of " [...] " + first and last char.
WAssert( maxLen >= 9, "MaxLen has to be 9 or more." );
std::ostringstream ss;
// cut away some stuff
if( str.length() > maxLen )
{
size_t keep = maxLen - 3; // how much chars to keep?
size_t keepFront = keep / 2;
size_t keepEnd = keep - keepFront;
ss << str.substr( 0, keepFront ) << " [...] " << str.substr( str.length() - keepEnd, keepEnd );
}
else
{
ss << str;
}
return ss.str();
}
}
/**
* Formats a number properly to be usable as label
*
......
......@@ -117,11 +117,6 @@ private:
*/
double m_valueMin;
/**
* The max of the current dataset. We store them here to avoid many calls to getTexture()->minimum()->get() and scale()->get().
*/
double m_valueMax;
/**
* The scaling factor of the current dataset. We store them here to avoid many calls to getTexture()->minimum()->get() and scale()->get().
*/
......
......@@ -182,8 +182,6 @@ void WCenterlineParameterization::newSegment( const WPosition& start, const WPos
}
}
m_currentStartParameter = m_currentStartParameter;
WRasterParameterization::newSegment( start, end );
}
......
......@@ -30,8 +30,7 @@
#include "WQtToolBarBase.moc"
WQtToolBarBase::WQtToolBarBase( const QString& title, WMainWindow* parent ):
QToolBar( title, parent ),
m_mainWindow( parent )
QToolBar( title, parent )
{
setObjectName( title );
......
......@@ -61,11 +61,6 @@ public:
protected:
private:
/**
* The main window parent.
*/
WMainWindow* m_mainWindow;
/**
* The options for toolbar style.
*/
......
......@@ -191,12 +191,6 @@ protected:
*/
virtual void placeWidgetImplGT( QWidget* widget, int x, int y );
private:
/**
* The Qt widget representing this abstract widget. Might be null. Check before use!
* \note this is the same pointer as WUIQtWidgetBase::m_widget as WQtDockWidget.
*/
WQtDockWidget* m_widgetDock;
/**
* The grid used for managing child widgets
*/
......
......@@ -217,12 +217,6 @@ protected:
*/
virtual int addTabImpl( WUIWidgetBase::SPtr widget, std::string label );
private:
/**
* The Qt widget representing this abstract widget. Might be null. Check before use!
* \note this is the same pointer as WUIQtWidgetBase::m_widget as WQtDockWidget.
*/
WQtDockWidget* m_widgetDock;
/**
* The tab widget used for managing child widgets
*/
......
......@@ -292,16 +292,10 @@ private:
QTabWidget* m_tabWidget; //!< pointer to the tab widget
QTabWidget* m_tabWidget2; //!< pointer to the tab widget
QSplitter* m_splitter; //!< splitter to have resizable widgets in the control panel
WQtModuleHeaderTreeItem* m_tiModules; //!< header for modules
WQtRoiHeaderTreeItem* m_tiRois; //!< header for ROIs
bool m_showToolBarText; //!< Show tool bar icons with text
WQtDockWidget* m_roiDock; //!< the dock widget with the ROI tree
WQtDockWidget* m_moduleDock; //!< the dock widget with the module tree
......@@ -373,11 +367,6 @@ private:
*/
bool m_ignoreSelectionChange;
/**
* Ignore recursive selection update in network editor.
*/
bool m_ignoreSelectionChangeNWE;
/**
* The WQtCombinerActionList needs some predicate which decides whether to exclude a certain module from the list or not. We use this
* predicate here. It is configured internally using a white and blacklist.
......
......@@ -111,7 +111,7 @@ void WTransferFunctionColorPoint::paint( QPainter *painter, const QStyleOptionGr
}
QColor color = painter->pen().color();
color.setAlpha( 0.3 );
color.setAlpha( 255 * 0.3 );
painter->setPen( QPen( color, painter->pen().width() ) );
painter->setBrush( gradient );
......
......@@ -32,8 +32,8 @@
#include "QtGui/QStyleOption"
#include "QtGui/QGraphicsSceneMouseEvent"
WTransferFunctionLine::WTransferFunctionLine( WTransferFunctionWidget *parent )
: BaseClass(), lineWidth( 2.0 ), left( 0x0 ), right( 0x0 ), _parent( parent )
WTransferFunctionLine::WTransferFunctionLine( WTransferFunctionWidget* /* parent */ )
: BaseClass(), lineWidth( 2.0 ), left( 0x0 ), right( 0x0 )
{
setPen( QPen( Qt::black, lineWidth, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin ) );
//this->setFlag( ItemIsMovable ); //< this has to be implemented
......
......@@ -105,9 +105,6 @@ private:
/** the point to the right */
WTransferFunctionPoint *right;
/** our parent widget */
WTransferFunctionWidget* _parent;
};
#endif // WTRANSFERFUNCTIONLINE_H
......
......@@ -40,8 +40,7 @@
#include "WTransferFunctionWidget.h"
#include "WTransferFunctionWidget.moc"
WTransferFunctionWidget::WTransferFunctionWidget( QWidget*qparent, WTransferFunctionGuiNotificationClass* parent ): BaseClass( qparent ),
parent( parent ),
WTransferFunctionWidget::WTransferFunctionWidget( QWidget*qparent, WTransferFunctionGuiNotificationClass* /* parent */ ): BaseClass( qparent ),
scene( 0x0 ),
first( 0x0 ),
last( 0x0 ),
......
......@@ -45,7 +45,6 @@
#include "WQtNetworkArrow.h"
const qreal Pi = 3.14;
const QColor owRed( 248, 87, 87 );
const QColor owGreen( 115, 225, 115 );
......
......@@ -31,8 +31,7 @@
#include "WQtNetworkSceneLayout.h"
WQtNetworkSceneLayout::WQtNetworkSceneLayout( WQtNetworkScene* scene, WQtNetworkItemGrid* grid ):
m_scene( scene ),
WQtNetworkSceneLayout::WQtNetworkSceneLayout( WQtNetworkScene* /* scene */, WQtNetworkItemGrid* grid ):
m_grid( grid )
{
// initialize members
......
......@@ -159,8 +159,6 @@ public:
protected:
private:
WQtNetworkScene* m_scene; //!< the scene managed by this layouter
WQtNetworkItemGrid* m_grid; //!< we use a grid to place the items
/**
......
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