mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:38:11 +00:00
Everywhere: Fix -Winconsistent-missing-override warnings from Clang
This option is already enabled when building Lagom, so let's enable it for the main build too. We will no longer be surprised by Lagom Clang CI builds failing while everything compiles locally. Furthermore, the stronger `-Wsuggest-override` warning is enabled in this commit, which enforces the use of the `override` keyword in all classes, not just those which already have some methods marked as `override`. This works with both GCC and Clang.
This commit is contained in:
parent
813593a485
commit
4a81b33c07
22 changed files with 45 additions and 45 deletions
|
@ -35,17 +35,17 @@ struct TreeNode : public SpaceAnalyzer::TreeMapNode {
|
|||
TreeNode(String name)
|
||||
: m_name(move(name)) {};
|
||||
|
||||
virtual String name() const { return m_name; }
|
||||
virtual i64 area() const { return m_area; }
|
||||
virtual size_t num_children() const
|
||||
virtual String name() const override { return m_name; }
|
||||
virtual i64 area() const override { return m_area; }
|
||||
virtual size_t num_children() const override
|
||||
{
|
||||
if (m_children) {
|
||||
return m_children->size();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
virtual const TreeNode& child_at(size_t i) const { return m_children->at(i); }
|
||||
virtual void sort_children_by_area() const
|
||||
virtual const TreeNode& child_at(size_t i) const override { return m_children->at(i); }
|
||||
virtual void sort_children_by_area() const override
|
||||
{
|
||||
if (m_children) {
|
||||
Vector<TreeNode>* children = const_cast<Vector<TreeNode>*>(m_children.ptr());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue