diff options
author | dcheng <dcheng@chromium.org> | 2014-12-22 18:14:23 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-23 02:15:16 +0000 |
commit | 93a52eb4ae8ab7f40624f780f33156f42fcbd140 (patch) | |
tree | ccb7f1ec441640ad387bf35c74982943cec0af67 /cc/layers/texture_layer_unittest.cc | |
parent | 8ffa00af2d4e322e91859c502aa02e0c9b0e1f2a (diff) | |
download | chromium_src-93a52eb4ae8ab7f40624f780f33156f42fcbd140.zip chromium_src-93a52eb4ae8ab7f40624f780f33156f42fcbd140.tar.gz chromium_src-93a52eb4ae8ab7f40624f780f33156f42fcbd140.tar.bz2 |
Standardize usage of virtual/override/final specifiers in cc/.
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.
Several formatting edits by clang-format were manually reverted, due to
mangling of some of the more complicate IPC macros.
BUG=417463
Review URL: https://codereview.chromium.org/818033004
Cr-Commit-Position: refs/heads/master@{#309520}
Diffstat (limited to 'cc/layers/texture_layer_unittest.cc')
-rw-r--r-- | cc/layers/texture_layer_unittest.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cc/layers/texture_layer_unittest.cc b/cc/layers/texture_layer_unittest.cc index f2dbb33..33291be 100644 --- a/cc/layers/texture_layer_unittest.cc +++ b/cc/layers/texture_layer_unittest.cc @@ -176,14 +176,14 @@ class TextureLayerTest : public testing::Test { test_data_(&shared_bitmap_manager_) {} protected: - virtual void SetUp() { + void SetUp() override { layer_tree_host_.reset(new MockLayerTreeHost(&fake_client_)); EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(AnyNumber()); layer_tree_host_->SetViewportSize(gfx::Size(10, 10)); Mock::VerifyAndClearExpectations(layer_tree_host_.get()); } - virtual void TearDown() { + void TearDown() override { Mock::VerifyAndClearExpectations(layer_tree_host_.get()); EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(AnyNumber()); @@ -303,7 +303,7 @@ class TestMailboxHolder : public TextureLayer::TextureMailboxHolder { class TextureLayerWithMailboxTest : public TextureLayerTest { protected: - virtual void TearDown() { + void TearDown() override { Mock::VerifyAndClearExpectations(&test_data_.mock_callback_); EXPECT_CALL(test_data_.mock_callback_, Release(test_data_.mailbox_name1_, @@ -929,7 +929,7 @@ class TextureLayerImplWithMailboxTest : public TextureLayerTest { : fake_client_( FakeLayerTreeHostClient(FakeLayerTreeHostClient::DIRECT_3D)) {} - virtual void SetUp() { + void SetUp() override { TextureLayerTest::SetUp(); layer_tree_host_.reset(new MockLayerTreeHost(&fake_client_)); EXPECT_TRUE(host_impl_.InitializeRenderer(FakeOutputSurface::Create3d())); |