diff options
| author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2018-06-14 22:45:10 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marcjeanmougin@free.fr> | 2018-06-18 12:27:00 +0000 |
| commit | 7654fc11a6442e6ee2a463d6dee6458c0f53768f (patch) | |
| tree | 7eb16a57b879747842bb0401dfee7fb47cd16f95 /src/io | |
| parent | Fix build issue caused by f09962028d017896279b717a6621a4de772d1b4f on GTK+ <3... (diff) | |
| download | inkscape-7654fc11a6442e6ee2a463d6dee6458c0f53768f.tar.gz inkscape-7654fc11a6442e6ee2a463d6dee6458c0f53768f.zip | |
Run clang-tidy’s modernize-use-override pass.
This adds the override specifier on all methods which override a virtual
method, whether they were already virtual or missing this specifier.
Diffstat (limited to 'src/io')
| -rw-r--r-- | src/io/base64stream.h | 16 | ||||
| -rw-r--r-- | src/io/bufferstream.h | 16 | ||||
| -rw-r--r-- | src/io/gzipstream.h | 16 | ||||
| -rw-r--r-- | src/io/inkscapestream.h | 144 | ||||
| -rw-r--r-- | src/io/stringstream.h | 16 | ||||
| -rw-r--r-- | src/io/uristream.h | 32 | ||||
| -rw-r--r-- | src/io/xsltstream.h | 16 |
7 files changed, 128 insertions, 128 deletions
diff --git a/src/io/base64stream.h b/src/io/base64stream.h index 4bc99acac..697f64678 100644 --- a/src/io/base64stream.h +++ b/src/io/base64stream.h @@ -43,13 +43,13 @@ public: Base64InputStream(InputStream &sourceStream); - virtual ~Base64InputStream(); + ~Base64InputStream() override; - virtual int available(); + int available() override; - virtual void close(); + void close() override; - virtual int get(); + int get() override; private: @@ -82,13 +82,13 @@ public: Base64OutputStream(OutputStream &destinationStream); - virtual ~Base64OutputStream(); + ~Base64OutputStream() override; - virtual void close(); + void close() override; - virtual void flush(); + void flush() override; - virtual int put(gunichar ch); + int put(gunichar ch) override; /** * Sets the maximum line length for base64 output. If diff --git a/src/io/bufferstream.h b/src/io/bufferstream.h index af5580efb..e1b57252d 100644 --- a/src/io/bufferstream.h +++ b/src/io/bufferstream.h @@ -54,10 +54,10 @@ class BufferInputStream : public InputStream public: BufferInputStream(const std::vector<unsigned char> &sourceBuffer); - virtual ~BufferInputStream(); - virtual int available(); - virtual void close(); - virtual int get(); + ~BufferInputStream() override; + int available() override; + void close() override; + int get() override; private: const std::vector<unsigned char> &buffer; @@ -83,10 +83,10 @@ class BufferOutputStream : public OutputStream public: BufferOutputStream(); - virtual ~BufferOutputStream(); - virtual void close(); - virtual void flush(); - virtual int put(gunichar ch); + ~BufferOutputStream() override; + void close() override; + void flush() override; + int put(gunichar ch) override; virtual std::vector<unsigned char> &getBuffer() { return buffer; } diff --git a/src/io/gzipstream.h b/src/io/gzipstream.h index 390ec1225..1fc137b41 100644 --- a/src/io/gzipstream.h +++ b/src/io/gzipstream.h @@ -41,13 +41,13 @@ public: GzipInputStream(InputStream &sourceStream); - virtual ~GzipInputStream(); + ~GzipInputStream() override; - virtual int available(); + int available() override; - virtual void close(); + void close() override; - virtual int get(); + int get() override; private: @@ -92,13 +92,13 @@ public: GzipOutputStream(OutputStream &destinationStream); - virtual ~GzipOutputStream(); + ~GzipOutputStream() override; - virtual void close(); + void close() override; - virtual void flush(); + void flush() override; - virtual int put(gunichar ch); + int put(gunichar ch) override; private: diff --git a/src/io/inkscapestream.h b/src/io/inkscapestream.h index d19dbbe95..3537b8872 100644 --- a/src/io/inkscapestream.h +++ b/src/io/inkscapestream.h @@ -25,9 +25,9 @@ public: { reason = theReason; } StreamException(Glib::ustring &theReason) throw() { reason = theReason; } - virtual ~StreamException() throw() + ~StreamException() throw() override { } - char const *what() const throw() + char const *what() const throw() override { return reason.c_str(); } private: @@ -102,13 +102,13 @@ public: BasicInputStream(InputStream &sourceStream); - virtual ~BasicInputStream() {} + ~BasicInputStream() override {} - virtual int available(); + int available() override; - virtual void close(); + void close() override; - virtual int get(); + int get() override; protected: @@ -130,13 +130,13 @@ class StdInputStream : public InputStream { public: - int available() + int available() override { return 0; } - void close() + void close() override { /* do nothing */ } - int get() + int get() override { return getchar(); } }; @@ -206,13 +206,13 @@ public: BasicOutputStream(OutputStream &destinationStream); - virtual ~BasicOutputStream() {} + ~BasicOutputStream() override {} - virtual void close(); + void close() override; - virtual void flush(); + void flush() override; - virtual int put(gunichar ch); + int put(gunichar ch) override; protected: @@ -232,13 +232,13 @@ class StdOutputStream : public OutputStream { public: - void close() + void close() override { } - void flush() + void flush() override { } - int put(gunichar ch) + int put(gunichar ch) override {return putchar(ch); } }; @@ -324,53 +324,53 @@ public: BasicReader(Reader &sourceStream); - virtual ~BasicReader() {} + ~BasicReader() override {} - virtual int available(); + int available() override; - virtual void close(); + void close() override; - virtual gunichar get(); + gunichar get() override; - virtual Glib::ustring readLine(); + Glib::ustring readLine() override; - virtual Glib::ustring readWord(); + Glib::ustring readWord() override; /* Input formatting */ - virtual const Reader& readBool (bool& val ); - virtual const Reader& operator>> (bool& val ) + const Reader& readBool (bool& val ) override; + const Reader& operator>> (bool& val ) override { return readBool(val); } - virtual const Reader& readShort (short &val); - virtual const Reader& operator>> (short &val) + const Reader& readShort (short &val) override; + const Reader& operator>> (short &val) override { return readShort(val); } - virtual const Reader& readUnsignedShort (unsigned short &val); - virtual const Reader& operator>> (unsigned short &val) + const Reader& readUnsignedShort (unsigned short &val) override; + const Reader& operator>> (unsigned short &val) override { return readUnsignedShort(val); } - virtual const Reader& readInt (int &val); - virtual const Reader& operator>> (int &val) + const Reader& readInt (int &val) override; + const Reader& operator>> (int &val) override { return readInt(val); } - virtual const Reader& readUnsignedInt (unsigned int &val); - virtual const Reader& operator>> (unsigned int &val) + const Reader& readUnsignedInt (unsigned int &val) override; + const Reader& operator>> (unsigned int &val) override { return readUnsignedInt(val); } - virtual const Reader& readLong (long &val); - virtual const Reader& operator>> (long &val) + const Reader& readLong (long &val) override; + const Reader& operator>> (long &val) override { return readLong(val); } - virtual const Reader& readUnsignedLong (unsigned long &val); - virtual const Reader& operator>> (unsigned long &val) + const Reader& readUnsignedLong (unsigned long &val) override; + const Reader& operator>> (unsigned long &val) override { return readUnsignedLong(val); } - virtual const Reader& readFloat (float &val); - virtual const Reader& operator>> (float &val) + const Reader& readFloat (float &val) override; + const Reader& operator>> (float &val) override { return readFloat(val); } - virtual const Reader& readDouble (double &val); - virtual const Reader& operator>> (double &val) + const Reader& readDouble (double &val) override; + const Reader& operator>> (double &val) override { return readDouble(val); } @@ -398,11 +398,11 @@ public: InputStreamReader(InputStream &inputStreamSource); /*Overload these 3 for your implementation*/ - virtual int available(); + int available() override; - virtual void close(); + void close() override; - virtual gunichar get(); + gunichar get() override; private: @@ -422,14 +422,14 @@ public: StdReader(); - virtual ~StdReader(); + ~StdReader() override; /*Overload these 3 for your implementation*/ - virtual int available(); + int available() override; - virtual void close(); + void close() override; - virtual gunichar get(); + gunichar get() override; private: @@ -517,45 +517,45 @@ public: BasicWriter(Writer &destinationWriter); - virtual ~BasicWriter() {} + ~BasicWriter() override {} /*Overload these 3 for your implementation*/ - virtual void close(); + void close() override; - virtual void flush(); + void flush() override; - virtual void put(gunichar ch); + void put(gunichar ch) override; /* Formatted output */ - virtual Writer &printf(char const *fmt, ...) G_GNUC_PRINTF(2,3); + Writer &printf(char const *fmt, ...) override G_GNUC_PRINTF(2,3); - virtual Writer& writeChar(char val); + Writer& writeChar(char val) override; - virtual Writer& writeUString(Glib::ustring &val); + Writer& writeUString(Glib::ustring &val) override; - virtual Writer& writeStdString(std::string &val); + Writer& writeStdString(std::string &val) override; - virtual Writer& writeString(const char *str); + Writer& writeString(const char *str) override; - virtual Writer& writeBool (bool val ); + Writer& writeBool (bool val ) override; - virtual Writer& writeShort (short val ); + Writer& writeShort (short val ) override; - virtual Writer& writeUnsignedShort (unsigned short val ); + Writer& writeUnsignedShort (unsigned short val ) override; - virtual Writer& writeInt (int val ); + Writer& writeInt (int val ) override; - virtual Writer& writeUnsignedInt (unsigned int val ); + Writer& writeUnsignedInt (unsigned int val ) override; - virtual Writer& writeLong (long val ); + Writer& writeLong (long val ) override; - virtual Writer& writeUnsignedLong (unsigned long val ); + Writer& writeUnsignedLong (unsigned long val ) override; - virtual Writer& writeFloat (float val ); + Writer& writeFloat (float val ) override; - virtual Writer& writeDouble (double val ); + Writer& writeDouble (double val ) override; protected: @@ -611,11 +611,11 @@ public: OutputStreamWriter(OutputStream &outputStreamDest); /*Overload these 3 for your implementation*/ - virtual void close(); + void close() override; - virtual void flush(); + void flush() override; - virtual void put(gunichar ch); + void put(gunichar ch) override; private: @@ -634,16 +634,16 @@ class StdWriter : public BasicWriter public: StdWriter(); - virtual ~StdWriter(); + ~StdWriter() override; - virtual void close(); + void close() override; - virtual void flush(); + void flush() override; - virtual void put(gunichar ch); + void put(gunichar ch) override; private: diff --git a/src/io/stringstream.h b/src/io/stringstream.h index 248e42e50..91285f850 100644 --- a/src/io/stringstream.h +++ b/src/io/stringstream.h @@ -27,13 +27,13 @@ public: StringInputStream(Glib::ustring &sourceString); - virtual ~StringInputStream(); + ~StringInputStream() override; - virtual int available(); + int available() override; - virtual void close(); + void close() override; - virtual int get(); + int get() override; private: @@ -61,13 +61,13 @@ public: StringOutputStream(); - virtual ~StringOutputStream(); + ~StringOutputStream() override; - virtual void close(); + void close() override; - virtual void flush(); + void flush() override; - virtual int put(gunichar ch); + int put(gunichar ch) override; virtual Glib::ustring &getString() { return buffer; } diff --git a/src/io/uristream.h b/src/io/uristream.h index f51df6e74..531f5f484 100644 --- a/src/io/uristream.h +++ b/src/io/uristream.h @@ -44,13 +44,13 @@ public: UriInputStream(Inkscape::URI &source); - virtual ~UriInputStream(); + ~UriInputStream() override; - virtual int available(); + int available() override; - virtual void close(); + void close() override; - virtual int get(); + int get() override; private: Inkscape::URI &uri; @@ -78,13 +78,13 @@ public: UriReader(Inkscape::URI &source); - virtual ~UriReader(); + ~UriReader() override; - virtual int available(); + int available() override; - virtual void close(); + void close() override; - virtual gunichar get(); + gunichar get() override; private: @@ -112,13 +112,13 @@ public: UriOutputStream(Inkscape::URI &destination); - virtual ~UriOutputStream(); + ~UriOutputStream() override; - virtual void close(); + void close() override; - virtual void flush(); + void flush() override; - virtual int put(gunichar ch); + int put(gunichar ch) override; private: @@ -149,13 +149,13 @@ public: UriWriter(Inkscape::URI &source); - virtual ~UriWriter(); + ~UriWriter() override; - virtual void close(); + void close() override; - virtual void flush(); + void flush() override; - virtual void put(gunichar ch); + void put(gunichar ch) override; private: diff --git a/src/io/xsltstream.h b/src/io/xsltstream.h index 105e6207a..b1ad57faa 100644 --- a/src/io/xsltstream.h +++ b/src/io/xsltstream.h @@ -76,13 +76,13 @@ public: XsltInputStream(InputStream &xmlSource, XsltStyleSheet &stylesheet); - virtual ~XsltInputStream(); + ~XsltInputStream() override; - virtual int available(); + int available() override; - virtual void close(); + void close() override; - virtual int get(); + int get() override; private: @@ -112,13 +112,13 @@ public: XsltOutputStream(OutputStream &destination, XsltStyleSheet &stylesheet); - virtual ~XsltOutputStream(); + ~XsltOutputStream() override; - virtual void close(); + void close() override; - virtual void flush(); + void flush() override; - virtual int put(gunichar ch); + int put(gunichar ch) override; private: |
