Commit 4826c14b authored by Jakob Weiss's avatar Jakob Weiss
Browse files

Fixed a truckload of warnings

- Lots of missing override definitions
- some virtual overloaded function hiding warnings
- class initializer list order
parent fd0884e8
......@@ -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));
}
......
......@@ -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;
......
......@@ -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);
......
......@@ -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);
......
......@@ -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
......
......@@ -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);
......
......@@ -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();
......
......@@ -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.
......
......@@ -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.
......
......@@ -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();
......
......@@ -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
......
......@@ -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);
......
......@@ -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);
......
......@@ -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;
......
......@@ -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);
......
......@@ -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.
......
......@@ -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!
......
......@@ -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!");
......
......@@ -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<bool> _enabled; ///< flag whether this processor is currently enabled
tbb::atomic<bool> _clockExecutionTime; ///< flag whether to measure the execution time of this processor
......
......@@ -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.
......
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