summaryrefslogtreecommitdiffstats
path: root/ui/gfx/image
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2014-10-29 13:07:24 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-29 20:07:50 +0000
commitbc07fa0200dee43bf23c3963357ea7fb41cd91c3 (patch)
tree237476f9f00b31535d9d5d00586db015dcc4e13e /ui/gfx/image
parente06ac71b008ed40a81c2152382a31c23e537934d (diff)
downloadchromium_src-bc07fa0200dee43bf23c3963357ea7fb41cd91c3.zip
chromium_src-bc07fa0200dee43bf23c3963357ea7fb41cd91c3.tar.gz
chromium_src-bc07fa0200dee43bf23c3963357ea7fb41cd91c3.tar.bz2
Standardize usage of virtual/override/final specifiers.
The Google C++ style guide states: Explicitly annotate overrides of virtual functions or virtual destructors with an override or (less frequently) final specifier. Older (pre-C++11) code will use the virtual keyword as an inferior alternative annotation. For clarity, use exactly one of override, final, or virtual when declaring an override. To better conform to these guidelines, the following constructs have been rewritten: - if a base class has a virtual destructor, then: virtual ~Foo(); -> ~Foo() override; - virtual void Foo() override; -> void Foo() override; - virtual void Foo() override final; -> void Foo() final; This patch was automatically generated. The clang plugin can generate fixit hints, which are suggested edits when it is 100% sure it knows how to fix a problem. The hints from the clang plugin were applied to the source tree using the tool in https://codereview.chromium.org/598073004. BUG=417463 R=sky@chromium.org Review URL: https://codereview.chromium.org/670923003 Cr-Commit-Position: refs/heads/master@{#301914}
Diffstat (limited to 'ui/gfx/image')
-rw-r--r--ui/gfx/image/image_family_unittest.cc2
-rw-r--r--ui/gfx/image/image_skia_unittest.cc4
2 files changed, 2 insertions, 4 deletions
diff --git a/ui/gfx/image/image_family_unittest.cc b/ui/gfx/image/image_family_unittest.cc
index f9dd401..20167c6 100644
--- a/ui/gfx/image/image_family_unittest.cc
+++ b/ui/gfx/image/image_family_unittest.cc
@@ -26,7 +26,7 @@ do { \
class ImageFamilyTest : public testing::Test {
public:
// Construct an ImageFamily. Implicitly tests Add and Empty.
- virtual void SetUp() override {
+ void SetUp() override {
EXPECT_TRUE(image_family_.empty());
// Aspect ratio 1:1.
diff --git a/ui/gfx/image/image_skia_unittest.cc b/ui/gfx/image/image_skia_unittest.cc
index a8bd66d..a5ce86e 100644
--- a/ui/gfx/image/image_skia_unittest.cc
+++ b/ui/gfx/image/image_skia_unittest.cc
@@ -150,9 +150,7 @@ class ImageSkiaTest : public testing::Test {
supported_scales.push_back(2.0f);
ImageSkia::SetSupportedScales(supported_scales);
}
- virtual ~ImageSkiaTest() {
- ImageSkia::SetSupportedScales(old_scales_);
- }
+ ~ImageSkiaTest() override { ImageSkia::SetSupportedScales(old_scales_); }
private:
std::vector<float> old_scales_;