Bug 1185011 - Add 'override' annotations to DataSourceSurface subclasses in SourceSurfaceRawData.h, to fix clang -Winconsistent-missing-override build warnings/errors. rs=ehsan, a=ritu
authorDaniel Holbert <dholbert@cs.stanford.edu>
Fri, 17 Jul 2015 09:58:16 -0700
changeset 281814 e066696a39f9edd56de99e9870b6505140cd04b4
parent 281813 ff1c96567f25012dac39effe00b2bfcaa0f3ddad
child 281815 afe99b047762da5fcd4e9f12e6a673174b361130
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-beta@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan, ritu
bugs1185011
milestone41.0a2
Bug 1185011 - Add 'override' annotations to DataSourceSurface subclasses in SourceSurfaceRawData.h, to fix clang -Winconsistent-missing-override build warnings/errors. rs=ehsan, a=ritu
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);