mirror of
https://github.com/verilator/verilator.git
synced 2025-01-01 12:17:35 +00:00
Internals: Fix some -Wsuggest-attribute=const suggestions.
This commit is contained in:
parent
8ad1a68420
commit
1fb0af7fba
@ -690,9 +690,6 @@ void AstNode::deleteNode() {
|
||||
// and we can debug easier.
|
||||
}
|
||||
|
||||
AstNode::~AstNode() {
|
||||
}
|
||||
|
||||
void AstNode::deleteTreeIter() {
|
||||
// private: Delete list of nodes. Publicly call deleteTree() instead.
|
||||
// Audited to make sure this is never NULL
|
||||
|
@ -1229,7 +1229,7 @@ public:
|
||||
bool brokeExistsAbove() const;
|
||||
|
||||
// CONSTRUCTORS
|
||||
virtual ~AstNode();
|
||||
virtual ~AstNode() {}
|
||||
#ifdef VL_LEAK_CHECKS
|
||||
static void* operator new(size_t size);
|
||||
static void operator delete(void* obj, size_t size);
|
||||
|
@ -327,8 +327,11 @@ public:
|
||||
|
||||
class V3GraphTestImport : public V3GraphTest {
|
||||
|
||||
// cppcheck-suppress functionConst
|
||||
#ifdef GRAPH_IMPORT
|
||||
void dotImport();
|
||||
#else
|
||||
void dotImport() {}
|
||||
#endif
|
||||
|
||||
public:
|
||||
virtual string name() { return "import"; }
|
||||
@ -344,11 +347,8 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
#if 0
|
||||
#ifdef GRAPH_IMPORT
|
||||
# include "graph_export.cpp"
|
||||
#else
|
||||
void V3GraphTestImport::dotImport() {
|
||||
}
|
||||
#endif
|
||||
|
||||
//======================================================================
|
||||
|
@ -287,8 +287,8 @@ void V3Number::setNames(AstNode* nodep) {
|
||||
|
||||
int V3Number::log2b(uint32_t num) {
|
||||
// See also opCLog2
|
||||
for (int bit=31; bit>0; bit--) if (num & (VL_ULL(1)<<bit)) return(bit);
|
||||
return(0);
|
||||
for (int bit=31; bit>0; bit--) if (num & (VL_ULL(1)<<bit)) return bit;
|
||||
return 0;
|
||||
}
|
||||
|
||||
//======================================================================
|
||||
|
@ -170,7 +170,7 @@ public:
|
||||
fileline()->v3errorEnd(str);
|
||||
}
|
||||
|
||||
const char* tokenName(int tok);
|
||||
static const char* tokenName(int tok);
|
||||
void debugToken(int tok, const char* cmtp);
|
||||
void parseTop();
|
||||
void parseUndef();
|
||||
|
Loading…
Reference in New Issue
Block a user