From 7654fc11a6442e6ee2a463d6dee6458c0f53768f Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Fri, 15 Jun 2018 00:45:10 +0200 Subject: =?UTF-8?q?Run=20clang-tidy=E2=80=99s=20modernize-use-override=20p?= =?UTF-8?q?ass.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds the override specifier on all methods which override a virtual method, whether they were already virtual or missing this specifier. --- src/debug/gc-heap.h | 8 ++++---- src/debug/log-display-config.cpp | 2 +- src/debug/simple-event.h | 8 ++++---- src/debug/sysv-heap.h | 8 ++++---- 4 files changed, 13 insertions(+), 13 deletions(-) (limited to 'src/debug') diff --git a/src/debug/gc-heap.h b/src/debug/gc-heap.h index 0daf39487..88de2b7e8 100644 --- a/src/debug/gc-heap.h +++ b/src/debug/gc-heap.h @@ -20,19 +20,19 @@ namespace Debug { class GCHeap : public Debug::Heap { public: - int features() const { + int features() const override { return SIZE_AVAILABLE | USED_AVAILABLE | GARBAGE_COLLECTED; } - Util::ptr_shared name() const { + Util::ptr_shared name() const override { return Util::share_static_string("libgc"); } - Heap::Stats stats() const { + Heap::Stats stats() const override { Stats stats; stats.size = GC::Core::get_heap_size(); stats.bytes_used = stats.size - GC::Core::get_free_bytes(); return stats; } - void force_collect() { GC::Core::gcollect(); } + void force_collect() override { GC::Core::gcollect(); } }; } diff --git a/src/debug/log-display-config.cpp b/src/debug/log-display-config.cpp index 1f436a708..a2e07e207 100644 --- a/src/debug/log-display-config.cpp +++ b/src/debug/log-display-config.cpp @@ -72,7 +72,7 @@ private: class Display : public ConfigurationEvent { public: Display() : ConfigurationEvent("display") {} - void generateChildEvents() const { + void generateChildEvents() const override { GdkDisplay *display=gdk_display_get_default(); #if GTK_CHECK_VERSION(3,22,0) diff --git a/src/debug/simple-event.h b/src/debug/simple-event.h index 076b9b4b5..b22f1c2ee 100644 --- a/src/debug/simple-event.h +++ b/src/debug/simple-event.h @@ -34,13 +34,13 @@ public: static Category category() { return C; } - Util::ptr_shared name() const { return _name; } - unsigned propertyCount() const { return _properties.size(); } - PropertyPair property(unsigned property) const { + Util::ptr_shared name() const override { return _name; } + unsigned propertyCount() const override { return _properties.size(); } + PropertyPair property(unsigned property) const override { return _properties[property]; } - void generateChildEvents() const {} + void generateChildEvents() const override {} protected: void _addProperty(Util::ptr_shared name, diff --git a/src/debug/sysv-heap.h b/src/debug/sysv-heap.h index 4bde77cd8..baab0af5f 100644 --- a/src/debug/sysv-heap.h +++ b/src/debug/sysv-heap.h @@ -21,13 +21,13 @@ class SysVHeap : public Heap { public: SysVHeap() {} - int features() const; + int features() const override; - Util::ptr_shared name() const { + Util::ptr_shared name() const override { return Util::share_static_string("standard malloc()"); } - Stats stats() const; - void force_collect() {} + Stats stats() const override; + void force_collect() override {} }; } -- cgit v1.2.3