update_engine: Add override when possible.
Google Style Guide requires to include the "override" keyword
when overriding a method on a derived class, so the compiler will
catch errors if the method is not overriding a member of the base
class.
This patch introduces the "override" keyword when possible.
BUG=None
TEST=FEATURES=test emerge-link update_engine
Change-Id: Ie83d115c5730f3b35b3d95859a54bc1a48e0be7b
Reviewed-on: https://chromium-review.googlesource.com/228928
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
diff --git a/update_attempter_unittest.cc b/update_attempter_unittest.cc
index 1d1542b..8eec668 100644
--- a/update_attempter_unittest.cc
+++ b/update_attempter_unittest.cc
@@ -105,7 +105,7 @@
attempter_.set_good_kernel_cmd_ = "/path/to/non-existent/command";
}
- virtual void SetUp() {
+ void SetUp() override {
CHECK(utils::MakeTempDirectory("UpdateAttempterTest-XXXXXX", &test_dir_));
EXPECT_EQ(nullptr, attempter_.dbus_service_);
@@ -140,7 +140,7 @@
.WillRepeatedly(ReturnPointee(&actual_using_p2p_for_sharing_));
}
- virtual void TearDown() {
+ void TearDown() override {
test_utils::RecursiveUnlinkDir(test_dir_);
}