Commit f765f3b4 authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

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
/**
......
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