From 94db751716dd2851f99b5c4c2981da1d1f4780f8 Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 2 Oct 2015 14:53:20 +0200 Subject: 6.11 --- wx+/graph.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'wx+/graph.h') diff --git a/wx+/graph.h b/wx+/graph.h index bafbe4eb..00b0b469 100644 --- a/wx+/graph.h +++ b/wx+/graph.h @@ -55,7 +55,7 @@ struct ContinuousCurveData : public CurveData virtual double getValue(double x) const = 0; private: - virtual void getPoints(double minX, double maxX, int pixelWidth, std::vector& points) const override; + void getPoints(double minX, double maxX, int pixelWidth, std::vector& points) const override; }; struct SparseCurveData : public CurveData @@ -66,19 +66,19 @@ struct SparseCurveData : public CurveData virtual Opt getGreaterEq(double x) const = 0; private: - virtual void getPoints(double minX, double maxX, int pixelWidth, std::vector& points) const override; + void getPoints(double minX, double maxX, int pixelWidth, std::vector& points) const override; bool addSteps_; }; struct ArrayCurveData : public SparseCurveData { virtual double getValue(size_t pos) const = 0; - virtual size_t getSize() const = 0; + virtual size_t getSize () const = 0; private: - virtual std::pair getRangeX() const override { const size_t sz = getSize(); return std::make_pair(0.0, sz == 0 ? 0.0 : sz - 1.0); } + std::pair getRangeX() const override { const size_t sz = getSize(); return std::make_pair(0.0, sz == 0 ? 0.0 : sz - 1.0); } - virtual Opt getLessEq(double x) const override + Opt getLessEq(double x) const override { const size_t sz = getSize(); const size_t pos = std::min(std::floor(x), sz - 1); //[!] expect unsigned underflow if empty! @@ -87,7 +87,7 @@ private: return NoValue(); } - virtual Opt getGreaterEq(double x) const override + Opt getGreaterEq(double x) const override { const size_t pos = std::max(std::ceil(x), 0); //[!] use std::max with signed type! if (pos < getSize()) @@ -100,8 +100,8 @@ struct VectorCurveData : public ArrayCurveData { std::vector& refData() { return data; } private: - virtual double getValue(size_t pos) const override { return pos < data.size() ? data[pos] : 0; } - virtual size_t getSize() const override { return data.size(); } + double getValue(size_t pos) const override { return pos < data.size() ? data[pos] : 0; } + size_t getSize() const override { return data.size(); } std::vector data; }; @@ -122,8 +122,8 @@ double nextNiceNumber(double blockSize); //round to next number which is conveni struct DecimalNumberFormatter : public LabelFormatter { - virtual double getOptimalBlockSize(double sizeProposed) const { return nextNiceNumber(sizeProposed); } - virtual wxString formatText(double value, double optimalBlockSize) const { return zen::numberTo(value); } + double getOptimalBlockSize(double sizeProposed ) const override { return nextNiceNumber(sizeProposed); } + wxString formatText (double value, double optimalBlockSize) const override { return zen::numberTo(value); } }; //------------------------------------------------------------------------------------------------------------ @@ -144,7 +144,7 @@ class GraphSelectEvent : public wxCommandEvent { public: GraphSelectEvent(const SelectionBlock& selBlock) : wxCommandEvent(wxEVT_GRAPH_SELECTION), selBlock_(selBlock) {} - virtual wxEvent* Clone() const { return new GraphSelectEvent(selBlock_); } + wxEvent* Clone() const override { return new GraphSelectEvent(selBlock_); } SelectionBlock getSelection() { return selBlock_; } -- cgit