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/file_writer.h b/file_writer.h
index 7877ba5..f800643 100644
--- a/file_writer.h
+++ b/file_writer.h
@@ -58,11 +58,10 @@
class DirectFileWriter : public FileWriter {
public:
DirectFileWriter() : fd_(-1) {}
- virtual ~DirectFileWriter() {}
- virtual int Open(const char* path, int flags, mode_t mode);
- virtual bool Write(const void* bytes, size_t count);
- virtual int Close();
+ int Open(const char* path, int flags, mode_t mode) override;
+ bool Write(const void* bytes, size_t count) override;
+ int Close() override;
int fd() const { return fd_; }