NetEConstEnum: Remove unused scope_ field
The scope_ field of the NetEConstEnum class is initialized in the constructor, but never used anywhere again. Remove it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
parent
25dae60bb6
commit
9b7c99b8a8
|
|
@ -148,7 +148,7 @@ NetEConst* NetEConst::dup_expr() const
|
|||
|
||||
NetEConstEnum* NetEConstEnum::dup_expr() const
|
||||
{
|
||||
NetEConstEnum*tmp = new NetEConstEnum(scope_, name_, enum_set_, value());
|
||||
NetEConstEnum*tmp = new NetEConstEnum(name_, enum_set_, value());
|
||||
ivl_assert(*this, tmp);
|
||||
tmp->set_line(*this);
|
||||
return tmp;
|
||||
|
|
|
|||
|
|
@ -1969,8 +1969,7 @@ static NetExpr* check_for_enum_methods(const LineInfo*li,
|
|||
des->errors += 1;
|
||||
}
|
||||
netenum_t::iterator item = netenum->first_name();
|
||||
NetEConstEnum*tmp = new NetEConstEnum(scope, item->first,
|
||||
netenum, item->second);
|
||||
NetEConstEnum*tmp = new NetEConstEnum(item->first, netenum, item->second);
|
||||
tmp->set_line(*li);
|
||||
delete expr; // The elaborated enum variable is not needed.
|
||||
return tmp;
|
||||
|
|
@ -1987,8 +1986,7 @@ static NetExpr* check_for_enum_methods(const LineInfo*li,
|
|||
des->errors += 1;
|
||||
}
|
||||
netenum_t::iterator item = netenum->last_name();
|
||||
NetEConstEnum*tmp = new NetEConstEnum(scope, item->first,
|
||||
netenum, item->second);
|
||||
NetEConstEnum*tmp = new NetEConstEnum(item->first, netenum, item->second);
|
||||
tmp->set_line(*li);
|
||||
delete expr; // The elaborated enum variable is not needed.
|
||||
return tmp;
|
||||
|
|
|
|||
|
|
@ -263,8 +263,8 @@ void NetEConcat::set(unsigned idx, NetExpr*e)
|
|||
expr_width( expr_width() + repeat_ * e->expr_width() );
|
||||
}
|
||||
|
||||
NetEConstEnum::NetEConstEnum(Definitions*s, perm_string n, const netenum_t*eset, const verinum&v)
|
||||
: NetEConst(v), scope_(s), enum_set_(eset), name_(n)
|
||||
NetEConstEnum::NetEConstEnum(perm_string n, const netenum_t*eset, const verinum&v)
|
||||
: NetEConst(v), enum_set_(eset), name_(n)
|
||||
{
|
||||
assert(has_width());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ bool Definitions::add_enumeration_name(netenum_t*enum_set, perm_string name)
|
|||
netenum_t::iterator enum_val = enum_set->find_name(name);
|
||||
assert(enum_val != enum_set->end_name());
|
||||
|
||||
NetEConstEnum*val = new NetEConstEnum(this, name, enum_set, enum_val->second);
|
||||
NetEConstEnum*val = new NetEConstEnum(name, enum_set, enum_val->second);
|
||||
|
||||
pair<map<perm_string,NetEConstEnum*>::iterator, bool> cur;
|
||||
cur = enum_names_.insert(make_pair(name,val));
|
||||
|
|
|
|||
|
|
@ -2153,8 +2153,8 @@ class NetEConst : public NetExpr {
|
|||
class NetEConstEnum : public NetEConst {
|
||||
|
||||
public:
|
||||
explicit NetEConstEnum(Definitions*scope, perm_string name,
|
||||
const netenum_t*enum_set, const verinum&val);
|
||||
explicit NetEConstEnum(perm_string name, const netenum_t*enum_set,
|
||||
const verinum&val);
|
||||
~NetEConstEnum();
|
||||
|
||||
perm_string name() const;
|
||||
|
|
@ -2166,7 +2166,6 @@ class NetEConstEnum : public NetEConst {
|
|||
virtual NetEConstEnum* dup_expr() const;
|
||||
|
||||
private:
|
||||
Definitions*scope_;
|
||||
const netenum_t*enum_set_;
|
||||
perm_string name_;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue