From 7654fc11a6442e6ee2a463d6dee6458c0f53768f Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Fri, 15 Jun 2018 00:45:10 +0200 Subject: =?UTF-8?q?Run=20clang-tidy=E2=80=99s=20modernize-use-override=20p?= =?UTF-8?q?ass.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds the override specifier on all methods which override a virtual method, whether they were already virtual or missing this specifier. --- src/libnrtype/Layout-TNG-Scanline-Maker.h | 28 ++++++++++++++-------------- src/libnrtype/Layout-TNG.h | 6 +++--- 2 files changed, 17 insertions(+), 17 deletions(-) (limited to 'src/libnrtype') diff --git a/src/libnrtype/Layout-TNG-Scanline-Maker.h b/src/libnrtype/Layout-TNG-Scanline-Maker.h index 7c90ea8cc..786f44e51 100644 --- a/src/libnrtype/Layout-TNG-Scanline-Maker.h +++ b/src/libnrtype/Layout-TNG-Scanline-Maker.h @@ -92,27 +92,27 @@ class Layout::InfiniteScanlineMaker : public Layout::ScanlineMaker { public: InfiniteScanlineMaker(double initial_x, double initial_y, Layout::Direction block_progression); - virtual ~InfiniteScanlineMaker(); + ~InfiniteScanlineMaker() override; /** Returns a single infinite run at the current location */ - virtual std::vector makeScanline(Layout::FontMetrics const &line_height); + std::vector makeScanline(Layout::FontMetrics const &line_height) override; /** Increments the current y by the current line height */ - virtual void completeLine(); + void completeLine() override; - virtual double yCoordinate() + double yCoordinate() override {return _y;} /** Just changes y */ - virtual void setNewYCoordinate(double new_y); + void setNewYCoordinate(double new_y) override; /** Always true, but has to save the new height */ - virtual bool canExtendCurrentScanline(Layout::FontMetrics const &line_height); + bool canExtendCurrentScanline(Layout::FontMetrics const &line_height) override; /** Sets current line block height. Call before completeLine() to correct for actually used line height (in case some chunks with larger font-size rolled back). */ - virtual void setLineHeight(Layout::FontMetrics const &line_height); + void setLineHeight(Layout::FontMetrics const &line_height) override; private: double _x, _y; @@ -130,23 +130,23 @@ class Layout::ShapeScanlineMaker : public Layout::ScanlineMaker { public: ShapeScanlineMaker(Shape const *shape, Layout::Direction block_progression); - virtual ~ShapeScanlineMaker(); + ~ShapeScanlineMaker() override; - virtual std::vector makeScanline(Layout::FontMetrics const &line_height); + std::vector makeScanline(Layout::FontMetrics const &line_height) override; - virtual void completeLine(); + void completeLine() override; - virtual double yCoordinate(); + double yCoordinate() override; - virtual void setNewYCoordinate(double new_y); + void setNewYCoordinate(double new_y) override; /** never true */ - virtual bool canExtendCurrentScanline(Layout::FontMetrics const &line_height); + bool canExtendCurrentScanline(Layout::FontMetrics const &line_height) override; /** Sets current line block height. Call before completeLine() to correct for actually used line height (in case some chunks with larger font-size rolled back). */ - virtual void setLineHeight(Layout::FontMetrics const &line_height); + void setLineHeight(Layout::FontMetrics const &line_height) override; private: /** To generate scanlines for top-to-bottom text it is easiest if we diff --git a/src/libnrtype/Layout-TNG.h b/src/libnrtype/Layout-TNG.h index c8a7c21f0..c33d14630 100644 --- a/src/libnrtype/Layout-TNG.h +++ b/src/libnrtype/Layout-TNG.h @@ -703,8 +703,8 @@ private: Most of the members are copies of the values passed to appendText(). */ class InputStreamTextSource : public InputStreamItem { public: - virtual InputStreamItemType Type() {return TEXT_SOURCE;} - virtual ~InputStreamTextSource(); + InputStreamItemType Type() override {return TEXT_SOURCE;} + ~InputStreamTextSource() override; Glib::ustring const *text; /// owned by the caller Glib::ustring::const_iterator text_begin, text_end; int text_length; /// in characters, from text_start to text_end only @@ -734,7 +734,7 @@ private: appendControlCode(). */ class InputStreamControlCode : public InputStreamItem { public: - virtual InputStreamItemType Type() {return CONTROL_CODE;} + InputStreamItemType Type() override {return CONTROL_CODE;} TextControlCode code; double ascent; double descent; -- cgit v1.2.3