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/prefs.h b/prefs.h
index fd86dde..1c4ec4f 100644
--- a/prefs.h
+++ b/prefs.h
@@ -27,15 +27,15 @@
bool Init(const base::FilePath& prefs_dir);
// PrefsInterface methods.
- bool GetString(const std::string& key, std::string* value);
- bool SetString(const std::string& key, const std::string& value);
- bool GetInt64(const std::string& key, int64_t* value);
- bool SetInt64(const std::string& key, const int64_t value);
- bool GetBoolean(const std::string& key, bool* value);
- bool SetBoolean(const std::string& key, const bool value);
+ bool GetString(const std::string& key, std::string* value) override;
+ bool SetString(const std::string& key, const std::string& value) override;
+ bool GetInt64(const std::string& key, int64_t* value) override;
+ bool SetInt64(const std::string& key, const int64_t value) override;
+ bool GetBoolean(const std::string& key, bool* value) override;
+ bool SetBoolean(const std::string& key, const bool value) override;
- bool Exists(const std::string& key);
- bool Delete(const std::string& key);
+ bool Exists(const std::string& key) override;
+ bool Delete(const std::string& key) override;
private:
FRIEND_TEST(PrefsTest, GetFileNameForKey);