10.12., 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Taking care of CppCheck issues #2

parent c2b87c2b
......@@ -63,7 +63,7 @@ namespace campvis {
* Creates a new AbstractAdjusterWidget.
* \param parent parent Qt widget
*/
AbstractAdjusterWidget(QWidget* parent = 0);
explicit AbstractAdjusterWidget(QWidget* parent = 0);
/**
* Return the adjuster's current value.
......
......@@ -43,7 +43,7 @@ namespace campvis {
* Creates a new DoubleAdjusterWidget.
* \param parent parent Qt widget
*/
DoubleAdjusterWidget(QWidget* parent = 0);
explicit DoubleAdjusterWidget(QWidget* parent = 0);
/**
* Returns how many decimals the adjuster will use for displaying and doubleerpreting doubles.
......
......@@ -42,7 +42,7 @@ namespace campvis {
* Creates a new IntAdjusterWidget.
* \param parent Parent Qt widget
*/
IntAdjusterWidget(QWidget* parent = 0);
explicit IntAdjusterWidget(QWidget* parent = 0);
/**
* Change the adjuster's current value.
......
......@@ -59,7 +59,6 @@ namespace campvis {
}
_property->s_changed.connect(this, &AbstractPropertyWidget::onPropertyChanged);
// cppcheck-suppress pureVirtualCall
connect(this, SIGNAL(s_propertyChanged(const AbstractProperty*)), this, SLOT(updateWidgetFromProperty()));
}
......
......@@ -82,7 +82,7 @@ namespace campvis {
/**
* Gets called when the property has changed, so that widget can update its state.
*/
virtual void updateWidgetFromProperty() = 0;
virtual void updateWidgetFromProperty() {};
signals:
/**
......
......@@ -48,7 +48,7 @@ namespace campvis {
* Creates a new PropertyCollectionWidget.
* \param parent Parent widget, may be 0.
*/
PropertyCollectionWidget(QWidget* parent = 0);
explicit PropertyCollectionWidget(QWidget* parent = 0);
/**
* Destructor.
......
......@@ -46,7 +46,7 @@ namespace campvis {
* Creates a new AbstractTFGeometryManipulator for the given Geometry1DTransferFunction.
* \param viewportSize Viewport size (extent of the OpenGL rendering canvas)
*/
AbstractTFGeometryManipulator(const cgt::ivec2& viewportSize);
explicit AbstractTFGeometryManipulator(const cgt::ivec2& viewportSize);
/**
* Pure virtual Destructor
......
......@@ -98,7 +98,7 @@ namespace campvis {
namespace {
struct KeyPointSorter {
KeyPointSorter(const cgt::vec2& center)
explicit KeyPointSorter(const cgt::vec2& center)
: _center(center)
{};
......
......@@ -46,7 +46,7 @@ namespace campvis {
* Creates a new abstract representation for the image \a parent.
* \param parent Image this representation represents, must not be 0.
*/
AbstractImageRepresentation(ImageData* parent);
explicit AbstractImageRepresentation(ImageData* parent);
/**
* Virtual Destructor.
......
......@@ -56,7 +56,7 @@ namespace campvis {
* Creates a new empty DataContainer
* \param name The name of the new DataContainer
*/
DataContainer(const std::string& name);
explicit DataContainer(const std::string& name);
/**
* Destructor of the DataContainer. Will disconnect all DataHandles from this container.
......
......@@ -67,7 +67,7 @@ namespace campvis {
* \param dc Pointer to the DataContainer containing local working set of data for this
* pipeline, must not be 0, must be valid the whole lifetime of this pipeline.
*/
AbstractPipeline(DataContainer* dc);
explicit AbstractPipeline(DataContainer* dc);
/**
* Virtual Destructor
......
......@@ -67,7 +67,7 @@ namespace campvis {
* Constructs a new Scoped lock, locking \a p and unlocking \a p on destruction.
* \param p Processor to lock
*/
ScopedLock(AbstractProcessor* p)
explicit ScopedLock(AbstractProcessor* p)
: _p(p)
{
_p->lockProcessor();
......
......@@ -86,7 +86,7 @@ namespace campvis {
/**
* Default constructor
*/
AbstractWorkflow(const std::string& title);
explicit AbstractWorkflow(const std::string& title);
/**
* Default virtual destructor.
......
......@@ -47,7 +47,7 @@ namespace campvis {
/**
* Creates a AutoEvaluationPipeline.
*/
AutoEvaluationPipeline(DataContainer* dc);
explicit AutoEvaluationPipeline(DataContainer* dc);
/**
* Virtual Destructor
......
......@@ -63,7 +63,7 @@ namespace campvis {
* Constructor
* \param reductionOperator Operation to be performed by reduction
*/
GlReduction(ReductionOperator reductionOperator);
explicit GlReduction(ReductionOperator reductionOperator);
/**
* Destructor
......
......@@ -52,7 +52,7 @@ namespace campvis {
public:
struct CAMPVIS_CORE_API TokenGroup {
public:
TokenGroup(bool caseSensitiveKeys)
explicit TokenGroup(bool caseSensitiveKeys)
: _caseSensitiveKeys(caseSensitiveKeys)
{};
......
......@@ -126,7 +126,7 @@ namespace cgt {
*/
class CGT_API GLContextScopedLock {
public:
GLContextScopedLock(GLCanvas* context)
explicit GLContextScopedLock(GLCanvas* context)
: _context(context)
{
if (_context) {
......
......@@ -68,7 +68,7 @@ public:
*/
class CGT_API GlVersion {
public:
GlVersion(int major = 0, int minor = 0, int release = 0);
explicit GlVersion(int major = 0, int minor = 0, int release = 0);
/**
* Parse OpenGL version string as specified:
......@@ -174,7 +174,7 @@ public:
* on the graphics card before initGL() is called. Otherwise GpuCapabilities tries to
* detect GL values while initGL() isn't called yet and produces a crash.
*/
GpuCapabilities(bool detectCaps = true);
explicit GpuCapabilities(bool detectCaps = true);
virtual ~GpuCapabilities() {}
......
......@@ -900,8 +900,6 @@ bool GpuCapabilitiesWindows::createVersionStringFromDigits(FileVersion &fileVers
return true;
}
std::string GpuCapabilitiesWindows::loggerCat_ = "cgt.GpuCapabilitiesWindows";
} // namespace cgt
#endif //WIN32
......@@ -133,8 +133,6 @@ public:
protected:
static std::string loggerCat_;
#ifdef CGT_WITH_WMI
/**
......
......@@ -26,30 +26,6 @@
* *
**********************************************************************/
// ================================================================================================
//
// This file is part of the CAMPVis Software Framework.
//
// If not explicitly stated otherwise: Copyright (C) 2012-2014, all rights reserved,
// Christian Schulte zu Berge <christian.szb@in.tum.de>
// Chair for Computer Aided Medical Procedures
// Technische Universitaet Muenchen
// Boltzmannstr. 3, 85748 Garching b. Muenchen, Germany
//
// For a full list of authors and contributors, please refer to the file "AUTHORS.txt".
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
// except in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the
// License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
// either express or implied. See the License for the specific language governing permissions
// and limitations under the License.
//
// ================================================================================================
#ifndef JOB_H__
#define JOB_H__
......@@ -296,7 +272,7 @@ namespace cgt {
*/
class CGT_API CallFunctionObjectJob : public AbstractJob {
public:
CallFunctionObjectJob(std::function<void(void)> fn)
explicit CallFunctionObjectJob(std::function<void(void)> fn)
: _fn(fn)
{
}
......
......@@ -182,7 +182,7 @@ template class CGT_API Singleton<LogManager>;
*/
class CGT_API LogManager : public Singleton<LogManager> {
public:
LogManager(const std::string& logDir = "");
explicit LogManager(const std::string& logDir = "");
~LogManager();
/// Initialize logmanager, put all logfiles in logDir
......
......@@ -73,6 +73,10 @@ namespace cgt {
~ScopedSynchronousGlJobExecution();
private:
// disable copying
explicit ScopedSynchronousGlJobExecution(const ScopedSynchronousGlJobExecution& rhs);
ScopedSynchronousGlJobExecution& operator=(ScopedSynchronousGlJobExecution rhs);
cgt::GLContextScopedLock* _lock;
};
......
......@@ -51,7 +51,7 @@ namespace cgt {
*/
class CGT_API VertexArrayObject {
public:
VertexArrayObject(bool autoBind = true) throw (cgt::Exception);
explicit VertexArrayObject(bool autoBind = true) throw (cgt::Exception);
/**
* Destructor, deletes the whole VAO.
......
......@@ -40,7 +40,7 @@ namespace campvis {
/**
* Creates a VisualizationPipeline.
*/
AdvancedUsVis(DataContainer* dc);
explicit AdvancedUsVis(DataContainer* dc);
/**
* Virtual Destructor
......
......@@ -41,7 +41,7 @@ namespace campvis {
/**
* Creates a AutoEvaluationPipeline.
*/
CmBatchGeneration(DataContainer* dc);
explicit CmBatchGeneration(DataContainer* dc);
/**
* Virtual Destructor
......
......@@ -50,7 +50,7 @@ namespace campvis {
/**
* Creates a AutoEvaluationPipeline.
*/
PredicateDemoAchilles(DataContainer* dc);
explicit PredicateDemoAchilles(DataContainer* dc);
/**
* Virtual Destructor
......
......@@ -51,7 +51,7 @@ namespace campvis {
/**
* Creates a AutoEvaluationPipeline.
*/
PredicateDemoCarotid(DataContainer* dc);
explicit PredicateDemoCarotid(DataContainer* dc);
/**
* Virtual Destructor
......
......@@ -51,7 +51,7 @@ namespace campvis {
/**
* Creates a AutoEvaluationPipeline.
*/
PredicateDemoCarotid2(DataContainer* dc);
explicit PredicateDemoCarotid2(DataContainer* dc);
/**
* Virtual Destructor
......
......@@ -50,7 +50,7 @@ namespace campvis {
/**
* Creates a AutoEvaluationPipeline.
*/
PredicateDemoShoulder(DataContainer* dc);
explicit PredicateDemoShoulder(DataContainer* dc);
/**
* Virtual Destructor
......
......@@ -50,7 +50,7 @@ namespace campvis {
/**
* Creates a AutoEvaluationPipeline.
*/
PredicateDemoSmallHeart(DataContainer* dc);
explicit PredicateDemoSmallHeart(DataContainer* dc);
/**
* Virtual Destructor
......
......@@ -53,7 +53,7 @@ namespace campvis {
/**
* Constructs a new AdvancedUsFusion Processor
**/
AdvancedUsFusion(IVec2Property* viewportSizeProp);
explicit AdvancedUsFusion(IVec2Property* viewportSizeProp);
/**
* Destructor
......
......@@ -49,7 +49,7 @@ namespace campvis {
/**
* Constructs a new PointPredicateEvaluator Processor
**/
PointPredicateEvaluator(IVec2Property* viewportSizeProp);
explicit PointPredicateEvaluator(IVec2Property* viewportSizeProp);
/**
* Destructor
......
......@@ -47,7 +47,7 @@ namespace campvis {
/**
* Constructs a new PointPredicateRaycaster Processor
**/
PointPredicateRaycaster(IVec2Property* viewportSizeProp);
explicit PointPredicateRaycaster(IVec2Property* viewportSizeProp);
/**
* Destructor
......
......@@ -45,7 +45,7 @@ namespace campvis {
* \param viewportSizeProp Pointer to the property defining the viewport size, must not be 0.
* \param raycaster Raycaster to use for rendering, must not be 0, VolumeRenderer will take ownership.
**/
PredicateVolumeExplorer(IVec2Property* viewportSizeProp);
explicit PredicateVolumeExplorer(IVec2Property* viewportSizeProp);
/**
* Destructor
......
......@@ -54,7 +54,7 @@ namespace campvis {
/**
* Constructs a new ScanlineDistributionComputation Processor
**/
ScanlineDistributionComputation(IVec2Property* viewportSizeProp);
explicit ScanlineDistributionComputation(IVec2Property* viewportSizeProp);
/**
* Destructor
......
......@@ -60,7 +60,7 @@ namespace campvis {
/**
* Constructs a new TrackballCameraProvider Processor
**/
TrackballCameraProvider(IVec2Property* canvasSize);
explicit TrackballCameraProvider(IVec2Property* canvasSize);
/**
* Destructor
......
......@@ -36,7 +36,7 @@ namespace campvis {
/**
* Creates a AutoEvaluationPipeline.
*/
StreamingMhdDemo(DataContainer* dc);
explicit StreamingMhdDemo(DataContainer* dc);
/**
* Virtual Destructor
......
......@@ -50,7 +50,7 @@ namespace campvis {
/**
* Creates a AutoEvaluationPipeline.
*/
CudaConfidenceMapsDemo(DataContainer *dc);
explicit CudaConfidenceMapsDemo(DataContainer *dc);
/**
* Virtual Destructor
......
......@@ -46,7 +46,7 @@ namespace campvis {
/**
* Constructs a new UsFanRenderer Processor
**/
UsFanRenderer(IVec2Property* viewportSizeProp);
explicit UsFanRenderer(IVec2Property* viewportSizeProp);
/**
* Destructor
......
......@@ -58,7 +58,7 @@ namespace dti {
/**
* Constructs a new FiberRenderer Processor
**/
FiberRenderer(IVec2Property* viewportSizeProp);
explicit FiberRenderer(IVec2Property* viewportSizeProp);
/**
* Destructor
......
......@@ -39,7 +39,7 @@ namespace fontrendering {
/**
* Creates a AutoEvaluationPipeline.
*/
FontRenderingDemo(DataContainer* dc);
explicit FontRenderingDemo(DataContainer* dc);
/**
* Virtual Destructor
......
......@@ -45,7 +45,7 @@ namespace fontrendering {
/**
* Constructs a new TextRenderer Processor.
**/
TextRenderer(IVec2Property* viewportSizeProp);
explicit TextRenderer(IVec2Property* viewportSizeProp);
/**
* Destructor
......
......@@ -43,7 +43,7 @@
namespace campvis {
namespace {
struct checkExtension {
checkExtension(const std::string& str) : _str(str) {}
explicit checkExtension(const std::string& str) : _str(str) {}
bool operator()(const std::pair<AbstractImageReader*, MetaProperty*>& v) const {
return v.first->acceptsExtension(this->_str);
......
......@@ -31,7 +31,6 @@
#include "modules/itk/core/itktypetraits.h"
#include <itkImage.h>
#include <itkImportImageFilter.h>
#include <cstring> // needed for memcpy
......
......@@ -36,6 +36,8 @@
#include "modules/itk/core/genericimagerepresentationitk.h"
#include <itkImportImageFilter.h>
namespace campvis {
// = Declare converter classes ====================================================================
......
......@@ -41,7 +41,7 @@ namespace campvis {
/**
* Creates a AutoEvaluationPipeline.
*/
ItkFilterDemo(DataContainer* dc);
explicit ItkFilterDemo(DataContainer* dc);
/**
* Virtual Destructor
......
......@@ -41,7 +41,7 @@ namespace campvis {
/**
* Creates a AutoEvaluationPipeline.
*/
ItkRegistrationDemo(DataContainer* dc);
explicit ItkRegistrationDemo(DataContainer* dc);
/**
* Virtual Destructor
......
......@@ -40,7 +40,7 @@ namespace campvis {
/**
* Creates a AutoEvaluationPipeline.
*/
ItkSegmentationDemo(DataContainer* dc);
explicit ItkSegmentationDemo(DataContainer* dc);
/**
* Virtual Destructor
......
......@@ -44,7 +44,7 @@ namespace campvis {
/**
* Constructs a new ItkSegmentation Processor
**/
ItkSegmentation(IVec2Property* viewportSizeProp);
explicit ItkSegmentation(IVec2Property* viewportSizeProp);
/**
* Destructor
......
......@@ -43,7 +43,7 @@ namespace campvis {
/**
* Creates a AutoEvaluationPipeline.
*/
IvusTcDemo(DataContainer* dc);
explicit IvusTcDemo(DataContainer* dc);
/**
* Virtual Destructor
......
......@@ -41,7 +41,7 @@ namespace campvis {
/**
* Constructs a new IvusBatchReader Processor
**/
IvusBatchReader(IVec2Property* viewportSizeProp);
explicit IvusBatchReader(IVec2Property* viewportSizeProp);
/**
* Destructor
......
......@@ -47,7 +47,7 @@ namespace campvis {
/**
* Constructs a new IvusTcRaycaster Processor
**/
IvusTcRaycaster(IVec2Property* viewportSizeProp);
explicit IvusTcRaycaster(IVec2Property* viewportSizeProp);
/**
* Destructor
......
......@@ -38,7 +38,7 @@ namespace campvis {
/**
* Constructs a new IvusTcSliceExtractor Processor
**/
IvusTcSliceExtractor(IVec2Property* viewportSizeProp);
explicit IvusTcSliceExtractor(IVec2Property* viewportSizeProp);
/**
* Destructor
......
......@@ -52,7 +52,7 @@ namespace campvis {
/**
* Creates a AutoEvaluationPipeline.
*/
IxpvDemo(DataContainer* dc);
explicit IxpvDemo(DataContainer* dc);
/**
* Virtual Destructor
......
......@@ -49,7 +49,7 @@ namespace campvis {
/**
* Constructs a new IxpvCompositor Processor
**/
IxpvCompositor(IVec2Property* viewportSizeProp);
explicit IxpvCompositor(IVec2Property* viewportSizeProp);
/**
* Destructor
......
......@@ -41,7 +41,7 @@ namespace campvis {
/**
* Creates a AutoEvaluationPipeline.
*/
MicroscopyImageSegmentationDemo(DataContainer* dc);
explicit MicroscopyImageSegmentationDemo(DataContainer* dc);
/**
* Virtual Destructor
......
......@@ -58,7 +58,7 @@ namespace campvis {
*/
class CAMPVIS_MODULES_API ContourObject {
public:
ContourObject(std::string name);
explicit ContourObject(std::string name);
virtual ~ContourObject();
ContourObject& operator=(const ContourObject& rhs);