From f63e946f049aa7debdf0fdbcfb927dd6451e1949 Mon Sep 17 00:00:00 2001 From: John Coiner Date: Thu, 2 Nov 2017 18:02:11 -0400 Subject: [PATCH] Internals: Add consts. No functional change. Signed-off-by: Wilson Snyder --- src/Makefile_obj.in | 1 + src/V3AstNodes.cpp | 8 ++++---- src/V3AstNodes.h | 8 ++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/Makefile_obj.in b/src/Makefile_obj.in index 2435dd1d0..e07ef4422 100644 --- a/src/Makefile_obj.in +++ b/src/Makefile_obj.in @@ -104,6 +104,7 @@ CPPFLAGS += -W -Wall $(CFG_CXXFLAGS_WEXTRA) $(CFG_CXXFLAGS_SRC) -Werror else CPPFLAGS += $(CFG_CXXFLAGS_SRC) endif + CPPFLAGSWALL = $(CPPFLAGS) CPPFLAGSPARSER = $(CPPFLAGS) $(CFG_CXXFLAGS_PARSER) diff --git a/src/V3AstNodes.cpp b/src/V3AstNodes.cpp index 907c707b1..958aabbb1 100644 --- a/src/V3AstNodes.cpp +++ b/src/V3AstNodes.cpp @@ -549,28 +549,28 @@ string AstScopeName::scopeNameFormatter(AstText* scopeTextp) const { return out; } -bool AstSenTree::hasClocked() { +bool AstSenTree::hasClocked() const { if (!sensesp()) this->v3fatalSrc("SENTREE without any SENITEMs under it"); for (AstNodeSenItem* senp = sensesp(); senp; senp=senp->nextp()->castNodeSenItem()) { if (senp->isClocked()) return true; } return false; } -bool AstSenTree::hasSettle() { +bool AstSenTree::hasSettle() const { if (!sensesp()) this->v3fatalSrc("SENTREE without any SENITEMs under it"); for (AstNodeSenItem* senp = sensesp(); senp; senp=senp->nextp()->castNodeSenItem()) { if (senp->isSettle()) return true; } return false; } -bool AstSenTree::hasInitial() { +bool AstSenTree::hasInitial() const { if (!sensesp()) this->v3fatalSrc("SENTREE without any SENITEMs under it"); for (AstNodeSenItem* senp = sensesp(); senp; senp=senp->nextp()->castNodeSenItem()) { if (senp->isInitial()) return true; } return false; } -bool AstSenTree::hasCombo() { +bool AstSenTree::hasCombo() const { if (!sensesp()) this->v3fatalSrc("SENTREE without any SENITEMs under it"); for (AstNodeSenItem* senp = sensesp(); senp; senp=senp->nextp()->castNodeSenItem()) { if (senp->isCombo()) return true; diff --git a/src/V3AstNodes.h b/src/V3AstNodes.h index e0d6b6499..cc1414aec 100644 --- a/src/V3AstNodes.h +++ b/src/V3AstNodes.h @@ -2015,10 +2015,10 @@ public: void addSensesp(AstNodeSenItem* nodep) { addOp1p(nodep); } void multi(bool flag) { m_multi = true; } // METHODS - bool hasClocked(); // Includes a clocked statement - bool hasSettle(); // Includes a SETTLE SenItem - bool hasInitial(); // Includes a INITIAL SenItem - bool hasCombo(); // Includes a COMBO SenItem + bool hasClocked() const; // Includes a clocked statement + bool hasSettle() const; // Includes a SETTLE SenItem + bool hasInitial() const; // Includes a INITIAL SenItem + bool hasCombo() const; // Includes a COMBO SenItem }; class AstAlways : public AstNode {