Remove unnecessary overrides of `NetExpr::has_width()`
The default implementation of the virtual method `NetExpr::has_width()` returns true. There are a few classes that directly inherit from NetExpr that override the method with the exact same implementation. Remove these. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
parent
6a1bf00490
commit
55a5ba3d5a
15
net_expr.cc
15
net_expr.cc
|
|
@ -250,11 +250,6 @@ ivl_variable_type_t NetEConcat::expr_type() const
|
|||
return expr_type_;
|
||||
}
|
||||
|
||||
bool NetEConcat::has_width() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void NetEConcat::set(unsigned idx, NetExpr*e)
|
||||
{
|
||||
assert(idx < parms_.size());
|
||||
|
|
@ -294,11 +289,6 @@ const verireal& NetECReal::value() const
|
|||
return value_;
|
||||
}
|
||||
|
||||
bool NetECReal::has_width() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
ivl_variable_type_t NetECReal::expr_type() const
|
||||
{
|
||||
return IVL_VT_REAL;
|
||||
|
|
@ -473,11 +463,6 @@ const netenum_t* NetESelect::enumeration() const
|
|||
return dynamic_cast<const netenum_t*> (use_type_);
|
||||
}
|
||||
|
||||
bool NetESelect::has_width() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
NetESFunc::NetESFunc(const char*n, ivl_variable_type_t t,
|
||||
unsigned width, unsigned np, bool is_overridden)
|
||||
: name_(0), type_(t), enum_type_(0), parms_(np), is_overridden_(is_overridden)
|
||||
|
|
|
|||
|
|
@ -2187,9 +2187,6 @@ class NetECReal : public NetExpr {
|
|||
|
||||
const verireal&value() const;
|
||||
|
||||
// This type has no self-determined width. This is false.
|
||||
virtual bool has_width() const;
|
||||
|
||||
// The type of this expression is ET_REAL
|
||||
ivl_variable_type_t expr_type() const;
|
||||
|
||||
|
|
@ -4401,7 +4398,6 @@ class NetEConcat : public NetExpr {
|
|||
virtual ivl_variable_type_t expr_type() const;
|
||||
virtual NexusSet* nex_input(bool rem_out = true, bool always_sens = false,
|
||||
bool nested_func = false) const;
|
||||
virtual bool has_width() const;
|
||||
virtual NetEConcat* dup_expr() const;
|
||||
virtual NetEConst* eval_tree();
|
||||
virtual NetExpr* evaluate_function(const LineInfo&loc,
|
||||
|
|
@ -4458,7 +4454,6 @@ class NetESelect : public NetExpr {
|
|||
|
||||
virtual NexusSet* nex_input(bool rem_out = true, bool always_sens = false,
|
||||
bool nested_func = false) const;
|
||||
virtual bool has_width() const;
|
||||
virtual void expr_scan(struct expr_scan_t*) const;
|
||||
virtual NetEConst* eval_tree();
|
||||
virtual NetExpr*evaluate_function(const LineInfo&loc,
|
||||
|
|
|
|||
Loading…
Reference in New Issue