From: Tim King Date: Thu, 8 Feb 2018 03:06:11 +0000 (-0800) Subject: Fixing more inconsistent usages of override. (#1575) X-Git-Tag: cvc5-1.0.0~5311 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=010666a966a58d9beaf8a0f7233d7f73eb0bc79b;p=cvc5.git Fixing more inconsistent usages of override. (#1575) --- diff --git a/src/parser/antlr_input.h b/src/parser/antlr_input.h index d2bb8667d..422ad9796 100644 --- a/src/parser/antlr_input.h +++ b/src/parser/antlr_input.h @@ -234,7 +234,7 @@ protected: void setAntlr3Parser(pANTLR3_PARSER pParser); /** Set the Parser object for this input. */ - virtual void setParser(Parser& parser); + void setParser(Parser& parser) override; };/* class AntlrInput */ inline std::string AntlrInput::tokenText(pANTLR3_COMMON_TOKEN token) { diff --git a/src/parser/cvc/cvc_input.h b/src/parser/cvc/cvc_input.h index c35d8d963..c02c4f452 100644 --- a/src/parser/cvc/cvc_input.h +++ b/src/parser/cvc/cvc_input.h @@ -69,7 +69,7 @@ class CvcInput : public AntlrInput { * * @throws ParserException if an error is encountered during parsing. */ - Expr parseExpr(); + Expr parseExpr() override; private: /** Initialize the class. Called from the constructors once the input stream diff --git a/src/parser/smt1/smt1_input.h b/src/parser/smt1/smt1_input.h index 7577b7bff..cd285255f 100644 --- a/src/parser/smt1/smt1_input.h +++ b/src/parser/smt1/smt1_input.h @@ -74,7 +74,7 @@ public: * * @throws ParserException if an error is encountered during parsing. */ - Expr parseExpr(); + Expr parseExpr() override; private: /** diff --git a/src/parser/smt2/smt2_input.h b/src/parser/smt2/smt2_input.h index 0acb5462d..44187cd2d 100644 --- a/src/parser/smt2/smt2_input.h +++ b/src/parser/smt2/smt2_input.h @@ -85,7 +85,7 @@ class Smt2Input : public AntlrInput { * * @throws ParserException if an error is encountered during parsing. */ - Expr parseExpr(); + Expr parseExpr() override; };/* class Smt2Input */ diff --git a/src/parser/smt2/sygus_input.h b/src/parser/smt2/sygus_input.h index 0dca60a82..58d78fb76 100644 --- a/src/parser/smt2/sygus_input.h +++ b/src/parser/smt2/sygus_input.h @@ -82,7 +82,7 @@ class SygusInput : public AntlrInput { * * @throws ParserException if an error is encountered during parsing. */ - Expr parseExpr(); + Expr parseExpr() override; };/* class SygusInput */ diff --git a/src/parser/tptp/tptp_input.h b/src/parser/tptp/tptp_input.h index 5dd56034d..9a820f26d 100644 --- a/src/parser/tptp/tptp_input.h +++ b/src/parser/tptp/tptp_input.h @@ -82,7 +82,7 @@ class TptpInput : public AntlrInput { * * @throws ParserException if an error is encountered during parsing. */ - Expr parseExpr(); + Expr parseExpr() override; };/* class TptpInput */ diff --git a/src/theory/booleans/type_enumerator.h b/src/theory/booleans/type_enumerator.h index 32c6bae42..ac0435442 100644 --- a/src/theory/booleans/type_enumerator.h +++ b/src/theory/booleans/type_enumerator.h @@ -38,7 +38,7 @@ class BooleanEnumerator : public TypeEnumeratorBase { type.getConst() == BOOLEAN_TYPE); } - Node operator*() { + Node operator*() override { switch(d_value) { case FALSE: return NodeManager::currentNM()->mkConst(false); diff --git a/src/theory/fp/type_enumerator.h b/src/theory/fp/type_enumerator.h index 0ae6462bc..4b243c224 100644 --- a/src/theory/fp/type_enumerator.h +++ b/src/theory/fp/type_enumerator.h @@ -48,7 +48,7 @@ class FloatingPointEnumerator return NodeManager::currentNM()->mkConst(createFP()); } - FloatingPointEnumerator& operator++() { + FloatingPointEnumerator& operator++() override { const FloatingPoint current(createFP()); if (current.isNaN()) { d_enumerationComplete = true; @@ -92,7 +92,7 @@ class RoundingModeEnumerator return NodeManager::currentNM()->mkConst(d_rm); } - RoundingModeEnumerator& operator++() { + RoundingModeEnumerator& operator++() override { switch (d_rm) { case roundNearestTiesToEven: d_rm = roundTowardPositive; diff --git a/src/theory/quantifiers/ho_trigger.h b/src/theory/quantifiers/ho_trigger.h index 4db3a660f..87f7fe07f 100644 --- a/src/theory/quantifiers/ho_trigger.h +++ b/src/theory/quantifiers/ho_trigger.h @@ -167,7 +167,7 @@ class HigherOrderTrigger : public Trigger * matching ground terms to function applications with variable heads. * See examples (EX1)-(EX3) above. */ - virtual bool sendInstantiation(InstMatch& m); + bool sendInstantiation(InstMatch& m) override; private: //-------------------- current information about the match diff --git a/src/theory/quantifiers/quant_conflict_find.cpp b/src/theory/quantifiers/quant_conflict_find.cpp index 95f8e3093..23e2ad721 100644 --- a/src/theory/quantifiers/quant_conflict_find.cpp +++ b/src/theory/quantifiers/quant_conflict_find.cpp @@ -34,7 +34,7 @@ namespace CVC4 { namespace theory { namespace quantifiers { -QuantInfo::QuantInfo() : d_unassigned_nvar(0), d_mg(NULL), d_una_index(0) {} +QuantInfo::QuantInfo() : d_unassigned_nvar(0), d_una_index(0), d_mg(nullptr) {} QuantInfo::~QuantInfo() { delete d_mg;