summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-08-30 10:07:10 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-08-30 10:07:10 +0200
commit7738f2ed122b9be8045a502f6ddea5fbd30380e5 (patch)
treef9270bec9ebee546e8cdab14e55e3345c8599f46
parentd01430b2e8b768283acf0e18325a81b73e3d946a (diff)
Mark overriding member functions as 'override'
This does not affect the generated code (API or ABI), but: 1) Makes sure that in case the signature of one of these functions would change by accident, the build breaks as the function no longer overrides a base function. 2) Makes the code readable by explicitly marking all overriding functions as 'override', where previously the reader had to read the interface of the base class(es) as well to find out if the function is virtual or not. 3) Since 'override' implies 'virtual', remove the 'virtual' keyword where 'override' is present. Change-Id: Idc42f6babb9070436dd7b08f2332bd05e2c2d49d
-rw-r--r--src/lib/FHInternalStream.h22
-rw-r--r--src/lib/FHPath.cpp80
2 files changed, 51 insertions, 51 deletions
diff --git a/src/lib/FHInternalStream.h b/src/lib/FHInternalStream.h
index bdf20ab..5f3bad5 100644
--- a/src/lib/FHInternalStream.h
+++ b/src/lib/FHInternalStream.h
@@ -22,35 +22,35 @@ class FHInternalStream : public librevenge::RVNGInputStream
{
public:
FHInternalStream(librevenge::RVNGInputStream *input, unsigned long size, bool compressed=false);
- ~FHInternalStream() {}
- virtual bool isStructured()
+ ~FHInternalStream() override {}
+ bool isStructured() override
{
return false;
}
- virtual unsigned subStreamCount()
+ unsigned subStreamCount() override
{
return 0;
}
- virtual const char *subStreamName(unsigned)
+ const char *subStreamName(unsigned) override
{
return 0;
}
- virtual bool existsSubStream(const char *)
+ bool existsSubStream(const char *) override
{
return false;
}
- virtual librevenge::RVNGInputStream *getSubStreamByName(const char *)
+ librevenge::RVNGInputStream *getSubStreamByName(const char *) override
{
return 0;
}
- virtual librevenge::RVNGInputStream *getSubStreamById(unsigned)
+ librevenge::RVNGInputStream *getSubStreamById(unsigned) override
{
return 0;
}
- const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead);
- int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType);
- long tell();
- bool isEnd();
+ const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead) override;
+ int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) override;
+ long tell() override;
+ bool isEnd() override;
unsigned long getSize() const
{
return m_buffer.size();
diff --git a/src/lib/FHPath.cpp b/src/lib/FHPath.cpp
index ee12860..fc8bc09 100644
--- a/src/lib/FHPath.cpp
+++ b/src/lib/FHPath.cpp
@@ -231,17 +231,17 @@ public:
FHMoveToElement(double x, double y)
: m_x(x),
m_y(y) {}
- ~FHMoveToElement() {}
- void writeOut(librevenge::RVNGPropertyListVector &vec) const;
- void writeOut(std::ostream &o) const;
- void transform(const FHTransform &trafo);
- FHPathElement *clone();
- void getBoundingBox(double x0, double y0, double &xmin, double &ymin, double &xmax, double &ymax) const;
- double getX() const
+ ~FHMoveToElement() override {}
+ void writeOut(librevenge::RVNGPropertyListVector &vec) const override;
+ void writeOut(std::ostream &o) const override;
+ void transform(const FHTransform &trafo) override;
+ FHPathElement *clone() override;
+ void getBoundingBox(double x0, double y0, double &xmin, double &ymin, double &xmax, double &ymax) const override;
+ double getX() const override
{
return m_x;
}
- double getY() const
+ double getY() const override
{
return m_y;
}
@@ -256,17 +256,17 @@ public:
FHLineToElement(double x, double y)
: m_x(x),
m_y(y) {}
- ~FHLineToElement() {}
- void writeOut(librevenge::RVNGPropertyListVector &vec) const;
- void writeOut(std::ostream &o) const;
- void transform(const FHTransform &trafo);
- FHPathElement *clone();
- void getBoundingBox(double x0, double y0, double &xmin, double &ymin, double &xmax, double &ymax) const;
- double getX() const
+ ~FHLineToElement() override {}
+ void writeOut(librevenge::RVNGPropertyListVector &vec) const override;
+ void writeOut(std::ostream &o) const override;
+ void transform(const FHTransform &trafo) override;
+ FHPathElement *clone() override;
+ void getBoundingBox(double x0, double y0, double &xmin, double &ymin, double &xmax, double &ymax) const override;
+ double getX() const override
{
return m_x;
}
- double getY() const
+ double getY() const override
{
return m_y;
}
@@ -285,17 +285,17 @@ public:
m_y2(y2),
m_x(x),
m_y(y) {}
- ~FHCubicBezierToElement() {}
- void writeOut(librevenge::RVNGPropertyListVector &vec) const;
- void writeOut(std::ostream &o) const;
- void transform(const FHTransform &trafo);
- FHPathElement *clone();
- void getBoundingBox(double x0, double y0, double &xmin, double &ymin, double &xmax, double &ymax) const;
- double getX() const
+ ~FHCubicBezierToElement() override {}
+ void writeOut(librevenge::RVNGPropertyListVector &vec) const override;
+ void writeOut(std::ostream &o) const override;
+ void transform(const FHTransform &trafo) override;
+ FHPathElement *clone() override;
+ void getBoundingBox(double x0, double y0, double &xmin, double &ymin, double &xmax, double &ymax) const override;
+ double getX() const override
{
return m_x;
}
- double getY() const
+ double getY() const override
{
return m_y;
}
@@ -316,17 +316,17 @@ public:
m_y1(y1),
m_x(x),
m_y(y) {}
- ~FHQuadraticBezierToElement() {}
- void writeOut(librevenge::RVNGPropertyListVector &vec) const;
- void writeOut(std::ostream &o) const;
- void transform(const FHTransform &trafo);
- FHPathElement *clone();
- void getBoundingBox(double x0, double y0, double &xmin, double &ymin, double &xmax, double &ymax) const;
- double getX() const
+ ~FHQuadraticBezierToElement() override {}
+ void writeOut(librevenge::RVNGPropertyListVector &vec) const override;
+ void writeOut(std::ostream &o) const override;
+ void transform(const FHTransform &trafo) override;
+ FHPathElement *clone() override;
+ void getBoundingBox(double x0, double y0, double &xmin, double &ymin, double &xmax, double &ymax) const override;
+ double getX() const override
{
return m_x;
}
- double getY() const
+ double getY() const override
{
return m_y;
}
@@ -348,17 +348,17 @@ public:
m_sweep(sweep),
m_x(x),
m_y(y) {}
- ~FHArcToElement() {}
- void writeOut(librevenge::RVNGPropertyListVector &vec) const;
- void writeOut(std::ostream &o) const;
- void transform(const FHTransform &trafo);
- FHPathElement *clone();
- void getBoundingBox(double x0, double y0, double &xmin, double &ymin, double &xmax, double &ymax) const;
- double getX() const
+ ~FHArcToElement() override {}
+ void writeOut(librevenge::RVNGPropertyListVector &vec) const override;
+ void writeOut(std::ostream &o) const override;
+ void transform(const FHTransform &trafo) override;
+ FHPathElement *clone() override;
+ void getBoundingBox(double x0, double y0, double &xmin, double &ymin, double &xmax, double &ymax) const override;
+ double getX() const override
{
return m_x;
}
- double getY() const
+ double getY() const override
{
return m_y;
}