summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2020-11-12 18:45:58 (GMT)
committerMark Barolak <mbar@google.com>2020-11-13 15:57:24 (GMT)
commit9dce5e5d878176dc0054ef381f5c6e705f43ef99 (patch)
tree6f50362583ca1bf8dca815eec8f5e44796ab9935
parent0e202cdbe36b87b4fb68de2b5295a794a10c5cf8 (diff)
downloadgoogletest-9dce5e5d878176dc0054ef381f5c6e705f43ef99.zip
googletest-9dce5e5d878176dc0054ef381f5c6e705f43ef99.tar.gz
googletest-9dce5e5d878176dc0054ef381f5c6e705f43ef99.tar.bz2
Googletest export
Use override instead of virtual for destructor https://google.github.io/styleguide/cppguide.html says: "Explicitly annotate overrides of virtual functions or virtual destructors with exactly one of an override or (less frequently) final specifier. Do not use virtual when declaring an override". The mocked class _should_ have a virtual destructor most of the times. PiperOrigin-RevId: 342082140
-rw-r--r--googlemock/docs/cook_book.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/googlemock/docs/cook_book.md b/googlemock/docs/cook_book.md
index 3033446..c29d4c3 100644
--- a/googlemock/docs/cook_book.md
+++ b/googlemock/docs/cook_book.md
@@ -3078,7 +3078,7 @@ class MockFoo : public Foo {
...
// Add the following two lines to the mock class.
MOCK_METHOD(void, Die, ());
- virtual ~MockFoo() { Die(); }
+ ~MockFoo() override { Die(); }
};
```