diff options
author | dcheng <dcheng@chromium.org> | 2014-10-27 14:18:28 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-27 21:18:47 +0000 |
commit | 1d5884e1c15b36604a9c9f9376d18cb91f345f47 (patch) | |
tree | 538a20279b255153fa6092122eb50f6e74fcbb7c /ui/views/layout/grid_layout.cc | |
parent | b037316755183060a02dc5865cc11e7d9cdb5321 (diff) | |
download | chromium_src-1d5884e1c15b36604a9c9f9376d18cb91f345f47.zip chromium_src-1d5884e1c15b36604a9c9f9376d18cb91f345f47.tar.gz chromium_src-1d5884e1c15b36604a9c9f9376d18cb91f345f47.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/679233002
Cr-Commit-Position: refs/heads/master@{#301449}
Diffstat (limited to 'ui/views/layout/grid_layout.cc')
-rw-r--r-- | ui/views/layout/grid_layout.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ui/views/layout/grid_layout.cc b/ui/views/layout/grid_layout.cc index 99b39f2..97c62e3f 100644 --- a/ui/views/layout/grid_layout.cc +++ b/ui/views/layout/grid_layout.cc @@ -173,12 +173,12 @@ class Column : public LayoutElement { is_padding_(is_padding), master_column_(NULL) {} - virtual ~Column() {} + ~Column() override {} GridLayout::Alignment h_align() { return h_align_; } GridLayout::Alignment v_align() { return v_align_; } - virtual void ResetSize() override; + void ResetSize() override; private: friend class ColumnSet; @@ -190,7 +190,7 @@ class Column : public LayoutElement { // to that size. This should only be used for the master column. void UnifySameSizedColumnSizes(); - virtual void AdjustSize(int size) override; + void AdjustSize(int size) override; const GridLayout::Alignment h_align_; const GridLayout::Alignment v_align_; @@ -267,9 +267,9 @@ class Row : public LayoutElement { max_descent_(0) { } - virtual ~Row() {} + ~Row() override {} - virtual void ResetSize() override { + void ResetSize() override { max_ascent_ = max_descent_ = 0; SetSize(height_); } |