From 4826c14bce41b867353b03be8d76a7bff6570831 Mon Sep 17 00:00:00 2001 From: Jakob Weiss Date: Wed, 13 Dec 2017 23:35:05 +0100 Subject: [PATCH] Fixed a truckload of warnings - Lots of missing override definitions - some virtual overloaded function hiding warnings - class initializer list order --- .../gui/datacontainerinspectorcanvas.cpp | 2 +- .../gui/properties/abstractpropertywidget.cpp | 4 +- .../gui/properties/boolpropertywidget.h | 2 +- .../gui/properties/buttonpropertywidget.h | 2 +- .../gui/properties/colorpropertywidget.h | 2 +- .../gui/properties/datanamepropertywidget.h | 2 +- .../gui/properties/floatpropertywidget.h | 4 +- .../geometry1dtransferfunctioneditor.h | 10 ++--- .../geometry2dtransferfunctioneditor.h | 10 ++--- .../gui/properties/intpropertywidget.h | 4 +- .../gui/properties/metapropertywidget.h | 2 +- .../gui/properties/optionpropertywidget.h | 2 +- .../properties/simpletransferfunctioneditor.h | 2 +- .../gui/properties/statuspropertywidget.h | 2 +- .../gui/properties/stringpropertywidget.h | 2 +- .../transferfunctionpropertywidget.h | 2 +- cmake/commonconf.cmake | 2 +- core/pipeline/abstractpipeline.cpp | 2 +- core/pipeline/abstractprocessor.h | 2 +- core/pipeline/autoevaluationpipeline.h | 2 +- core/pipeline/pipelinepainter.h | 8 ++-- core/pipeline/visualizationprocessor.cpp | 2 +- core/pipeline/visualizationprocessor.h | 6 +-- ext/cgt/gltextureformattraits.cpp | 6 --- ext/cgt/gltextureformattraits.h | 4 +- ext/cgt/qt/qtcanvas.h | 42 +++++++++---------- ext/cgt/runnable.cpp | 2 +- ext/cgt/texturemanager.cpp | 8 ++-- .../localambientocclusiondecorator.cpp | 2 +- .../processors/ambientvolumegenerator.cpp | 2 +- .../processors/ambientvolumegenerator.h | 12 +++--- .../processors/tfpreintegrator.cpp | 2 +- .../processors/tfpreintegrator.h | 12 +++--- .../pointpredicatehistogrampropertywidget.h | 2 +- modules/fontrendering/tools/fontatlas.cpp | 2 +- .../preprocessing/processors/medianfilter.h | 12 +++--- .../RandomWalksLib/SparseSolverInterface.h | 1 + modules/vis/processors/ipsviraycaster.h | 16 +++---- 38 files changed, 100 insertions(+), 103 deletions(-) diff --git a/application/gui/datacontainerinspectorcanvas.cpp b/application/gui/datacontainerinspectorcanvas.cpp index 74993d88..c41331e2 100644 --- a/application/gui/datacontainerinspectorcanvas.cpp +++ b/application/gui/datacontainerinspectorcanvas.cpp @@ -313,7 +313,7 @@ namespace campvis { lookupTexelFloat /= (ratioRatio > 1) ? cgt::vec2(1.f, 1.f / ratioRatio) : cgt::vec2(ratioRatio, 1.f); cgt::svec3 lookupTexel(lookupTexelFloat.x, imageSize.y - lookupTexelFloat.y, 0); - if (lookupTexel.x >= 0 && lookupTexel.y >= 0 && lookupTexel.x < imageSize.x && lookupTexel.y < imageSize.y) { + if (lookupTexel.x < imageSize.x && lookupTexel.y < imageSize.y) { if (tex->isDepthTexture()) { emit s_depthChanged(lookupTexel, localRep->getElementNormalized(lookupTexel, 0)); } diff --git a/application/gui/properties/abstractpropertywidget.cpp b/application/gui/properties/abstractpropertywidget.cpp index 86488feb..c86c509a 100644 --- a/application/gui/properties/abstractpropertywidget.cpp +++ b/application/gui/properties/abstractpropertywidget.cpp @@ -34,9 +34,11 @@ namespace campvis { : QWidget(parent) , _property(property) , _dataContainer(dataContainer) - , _layout(nullptr) , _groupBox(nullptr) , _groupBoxInner(nullptr) + , _ignorePropertyUpdates(false) + , _layout(nullptr) + , _titleLabel(nullptr) { _ignorePropertyUpdates = 0; diff --git a/application/gui/properties/boolpropertywidget.h b/application/gui/properties/boolpropertywidget.h index 6907af6a..0ec9fd50 100644 --- a/application/gui/properties/boolpropertywidget.h +++ b/application/gui/properties/boolpropertywidget.h @@ -55,7 +55,7 @@ namespace campvis { /** * Gets called when the property has changed, so that widget can update its state. */ - virtual void updateWidgetFromProperty(); + virtual void updateWidgetFromProperty() override; private slots: void onStateChanged(int value); diff --git a/application/gui/properties/buttonpropertywidget.h b/application/gui/properties/buttonpropertywidget.h index 70c6bd48..afd72ffa 100644 --- a/application/gui/properties/buttonpropertywidget.h +++ b/application/gui/properties/buttonpropertywidget.h @@ -56,7 +56,7 @@ namespace campvis { /** * Gets called when the property has changed, so that widget can update its state. */ - virtual void updateWidgetFromProperty(); + virtual void updateWidgetFromProperty() override; protected slots: void onButtonClicked(bool); diff --git a/application/gui/properties/colorpropertywidget.h b/application/gui/properties/colorpropertywidget.h index ddae8122..828f2f16 100644 --- a/application/gui/properties/colorpropertywidget.h +++ b/application/gui/properties/colorpropertywidget.h @@ -60,7 +60,7 @@ namespace campvis { /** * Gets called when the property has changed, so that widget can update its state. */ - virtual void updateWidgetFromProperty(); + virtual void updateWidgetFromProperty() override; private slots: /// Slot getting called when the adjuster's value changes diff --git a/application/gui/properties/datanamepropertywidget.h b/application/gui/properties/datanamepropertywidget.h index a3a7c688..4feb21a6 100644 --- a/application/gui/properties/datanamepropertywidget.h +++ b/application/gui/properties/datanamepropertywidget.h @@ -62,7 +62,7 @@ namespace campvis { /** * Gets called when the property has changed, so that widget can update its state. */ - virtual void updateWidgetFromProperty(); + virtual void updateWidgetFromProperty() override; void onDataAdded(std::string key, DataHandle dh); diff --git a/application/gui/properties/floatpropertywidget.h b/application/gui/properties/floatpropertywidget.h index ffe7d52c..5b66e5fd 100644 --- a/application/gui/properties/floatpropertywidget.h +++ b/application/gui/properties/floatpropertywidget.h @@ -54,7 +54,7 @@ namespace campvis { /** * Gets called when the property has changed, so that widget can update its state. */ - virtual void updateWidgetFromProperty(); + virtual void updateWidgetFromProperty() override; private slots: /// Slot getting called when the adjuster's value changes @@ -131,7 +131,7 @@ namespace campvis { /** * Gets called when the property has changed, so that widget can update its state. */ - virtual void updateWidgetFromProperty(); + virtual void updateWidgetFromProperty() override; void onValueChangedImpl(); diff --git a/application/gui/properties/geometry1dtransferfunctioneditor.h b/application/gui/properties/geometry1dtransferfunctioneditor.h index 8122837a..0f9e0531 100644 --- a/application/gui/properties/geometry1dtransferfunctioneditor.h +++ b/application/gui/properties/geometry1dtransferfunctioneditor.h @@ -70,13 +70,13 @@ namespace campvis { /** * Schedule a repaint job for the editor's render target */ - virtual void repaint(); + virtual void repaint() override; /// \see cgt::Painter::sizeChanged - virtual void sizeChanged(const cgt::ivec2&); + virtual void sizeChanged(const cgt::ivec2&) override; /// \see cgt::EventListener::mousePressEvent - virtual void mousePressEvent(cgt::MouseEvent* e); + virtual void mousePressEvent(cgt::MouseEvent* e) override; /** * Slot to be called when the geometry vector of the transfer function has changed. @@ -141,12 +141,12 @@ namespace campvis { /** * Performs the painting. */ - virtual void paint(); + virtual void paint() override; /** * Gets called when the property has changed, so that widget can update its state. */ - virtual void updateWidgetFromProperty(); + virtual void updateWidgetFromProperty() override; /** * Updates the GeometryManipulator vector. diff --git a/application/gui/properties/geometry2dtransferfunctioneditor.h b/application/gui/properties/geometry2dtransferfunctioneditor.h index 0312d4b2..41d970a5 100644 --- a/application/gui/properties/geometry2dtransferfunctioneditor.h +++ b/application/gui/properties/geometry2dtransferfunctioneditor.h @@ -69,13 +69,13 @@ namespace campvis { /** * Schedule a repaint job for the editor's render target */ - virtual void repaint(); + virtual void repaint() override; /// \see cgt::Painter::sizeChanged - virtual void sizeChanged(const cgt::ivec2&); + virtual void sizeChanged(const cgt::ivec2&) override; /// \see cgt::EventListener::mousePressEvent - virtual void mousePressEvent(cgt::MouseEvent* e); + virtual void mousePressEvent(cgt::MouseEvent* e) override; /** * Slot to be called when the geometry vector of the transfer function has changed. @@ -113,12 +113,12 @@ namespace campvis { /** * Performs the painting. */ - virtual void paint(); + virtual void paint() override; /** * Gets called when the property has changed, so that widget can update its state. */ - virtual void updateWidgetFromProperty(); + virtual void updateWidgetFromProperty() override; /** * Updates the GeometryManipulator vector. diff --git a/application/gui/properties/intpropertywidget.h b/application/gui/properties/intpropertywidget.h index 2dd1df59..610d39bd 100644 --- a/application/gui/properties/intpropertywidget.h +++ b/application/gui/properties/intpropertywidget.h @@ -58,7 +58,7 @@ namespace campvis { /** * Gets called when the property has changed, so that widget can update its state. */ - virtual void updateWidgetFromProperty(); + virtual void updateWidgetFromProperty() override; private slots: void onValueChanged(int value); @@ -137,7 +137,7 @@ namespace campvis { /** * Gets called when the property has changed, so that widget can update its state. */ - virtual void updateWidgetFromProperty(); + virtual void updateWidgetFromProperty() override; void onValueChangedImpl(); diff --git a/application/gui/properties/metapropertywidget.h b/application/gui/properties/metapropertywidget.h index f5f8a2f9..41381e11 100644 --- a/application/gui/properties/metapropertywidget.h +++ b/application/gui/properties/metapropertywidget.h @@ -60,7 +60,7 @@ namespace campvis { /** * Gets called when the property has changed, so that widget can update its state. */ - virtual void updateWidgetFromProperty(); + virtual void updateWidgetFromProperty() override; protected slots: /// \see AbstractPropertyWidget::onGroupBoxToggled diff --git a/application/gui/properties/optionpropertywidget.h b/application/gui/properties/optionpropertywidget.h index 52ea3b82..8e82b7af 100644 --- a/application/gui/properties/optionpropertywidget.h +++ b/application/gui/properties/optionpropertywidget.h @@ -59,7 +59,7 @@ namespace campvis { /** * Gets called when the property has changed, so that widget can update its state. */ - virtual void updateWidgetFromProperty(); + virtual void updateWidgetFromProperty() override; private slots: void onComboBoxIndexChanged(int value); diff --git a/application/gui/properties/simpletransferfunctioneditor.h b/application/gui/properties/simpletransferfunctioneditor.h index 27a7044e..8540303f 100644 --- a/application/gui/properties/simpletransferfunctioneditor.h +++ b/application/gui/properties/simpletransferfunctioneditor.h @@ -61,7 +61,7 @@ namespace campvis { /** * Gets called when the property has changed, so that widget can update its state. */ - virtual void updateWidgetFromProperty(); + virtual void updateWidgetFromProperty() override; private slots: void onLeftColorChanged(const QColor& color); diff --git a/application/gui/properties/statuspropertywidget.h b/application/gui/properties/statuspropertywidget.h index 8be30286..e9ccdf89 100644 --- a/application/gui/properties/statuspropertywidget.h +++ b/application/gui/properties/statuspropertywidget.h @@ -55,7 +55,7 @@ namespace campvis { /** * Gets called when the property has changed, so that widget can update its state. */ - virtual void updateWidgetFromProperty(); + virtual void updateWidgetFromProperty() override; private: static const char* baseStyle; diff --git a/application/gui/properties/stringpropertywidget.h b/application/gui/properties/stringpropertywidget.h index 491e963a..3c11db23 100644 --- a/application/gui/properties/stringpropertywidget.h +++ b/application/gui/properties/stringpropertywidget.h @@ -60,7 +60,7 @@ namespace campvis { /** * Gets called when the property has changed, so that widget can update its state. */ - virtual void updateWidgetFromProperty(); + virtual void updateWidgetFromProperty() override; private slots: void onTextChanged(const QString& text); diff --git a/application/gui/properties/transferfunctionpropertywidget.h b/application/gui/properties/transferfunctionpropertywidget.h index 67784a46..04fb961c 100644 --- a/application/gui/properties/transferfunctionpropertywidget.h +++ b/application/gui/properties/transferfunctionpropertywidget.h @@ -64,7 +64,7 @@ namespace campvis { /** * Gets called when the property has changed, so that widget can update its state. */ - virtual void updateWidgetFromProperty(); + virtual void updateWidgetFromProperty() override; /** * Slot to be called from property when the property's flag whether to auto fit the TF window has changed. diff --git a/cmake/commonconf.cmake b/cmake/commonconf.cmake index 2bcce920..83908705 100644 --- a/cmake/commonconf.cmake +++ b/cmake/commonconf.cmake @@ -178,7 +178,7 @@ IF(WIN32) ELSEIF(UNIX) LIST(APPEND CampvisGlobalDefinitions "-DUNIX") - LIST(APPEND CampvisGlobalDefinitions "-Wall -Wno-unused-local-typedefs -Wno-unused-variable -Wno-unknown-pragmas") + LIST(APPEND CampvisGlobalDefinitions "-Wall -Wno-unused-local-typedefs -Wno-unused-variable -Wno-unknown-pragmas -Wno-overloaded-virtual") LIST(APPEND CampvisGlobalDefinitions "-D__STDC_CONSTANT_MACROS") # dangerous! diff --git a/core/pipeline/abstractpipeline.cpp b/core/pipeline/abstractpipeline.cpp index 7c7e6b58..87a7f8ac 100644 --- a/core/pipeline/abstractpipeline.cpp +++ b/core/pipeline/abstractpipeline.cpp @@ -44,12 +44,12 @@ namespace campvis { : HasPropertyCollection() , cgt::EventHandler() , cgt::EventListener() + , p_showFullscreen("ShowFullscreen", "Show Fullscreen", false) , _dataContainer(&dc) , _canvas(0) , _canvasSize("CanvasSize", "Canvas Size", cgt::ivec2(128, 128), cgt::ivec2(1, 1), cgt::ivec2(4096, 4096)) , _ignoreCanvasSizeUpdate(false) , _renderTargetID("renderTargetID", "Render Target ID", "AbstractPipeline.renderTarget", DataNameProperty::READ) - , p_showFullscreen("ShowFullscreen", "Show Fullscreen", false) { cgtAssert(_dataContainer != nullptr, "Pointer to the DataContainer for this pipeline must not be 0!"); diff --git a/core/pipeline/abstractprocessor.h b/core/pipeline/abstractprocessor.h index 160d7efc..73e3d9df 100644 --- a/core/pipeline/abstractprocessor.h +++ b/core/pipeline/abstractprocessor.h @@ -395,7 +395,7 @@ namespace campvis { * Slot getting called when one of the observed properties changed and notifies its observers. * \param prop Property that emitted the signal */ - virtual void onPropertyChanged(const AbstractProperty* prop); + virtual void onPropertyChanged(const AbstractProperty* prop) override; tbb::atomic _enabled; ///< flag whether this processor is currently enabled tbb::atomic _clockExecutionTime; ///< flag whether to measure the execution time of this processor diff --git a/core/pipeline/autoevaluationpipeline.h b/core/pipeline/autoevaluationpipeline.h index 6dd83c04..e8cc0ca4 100644 --- a/core/pipeline/autoevaluationpipeline.h +++ b/core/pipeline/autoevaluationpipeline.h @@ -95,7 +95,7 @@ namespace campvis { * \param name Name of the added data. * \param dh DataHandle to the newly added data. */ - virtual void onDataContainerDataAdded(std::string name, DataHandle dh); + virtual void onDataContainerDataAdded(std::string name, DataHandle dh) override; /** * Callback when a property was added to one of the PropertyCollections. diff --git a/core/pipeline/pipelinepainter.h b/core/pipeline/pipelinepainter.h index 566d1076..631362af 100644 --- a/core/pipeline/pipelinepainter.h +++ b/core/pipeline/pipelinepainter.h @@ -55,15 +55,15 @@ namespace campvis { /** * Schedule a repaint job for the pipeline's render target */ - virtual void repaint(); + virtual void repaint() override; /// \see cgt::Painter::sizeChanged - virtual void sizeChanged(const cgt::ivec2& size); + virtual void sizeChanged(const cgt::ivec2& size) override; /** * Initializes the painter, i.e. loads the OpenGL shader. */ - virtual void init(); + virtual void init() override; /** * Deinitializes the painter, i.e. disposes its shader. @@ -83,7 +83,7 @@ namespace campvis { /** * Performs the actual rendering of the pipeline's render target */ - virtual void paint(); + virtual void paint() override; static const std::string loggerCat_; diff --git a/core/pipeline/visualizationprocessor.cpp b/core/pipeline/visualizationprocessor.cpp index 3e1d1dbf..566be96e 100644 --- a/core/pipeline/visualizationprocessor.cpp +++ b/core/pipeline/visualizationprocessor.cpp @@ -83,7 +83,7 @@ namespace campvis { cgt::Texture* tex = nullptr; if (renderData) { // check if we can get a GL representation of the desired texture - ImageRepresentationGL* glRep; + ImageRepresentationGL* glRep = nullptr; if (attachment == GL_DEPTH_ATTACHMENT) { if(auto id = (*renderData)->getDepthTexture()) glRep = const_cast(id->getRepresentation(false)); diff --git a/core/pipeline/visualizationprocessor.h b/core/pipeline/visualizationprocessor.h index f00aed61..afbeca09 100644 --- a/core/pipeline/visualizationprocessor.h +++ b/core/pipeline/visualizationprocessor.h @@ -64,8 +64,8 @@ namespace campvis { * \param vp This Visualization processor (usually pointer to this). */ explicit FramebufferActivationGuard(VisualizationProcessor* vp) - : _parentProcessor(vp) - , _fbo(vp->_fbo) + : //_parentProcessor(vp) + _fbo(vp->_fbo) { cgtAssert(_fbo != nullptr, "FBO must not be 0."); cgtAssert(_fbo->getId() != 0, "The FBO's OpenGL ID is 0, this is wrong."); @@ -85,7 +85,7 @@ namespace campvis { private: - VisualizationProcessor* _parentProcessor; + //VisualizationProcessor* _parentProcessor; cgt::FramebufferObject* _fbo; }; diff --git a/ext/cgt/gltextureformattraits.cpp b/ext/cgt/gltextureformattraits.cpp index 0cd1bb3c..6e2cbeae 100644 --- a/ext/cgt/gltextureformattraits.cpp +++ b/ext/cgt/gltextureformattraits.cpp @@ -28,12 +28,6 @@ #include "gltextureformattraits.h" -#pragma once - -#include - -#include - namespace cgt { #define defFormat(INTERNAL_FORMAT, BPP, CHANNELS, PIXEL_FORMAT, PIXEL_DATA_TYPE, GLSL_FORMAT_QUALIFIER) \ diff --git a/ext/cgt/gltextureformattraits.h b/ext/cgt/gltextureformattraits.h index 846e0774..08539665 100644 --- a/ext/cgt/gltextureformattraits.h +++ b/ext/cgt/gltextureformattraits.h @@ -58,8 +58,8 @@ public: /// Constructor for known formats constexpr GLTextureFormatTraits(GLint internalFormat__, const char* internalFormatName__, int bpp__, int channels__, GLint pixelFormat__, GLint pixelDataType__, const char* glslFormatQualifier__) - : internalFormatName_{ internalFormatName__ } - , known_{ true } + : known_{ true } + , internalFormatName_{ internalFormatName__ } , bpp_{ bpp__ } , channels_{ channels__ } , internalFormat_{ internalFormat__ } diff --git a/ext/cgt/qt/qtcanvas.h b/ext/cgt/qt/qtcanvas.h index 63fda56a..7f86e6d4 100644 --- a/ext/cgt/qt/qtcanvas.h +++ b/ext/cgt/qt/qtcanvas.h @@ -79,7 +79,7 @@ public: * Called by the Qt framework once at the beginning, before rendering starts. * This function calls the corresponding GLCanvas method \a initialize. */ - virtual void initializeGL(); + virtual void initializeGL() override; /** * This is called by the Qt framework every time the canvas is resized. @@ -88,7 +88,7 @@ public: * @param w The new width of the canvas. * @param h The new height of the canvas. */ - virtual void resizeGL(int w, int h); + virtual void resizeGL(int w, int h) override; /* * Return the recommended size for the canvas. @@ -96,49 +96,49 @@ public: * This method is called by Qt to determine how much space to allocate to display the canvas. * The returned size is the same as reported by getSize(). */ - virtual QSize sizeHint() const; + virtual QSize sizeHint() const override; - virtual void setSize(ivec2 newSize); + virtual void setSize(ivec2 newSize) override; /** * Called by Qt if there is a paint event; it uses the \a painter_ to paint() something. */ - virtual void paintGL(); + virtual void paintGL() override; /** * If you manually want to cause a paint-event, use this function. It will call paintGL() * via updateGL(). This will cause immediate repainting. */ - virtual void repaint(); + virtual void repaint() override; /** * If you manually want to cause a paint-event, use this function. It will call QWidget::update() * and repaint when entering main loop next time. */ - virtual void update(); + virtual void update() override; /// Acqures this canvas as current context - virtual void acquireAsCurrentContext(); + virtual void acquireAsCurrentContext() override; /// Releases this canvas as current context - virtual void releaseAsCurrentContext(); + virtual void releaseAsCurrentContext() override; /// swap buffers - virtual void swap(); + virtual void swap() override; - virtual void toggleFullScreen(); + virtual void toggleFullScreen() override; - virtual void enterEvent(QEvent* e); - virtual void leaveEvent(QEvent* e); - virtual void mousePressEvent(QMouseEvent* e); - virtual void mouseReleaseEvent (QMouseEvent* e); - virtual void mouseMoveEvent(QMouseEvent* e); - virtual void mouseDoubleClickEvent(QMouseEvent* e); - virtual void wheelEvent(QWheelEvent* e); - virtual void timerEvent(QTimerEvent* e); + virtual void enterEvent(QEvent* e) override; + virtual void leaveEvent(QEvent* e) override; + virtual void mousePressEvent(QMouseEvent* e) override; + virtual void mouseReleaseEvent (QMouseEvent* e) override; + virtual void mouseMoveEvent(QMouseEvent* e) override; + virtual void mouseDoubleClickEvent(QMouseEvent* e) override; + virtual void wheelEvent(QWheelEvent* e) override; + virtual void timerEvent(QTimerEvent* e) override; - virtual void keyPressEvent(QKeyEvent* event); - virtual void keyReleaseEvent(QKeyEvent* event); + virtual void keyPressEvent(QKeyEvent* event) override; + virtual void keyReleaseEvent(QKeyEvent* event) override; /// /// Helpers used to generate cgt-Events out of qt-Events diff --git a/ext/cgt/runnable.cpp b/ext/cgt/runnable.cpp index ce0baf3e..448c2ecf 100644 --- a/ext/cgt/runnable.cpp +++ b/ext/cgt/runnable.cpp @@ -50,8 +50,8 @@ namespace cgt { Runnable::Runnable(const std::string& threadName /*= ""*/) : _stopExecution() - , _thread(0) , _threadName(threadName) + , _thread(0) { _initFunction = [] () {}; _deinitFunction = [] () {}; diff --git a/ext/cgt/texturemanager.cpp b/ext/cgt/texturemanager.cpp index d774a015..3c32827a 100644 --- a/ext/cgt/texturemanager.cpp +++ b/ext/cgt/texturemanager.cpp @@ -29,7 +29,7 @@ cgt::TextureManager::TextureManager() #ifdef ENABLE_TEXTURE_POOL // start the garbage collection thread start(); -#endif ENABLE_TEXTURE_POOl +#endif //ENABLE_TEXTURE_POOl } cgt::TextureManager::~TextureManager() @@ -38,7 +38,7 @@ cgt::TextureManager::~TextureManager() // stop the GC thread and clear the pool stop(); forceClearPool(); -#endif ENABLE_TEXTURE_POOL +#endif //ENABLE_TEXTURE_POOL cgtAssert(texturePool_.empty(), "Texture pool not empty at the end of texture manager's life!"); cgtAssert(activeAllocatedMemory_ == 0, "There are still Textures in use after the Texture Manager is destroyed! This most likely means you are leaking cgt::Texture instances!"); @@ -122,7 +122,7 @@ void cgt::TextureManager::forceGarbageCollection() std::lock_guard scope_lock(accessMutex_); performGarbageCollection(); -#endif ENABLE_TEXTURE_POOL +#endif //ENABLE_TEXTURE_POOL } void cgt::TextureManager::forceClearPool() @@ -131,7 +131,7 @@ void cgt::TextureManager::forceClearPool() std::lock_guard scope_lock(accessMutex_); clearPool(); -#endif ENABLE_TEXTURE_POOL +#endif //ENABLE_TEXTURE_POOL } GLuint cgt::TextureManager::generateId(GLenum type, const cgt::svec3 & dimensions, GLenum internalFormat) diff --git a/modules/advancedraycasting/decorators/localambientocclusiondecorator.cpp b/modules/advancedraycasting/decorators/localambientocclusiondecorator.cpp index 5a218a7f..a5c6c67c 100644 --- a/modules/advancedraycasting/decorators/localambientocclusiondecorator.cpp +++ b/modules/advancedraycasting/decorators/localambientocclusiondecorator.cpp @@ -39,8 +39,8 @@ namespace campvis { , p_aoRays("AORays", "Number of directional samples", 8, 0, 50) , p_aoSamples("AOSamples", "Number of Samples per ray (controls size of AO sphere)", 10, 0, 80) , p_aoSphereRadius("AOSphereRadius", "AO Sphere Radius [voxels]", 8.0f, 0.1f, 50.0f, 0.25f) - , p_aoOpacityScale("OpacityScale", "Opacity Scaling", 1.0f, 0.0f, 5.f) , p_aoEffectGamma("AOEffectGamma", "AO Scale Gamma", 1.0f, .0f, 5.f) + , p_aoOpacityScale("OpacityScale", "Opacity Scaling", 1.0f, 0.0f, 5.f) , p_aoEmissiveTransferFunction("AOTransferFunction", "Emissive Transfer Function", new Geometry1DTransferFunction(128)) , p_aoEmissiveScale("EmissiveScale", "Emissive Color Scaling", 1.0f, 0.0f, 10.f) { diff --git a/modules/advancedraycasting/processors/ambientvolumegenerator.cpp b/modules/advancedraycasting/processors/ambientvolumegenerator.cpp index 170c2fb7..42773f4f 100644 --- a/modules/advancedraycasting/processors/ambientvolumegenerator.cpp +++ b/modules/advancedraycasting/processors/ambientvolumegenerator.cpp @@ -52,8 +52,8 @@ namespace campvis { : AbstractProcessor() , p_inputImage("InputImage", "Input Image", "", DataNameProperty::READ) , p_outputImage("OutputImage", "Output Image", "AmbientIllinationVolume", DataNameProperty::WRITE) - , p_workgroupSize("WorkgroupSize", "Workgroup Size", cgt::ivec3(4, 4, 2), cgt::ivec3(1), cgt::ivec3(16)) , p_transferFunction("TransferFunction", "Transfer Function", new Geometry1DTransferFunction(256, cgt::vec2(0, 1))) + , p_workgroupSize("WorkgroupSize", "Workgroup Size", cgt::ivec3(4, 4, 2), cgt::ivec3(1), cgt::ivec3(16)) , _shader(nullptr) { addProperty(p_inputImage, INVALID_RESULT | INVALID_PROPERTIES); diff --git a/modules/advancedraycasting/processors/ambientvolumegenerator.h b/modules/advancedraycasting/processors/ambientvolumegenerator.h index 064a3046..a47269d6 100644 --- a/modules/advancedraycasting/processors/ambientvolumegenerator.h +++ b/modules/advancedraycasting/processors/ambientvolumegenerator.h @@ -61,22 +61,22 @@ namespace campvis { virtual ~AmbientVolumeGenerator(); /// \see AbstractProcessor::init - virtual void init(); + virtual void init() override; /// \see AbstractProcessor::deinit - virtual void deinit(); + virtual void deinit() override; /** * To be used in ProcessorFactory static methods */ static const std::string getId() { return "AmbientVolumeGenerator"; }; /// \see AbstractProcessor::getName() - virtual const std::string getName() const { return getId(); }; + virtual const std::string getName() const override { return getId(); }; /// \see AbstractProcessor::getDescription() - virtual const std::string getDescription() const { return "Precomputes an local ambient occlusion volume which stores ambient color + emission for each voxel."; }; + virtual const std::string getDescription() const override { return "Precomputes an local ambient occlusion volume which stores ambient color + emission for each voxel."; }; /// \see AbstractProcessor::getAuthor() - virtual const std::string getAuthor() const { return "Jakob Weiss "; }; + virtual const std::string getAuthor() const override { return "Jakob Weiss "; }; /// \see AbstractProcessor::getProcessorState() - virtual ProcessorState getProcessorState() const { return AbstractProcessor::TESTING; }; + virtual ProcessorState getProcessorState() const override { return AbstractProcessor::TESTING; }; DataNameProperty p_inputImage; ///< ID for input volume DataNameProperty p_outputImage; ///< ID for output gradient volume diff --git a/modules/advancedraycasting/processors/tfpreintegrator.cpp b/modules/advancedraycasting/processors/tfpreintegrator.cpp index 2d8af156..4f73f5d4 100644 --- a/modules/advancedraycasting/processors/tfpreintegrator.cpp +++ b/modules/advancedraycasting/processors/tfpreintegrator.cpp @@ -50,8 +50,8 @@ namespace campvis { : AbstractProcessor() , p_inputImage("InputImage", "Input Image", "", DataNameProperty::READ) , p_outputImage("OutputImage", "Output Image", "PreIntegratedVolume", DataNameProperty::WRITE) - , p_workgroupSize("WorkgroupSize", "Workgroup Size", cgt::ivec3(4, 4, 2), cgt::ivec3(1), cgt::ivec3(16)) , p_transferFunction("TransferFunction", "Transfer Function", new Geometry1DTransferFunction(256, cgt::vec2(0, 1))) + , p_workgroupSize("WorkgroupSize", "Workgroup Size", cgt::ivec3(4, 4, 2), cgt::ivec3(1), cgt::ivec3(16)) , _shader(nullptr) { addProperty(p_inputImage, INVALID_RESULT | INVALID_PROPERTIES); diff --git a/modules/advancedraycasting/processors/tfpreintegrator.h b/modules/advancedraycasting/processors/tfpreintegrator.h index 9258a349..dc90536c 100644 --- a/modules/advancedraycasting/processors/tfpreintegrator.h +++ b/modules/advancedraycasting/processors/tfpreintegrator.h @@ -61,22 +61,22 @@ namespace campvis { virtual ~TFPreIntegrator(); /// \see AbstractProcessor::init - virtual void init(); + virtual void init() override; /// \see AbstractProcessor::deinit - virtual void deinit(); + virtual void deinit() override; /** * To be used in ProcessorFactory static methods */ static const std::string getId() { return "TFPreIntegrator"; }; /// \see AbstractProcessor::getName() - virtual const std::string getName() const { return getId(); }; + virtual const std::string getName() const override { return getId(); }; /// \see AbstractProcessor::getDescription() - virtual const std::string getDescription() const { return "Transforms an intensity image with a transfer function, outputting an RGBA volume using OpenGL Compute Shaders."; }; + virtual const std::string getDescription() const override { return "Transforms an intensity image with a transfer function, outputting an RGBA volume using OpenGL Compute Shaders."; }; /// \see AbstractProcessor::getAuthor() - virtual const std::string getAuthor() const { return "Jakob Weiss "; }; + virtual const std::string getAuthor() const override { return "Jakob Weiss "; }; /// \see AbstractProcessor::getProcessorState() - virtual ProcessorState getProcessorState() const { return AbstractProcessor::TESTING; }; + virtual ProcessorState getProcessorState() const override { return AbstractProcessor::TESTING; }; DataNameProperty p_inputImage; ///< ID for input volume DataNameProperty p_outputImage; ///< ID for output gradient volume diff --git a/modules/advancedusvis/widgets/pointpredicatehistogrampropertywidget.h b/modules/advancedusvis/widgets/pointpredicatehistogrampropertywidget.h index d25f9709..6055fc2e 100644 --- a/modules/advancedusvis/widgets/pointpredicatehistogrampropertywidget.h +++ b/modules/advancedusvis/widgets/pointpredicatehistogrampropertywidget.h @@ -67,7 +67,7 @@ namespace campvis { /** * Gets called when the property has changed, so that widget can update its state. */ - virtual void updateWidgetFromProperty(); + virtual void updateWidgetFromProperty() override; protected slots: /// Slot called when the selected predicate has changed. diff --git a/modules/fontrendering/tools/fontatlas.cpp b/modules/fontrendering/tools/fontatlas.cpp index aff6f118..2e8fe1f7 100644 --- a/modules/fontrendering/tools/fontatlas.cpp +++ b/modules/fontrendering/tools/fontatlas.cpp @@ -159,7 +159,7 @@ namespace campvis { pos = cgt::vec2(position.x, pos.y - _height * 1.2f); } - if (p >= 32 && p < 256) { + if (p >= 32 /*&& p < 256*/) { cgt::vec2 pos2(pos.x + _glyphs[p].bitmapOffset.x, -pos.y - _glyphs[p].bitmapOffset.y); cgt::vec2 size = _glyphs[p].bitmapSize; diff --git a/modules/preprocessing/processors/medianfilter.h b/modules/preprocessing/processors/medianfilter.h index 3d91f7e0..d9fe7b84 100644 --- a/modules/preprocessing/processors/medianfilter.h +++ b/modules/preprocessing/processors/medianfilter.h @@ -59,22 +59,22 @@ namespace campvis { virtual ~MedianFilter(); /// \see AbstractProcessor::init - virtual void init(); + virtual void init() override; /// \see AbstractProcessor::deinit - virtual void deinit(); + virtual void deinit() override; /** * To be used in ProcessorFactory static methods */ static const std::string getId() { return "MedianFilter"; }; /// \see AbstractProcessor::getName() - virtual const std::string getName() const { return getId(); }; + virtual const std::string getName() const override { return getId(); }; /// \see AbstractProcessor::getDescription() - virtual const std::string getDescription() const { return "Performs a median filtering on the first channel of the input image using OpenGL Compute Shaders."; }; + virtual const std::string getDescription() const override { return "Performs a median filtering on the first channel of the input image using OpenGL Compute Shaders."; }; /// \see AbstractProcessor::getAuthor() - virtual const std::string getAuthor() const { return "Jakob Weiss "; }; + virtual const std::string getAuthor() const override { return "Jakob Weiss "; }; /// \see AbstractProcessor::getProcessorState() - virtual ProcessorState getProcessorState() const { return AbstractProcessor::TESTING; }; + virtual ProcessorState getProcessorState() const override { return AbstractProcessor::TESTING; }; DataNameProperty p_inputImage; ///< ID for input volume DataNameProperty p_outputImage; ///< ID for output gradient volume diff --git a/modules/randomwalk/ext/RandomWalksLib/SparseSolverInterface.h b/modules/randomwalk/ext/RandomWalksLib/SparseSolverInterface.h index 7c610da8..f4e6f93d 100644 --- a/modules/randomwalk/ext/RandomWalksLib/SparseSolverInterface.h +++ b/modules/randomwalk/ext/RandomWalksLib/SparseSolverInterface.h @@ -20,6 +20,7 @@ using namespace Eigen; class SparseSolverInterface { public: + virtual ~SparseSolverInterface() {}; /// Solver random walks system LuX=b, matrix returned as vector in column-major order virtual std::vector solve_Ax_b(SparseMatrix A, SparseVector b, int numel, std::vector & uidx, const std::vector * labels, const std::vector * seeds, int active_label) = 0; private: diff --git a/modules/vis/processors/ipsviraycaster.h b/modules/vis/processors/ipsviraycaster.h index 0cbc8e31..c9c0787b 100644 --- a/modules/vis/processors/ipsviraycaster.h +++ b/modules/vis/processors/ipsviraycaster.h @@ -45,7 +45,7 @@ namespace campvis { class VoxelHierarchyMapper; /** - * Raycaster that implements the Image Plane Sweep Volume Illumation algorithm of Sundén et al. + * Raycaster that implements the Image Plane Sweep Volume Illumation algorithm of Sund�n et al. * This raycasting processor supports real-time directional light shadowing and additionally * uses the VoxelHierarchyMapper for optimized entry-exit points. * @@ -73,18 +73,18 @@ namespace campvis { */ static const std::string getId() { return "IpsviRaycaster"; }; /// \see AbstractProcessor::getName() - virtual const std::string getName() const { return getId(); }; + virtual const std::string getName() const override { return getId(); }; /// \see AbstractProcessor::getDescription() - virtual const std::string getDescription() const { return "Raycaster that implements the Image Plane Sweep Volume Illumation algorithm of Sundén et al."; }; + virtual const std::string getDescription() const override { return "Raycaster that implements the Image Plane Sweep Volume Illumation algorithm of Sund�n et al."; }; /// \see AbstractProcessor::getAuthor() - virtual const std::string getAuthor() const { return "Christian Schulte zu Berge "; }; + virtual const std::string getAuthor() const override { return "Christian Schulte zu Berge "; }; /// \see AbstractProcessor::getProcessorState() - virtual ProcessorState getProcessorState() const { return AbstractProcessor::TESTING; }; + virtual ProcessorState getProcessorState() const override { return AbstractProcessor::TESTING; }; /// \see AbstractProcessor::init - virtual void init(); + virtual void init() override; /// \see AbstractProcessor::deinit - virtual void deinit(); + virtual void deinit() override; DataNameProperty p_lightId; ///< Name/ID for the LightSource to use IntProperty p_sweepLineWidth; ///< Width of the sweep line in pixels @@ -95,7 +95,7 @@ namespace campvis { /// \see RaycastingProcessor::updateResult() virtual void updateResult(DataContainer& data) override; /// \see RaycastingProcessor::processImpl() - virtual void processImpl(DataContainer& data, ImageRepresentationGL::ScopedRepresentation& image); + virtual void processImpl(DataContainer& data, ImageRepresentationGL::ScopedRepresentation& image) override; void processDirectional(DataContainer& data, ImageRepresentationGL::ScopedRepresentation& image, const CameraData& camera, const LightSourceData& light); void processPointLight(DataContainer& data, ImageRepresentationGL::ScopedRepresentation& image, const CameraData& camera, const LightSourceData& light); -- GitLab