Bug 1185011: Add 'override' annotations to DataSourceSurface subclasses in SourceSurfaceRawData.h, to fix clang -Winconsistent-missing-override build warnings/errors. rs=ehsan
authorDaniel Holbert <dholbert@cs.stanford.edu>
Fri, 17 Jul 2015 09:58:16 -0700
changeset 253517 19c764962ba181cbf3c2ce7c5ac40a287bba44e0
parent 253516 5ba62c1cf6056016486208358d9dbb8a16d41d01
child 253518 d7d10f4a01d67fce489b8ea065066800c39ae6df
push id29067
push userkwierso@gmail.com
push dateSat, 18 Jul 2015 00:57:04 +0000
treeherdermozilla-central@e2f2eb9ecca0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs1185011
milestone42.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1185011: Add 'override' annotations to DataSourceSurface subclasses in SourceSurfaceRawData.h, to fix clang -Winconsistent-missing-override build warnings/errors. rs=ehsan
gfx/2d/SourceSurfaceRawData.h
--- a/gfx/2d/SourceSurfaceRawData.h
+++ b/gfx/2d/SourceSurfaceRawData.h
@@ -11,40 +11,40 @@
 #include "mozilla/Atomics.h"
 
 namespace mozilla {
 namespace gfx {
 
 class SourceSurfaceRawData : public DataSourceSurface
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DataSourceSurfaceRawData)
+  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DataSourceSurfaceRawData, override)
   SourceSurfaceRawData()
     : mMapCount(0)
   {}
   ~SourceSurfaceRawData()
   {
     if(mOwnData) delete [] mRawData;
     MOZ_ASSERT(mMapCount == 0);
   }
 
-  virtual uint8_t *GetData() { return mRawData; }
-  virtual int32_t Stride() { return mStride; }
+  virtual uint8_t *GetData() override { return mRawData; }
+  virtual int32_t Stride() override { return mStride; }
 
-  virtual SurfaceType GetType() const { return SurfaceType::DATA; }
-  virtual IntSize GetSize() const { return mSize; }
-  virtual SurfaceFormat GetFormat() const { return mFormat; }
+  virtual SurfaceType GetType() const override { return SurfaceType::DATA; }
+  virtual IntSize GetSize() const override { return mSize; }
+  virtual SurfaceFormat GetFormat() const override { return mFormat; }
 
   bool InitWrappingData(unsigned char *aData,
                         const IntSize &aSize,
                         int32_t aStride,
                         SurfaceFormat aFormat,
                         bool aOwnData);
 
-  virtual void GuaranteePersistance();
+  virtual void GuaranteePersistance() override;
 
   // Althought Map (and Moz2D in general) isn't normally threadsafe,
   // we want to allow it for SourceSurfaceRawData since it should
   // always be fine (for reading at least).
   //
   // This is the same as the base class implementation except using
   // mMapCount instead of mIsMapped since that breaks for multithread.
   //
@@ -74,31 +74,31 @@ private:
   IntSize mSize;
   Atomic<int32_t> mMapCount;
   bool mOwnData;
 };
 
 class SourceSurfaceAlignedRawData : public DataSourceSurface
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DataSourceSurfaceAlignedRawData)
+  MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DataSourceSurfaceAlignedRawData, override)
   SourceSurfaceAlignedRawData()
     : mMapCount(0)
   {}
   ~SourceSurfaceAlignedRawData()
   {
     MOZ_ASSERT(mMapCount == 0);
   }
 
-  virtual uint8_t *GetData() { return mArray; }
-  virtual int32_t Stride() { return mStride; }
+  virtual uint8_t *GetData() override { return mArray; }
+  virtual int32_t Stride() override { return mStride; }
 
-  virtual SurfaceType GetType() const { return SurfaceType::DATA; }
-  virtual IntSize GetSize() const { return mSize; }
-  virtual SurfaceFormat GetFormat() const { return mFormat; }
+  virtual SurfaceType GetType() const override { return SurfaceType::DATA; }
+  virtual IntSize GetSize() const override { return mSize; }
+  virtual SurfaceFormat GetFormat() const override { return mFormat; }
 
   bool Init(const IntSize &aSize,
             SurfaceFormat aFormat,
             bool aZero);
   bool InitWithStride(const IntSize &aSize,
                       SurfaceFormat aFormat,
                       int32_t aStride,
                       bool aZero);