Adding override/final to overridden virtual methods.

C++11 compilers complain about overridden virtual methods
not being specified as either final or overridden.
This commit is contained in:
Seth Hall 2016-01-16 23:35:31 -05:00
parent ad61267ce6
commit a58c308427
15 changed files with 282 additions and 282 deletions

View file

@ -248,7 +248,7 @@ public:
BroType* Ref() { ::Ref(this); return this; }
virtual void Describe(ODesc* d) const;
virtual void Describe(ODesc* d) const override;
virtual void DescribeReST(ODesc* d, bool roles_only = false) const;
virtual unsigned MemoryAllocation() const;
@ -312,9 +312,9 @@ public:
void Append(BroType* t);
void AppendEvenIfNotPure(BroType* t);
void Describe(ODesc* d) const;
void Describe(ODesc* d) const override;
unsigned int MemoryAllocation() const
unsigned int MemoryAllocation() const override
{
return BroType::MemoryAllocation()
+ padded_sizeof(*this) - padded_sizeof(BroType)
@ -330,15 +330,15 @@ protected:
class IndexType : public BroType {
public:
int MatchesIndex(ListExpr*& index) const;
int MatchesIndex(ListExpr*& index) const override;
TypeList* Indices() const { return indices; }
const type_list* IndexTypes() const { return indices->Types(); }
BroType* YieldType();
BroType* YieldType() override;
const BroType* YieldType() const;
void Describe(ODesc* d) const;
void DescribeReST(ODesc* d, bool roles_only = false) const;
void Describe(ODesc* d) const override;
void DescribeReST(ODesc* d, bool roles_only = false) const override;
// Returns true if this table is solely indexed by subnet.
bool IsSubNetIndex() const;
@ -397,7 +397,7 @@ public:
~FuncType();
RecordType* Args() const { return args; }
BroType* YieldType();
BroType* YieldType() override;
const BroType* YieldType() const;
void SetYieldType(BroType* arg_yield) { yield = arg_yield; }
function_flavor Flavor() const { return flavor; }
@ -407,13 +407,13 @@ public:
void ClearYieldType(function_flavor arg_flav)
{ Unref(yield); yield = 0; flavor = arg_flav; }
int MatchesIndex(ListExpr*& index) const;
int MatchesIndex(ListExpr*& index) const override;
int CheckArgs(const type_list* args, bool is_init = false) const;
TypeList* ArgTypes() const { return arg_types; }
void Describe(ODesc* d) const;
void DescribeReST(ODesc* d, bool roles_only = false) const;
void Describe(ODesc* d) const override;
void DescribeReST(ODesc* d, bool roles_only = false) const override;
protected:
FuncType() { args = 0; arg_types = 0; yield = 0; flavor = FUNC_FLAVOR_FUNCTION; }
@ -463,8 +463,8 @@ public:
~RecordType();
int HasField(const char* field) const;
BroType* FieldType(const char* field) const;
int HasField(const char* field) const override;
BroType* FieldType(const char* field) const override;
BroType* FieldType(int field) const;
Val* FieldDefault(int field) const; // Ref's the returned value; 0 if none.
@ -487,8 +487,8 @@ public:
// Takes ownership of list.
const char* AddFields(type_decl_list* types, attr_list* attr);
void Describe(ODesc* d) const;
void DescribeReST(ODesc* d, bool roles_only = false) const;
void Describe(ODesc* d) const override;
void DescribeReST(ODesc* d, bool roles_only = false) const override;
void DescribeFields(ODesc* d) const;
void DescribeFieldsReST(ODesc* d, bool func_args) const;
@ -504,7 +504,7 @@ protected:
class SubNetType : public BroType {
public:
SubNetType();
void Describe(ODesc* d) const;
void Describe(ODesc* d) const override;
protected:
DECLARE_SERIAL(SubNetType)
};
@ -514,9 +514,9 @@ public:
FileType(BroType* yield_type);
~FileType();
BroType* YieldType();
BroType* YieldType() override;
void Describe(ODesc* d) const;
void Describe(ODesc* d) const override;
protected:
FileType() { yield = 0; }
@ -533,8 +533,8 @@ public:
const string& Name() const { return name; }
void Describe(ODesc* d) const;
void DescribeReST(ODesc* d, bool roles_only = false) const;
void Describe(ODesc* d) const override;
void DescribeReST(ODesc* d, bool roles_only = false) const override;
protected:
OpaqueType() { }
@ -569,7 +569,7 @@ public:
// will be fully qualified with their module name.
enum_name_list Names() const;
void DescribeReST(ODesc* d, bool roles_only = false) const;
void DescribeReST(ODesc* d, bool roles_only = false) const override;
protected:
EnumType() { counter = 0; }
@ -599,17 +599,17 @@ class VectorType : public BroType {
public:
VectorType(BroType* t);
virtual ~VectorType();
BroType* YieldType();
BroType* YieldType() override;
const BroType* YieldType() const;
int MatchesIndex(ListExpr*& index) const;
int MatchesIndex(ListExpr*& index) const override;
// Returns true if this table type is "unspecified", which is what one
// gets using an empty "vector()" constructor.
bool IsUnspecifiedVector() const;
void Describe(ODesc* d) const;
void DescribeReST(ODesc* d, bool roles_only = false) const;
void Describe(ODesc* d) const override;
void DescribeReST(ODesc* d, bool roles_only = false) const override;
protected:
VectorType() { yield_type = 0; }