Internals: Add consts. No functional change.

Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
This commit is contained in:
John Coiner 2017-11-02 18:02:11 -04:00 committed by Wilson Snyder
parent add5cc8b56
commit f63e946f04
3 changed files with 9 additions and 8 deletions

View File

@ -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)

View File

@ -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;

View File

@ -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 {