From 7831a4bbb46a919316efc7c70808dcaaf8ee629a Mon Sep 17 00:00:00 2001 From: tfarina Date: Mon, 27 Apr 2015 07:53:07 -0700 Subject: [PATCH] Update more directories under src/ to follow C++11 style rule for {virtual,override}. The Google style guide states that only one of {virtual,override,final} should be used for each declaration, since override implies virtual and final implies both virtual and override. The entries were found using the following command line: $ find src/ -iname "*.h" -o -iname "*.cpp" | xargs pcregrep -M "[^\n/]+virtual\ [^;{]+\ [a-zA-Z0-9_]+\([^;{]+\ override[ \n]*[;{]" The regex was a courtesy of nick@chromium.org BUG=None R=mtklein@google.com NOPRESUBMIT=true Review URL: https://codereview.chromium.org/1086143003 --- src/codec/SkCodec_libbmp.h | 6 +++--- src/image/SkImage_Raster.cpp | 6 +++--- src/image/SkSurface_Gpu.h | 3 +-- src/image/SkSurface_Raster.cpp | 3 +-- src/images/SkDecodingImageGenerator.cpp | 10 +++++----- src/images/SkImageDecoder_libjpeg.cpp | 6 +++--- src/opts/SkXfermode_opts_SSE2.h | 8 ++++---- src/opts/SkXfermode_opts_arm_neon.h | 8 ++++---- 8 files changed, 24 insertions(+), 26 deletions(-) diff --git a/src/codec/SkCodec_libbmp.h b/src/codec/SkCodec_libbmp.h index a31256c0ea..9909945c51 100644 --- a/src/codec/SkCodec_libbmp.h +++ b/src/codec/SkCodec_libbmp.h @@ -63,9 +63,9 @@ protected: * Initiates the bmp decode * */ - virtual Result onGetPixels(const SkImageInfo& dstInfo, void* dst, - size_t dstRowBytes, const Options&, SkPMColor*, - int*) override; + Result onGetPixels(const SkImageInfo& dstInfo, void* dst, + size_t dstRowBytes, const Options&, SkPMColor*, + int*) override; SkEncodedFormat onGetEncodedFormat() const override { return kBMP_SkEncodedFormat; } diff --git a/src/image/SkImage_Raster.cpp b/src/image/SkImage_Raster.cpp index aeb5dc1a10..acf805829d 100644 --- a/src/image/SkImage_Raster.cpp +++ b/src/image/SkImage_Raster.cpp @@ -66,9 +66,9 @@ public: SkPixelRef* getPixelRef() const { return fBitmap.pixelRef(); } - virtual SkShader* onNewShader(SkShader::TileMode, - SkShader::TileMode, - const SkMatrix* localMatrix) const override; + SkShader* onNewShader(SkShader::TileMode, + SkShader::TileMode, + const SkMatrix* localMatrix) const override; bool isOpaque() const override; diff --git a/src/image/SkSurface_Gpu.h b/src/image/SkSurface_Gpu.h index 998d2437cb..3ef1741c4b 100644 --- a/src/image/SkSurface_Gpu.h +++ b/src/image/SkSurface_Gpu.h @@ -24,8 +24,7 @@ public: SkCanvas* onNewCanvas() override; SkSurface* onNewSurface(const SkImageInfo&) override; SkImage* onNewImageSnapshot(Budgeted) override; - virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, - const SkPaint*) override; + void onDraw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) override; void onCopyOnWrite(ContentChangeMode) override; void onDiscard() override; diff --git a/src/image/SkSurface_Raster.cpp b/src/image/SkSurface_Raster.cpp index 45237b0fc8..28b972b90c 100644 --- a/src/image/SkSurface_Raster.cpp +++ b/src/image/SkSurface_Raster.cpp @@ -25,8 +25,7 @@ public: SkCanvas* onNewCanvas() override; SkSurface* onNewSurface(const SkImageInfo&) override; SkImage* onNewImageSnapshot(Budgeted) override; - virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, - const SkPaint*) override; + void onDraw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) override; void onCopyOnWrite(ContentChangeMode) override; private: diff --git a/src/images/SkDecodingImageGenerator.cpp b/src/images/SkDecodingImageGenerator.cpp index 329730ab3e..78027f42e2 100644 --- a/src/images/SkDecodingImageGenerator.cpp +++ b/src/images/SkDecodingImageGenerator.cpp @@ -44,11 +44,11 @@ protected: return true; } #endif - virtual Result onGetPixels(const SkImageInfo& info, - void* pixels, size_t rowBytes, const Options&, - SkPMColor ctable[], int* ctableCount) override; - virtual bool onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3], - SkYUVColorSpace* colorSpace) override; + Result onGetPixels(const SkImageInfo& info, + void* pixels, size_t rowBytes, const Options&, + SkPMColor ctable[], int* ctableCount) override; + bool onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3], + SkYUVColorSpace* colorSpace) override; private: typedef SkImageGenerator INHERITED; diff --git a/src/images/SkImageDecoder_libjpeg.cpp b/src/images/SkImageDecoder_libjpeg.cpp index d5303ec434..c42f214df1 100644 --- a/src/images/SkImageDecoder_libjpeg.cpp +++ b/src/images/SkImageDecoder_libjpeg.cpp @@ -242,9 +242,9 @@ protected: bool onDecodeSubset(SkBitmap* bitmap, const SkIRect& rect) override; #endif Result onDecode(SkStream* stream, SkBitmap* bm, Mode) override; - virtual bool onDecodeYUV8Planes(SkStream* stream, SkISize componentSizes[3], - void* planes[3], size_t rowBytes[3], - SkYUVColorSpace* colorSpace) override; + bool onDecodeYUV8Planes(SkStream* stream, SkISize componentSizes[3], + void* planes[3], size_t rowBytes[3], + SkYUVColorSpace* colorSpace) override; private: #ifdef SK_BUILD_FOR_ANDROID diff --git a/src/opts/SkXfermode_opts_SSE2.h b/src/opts/SkXfermode_opts_SSE2.h index 80512aca99..927e5f4006 100644 --- a/src/opts/SkXfermode_opts_SSE2.h +++ b/src/opts/SkXfermode_opts_SSE2.h @@ -17,10 +17,10 @@ public: void* procSIMD) : INHERITED(rec, mode), fProcSIMD(procSIMD) {} - virtual void xfer32(SkPMColor dst[], const SkPMColor src[], int count, - const SkAlpha aa[]) const override; - virtual void xfer16(uint16_t dst[], const SkPMColor src[], - int count, const SkAlpha aa[]) const override; + void xfer32(SkPMColor dst[], const SkPMColor src[], int count, + const SkAlpha aa[]) const override; + void xfer16(uint16_t dst[], const SkPMColor src[], + int count, const SkAlpha aa[]) const override; SK_TO_STRING_OVERRIDE() diff --git a/src/opts/SkXfermode_opts_arm_neon.h b/src/opts/SkXfermode_opts_arm_neon.h index cc8c76d1ed..e3c97786a2 100644 --- a/src/opts/SkXfermode_opts_arm_neon.h +++ b/src/opts/SkXfermode_opts_arm_neon.h @@ -9,10 +9,10 @@ public: void* procSIMD) : INHERITED(rec, mode), fProcSIMD(procSIMD) {} - virtual void xfer32(SkPMColor dst[], const SkPMColor src[], int count, - const SkAlpha aa[]) const override; - virtual void xfer16(uint16_t* SK_RESTRICT dst, const SkPMColor* SK_RESTRICT src, - int count, const SkAlpha* SK_RESTRICT aa) const override; + void xfer32(SkPMColor dst[], const SkPMColor src[], int count, + const SkAlpha aa[]) const override; + void xfer16(uint16_t* SK_RESTRICT dst, const SkPMColor* SK_RESTRICT src, + int count, const SkAlpha* SK_RESTRICT aa) const override; SK_TO_STRING_OVERRIDE()