vhdlpp: Minor change to ScopeBase::find_constant().
This commit is contained in:
parent
5884879b02
commit
cd55f30a27
|
|
@ -106,6 +106,9 @@ const VType*ScopeBase::find_type(perm_string by_name)
|
||||||
|
|
||||||
bool ScopeBase::find_constant(perm_string by_name, const VType*&typ, Expression*&exp) const
|
bool ScopeBase::find_constant(perm_string by_name, const VType*&typ, Expression*&exp) const
|
||||||
{
|
{
|
||||||
|
typ = NULL;
|
||||||
|
exp = NULL;
|
||||||
|
|
||||||
map<perm_string,struct const_t*>::const_iterator cur = cur_constants_.find(by_name);
|
map<perm_string,struct const_t*>::const_iterator cur = cur_constants_.find(by_name);
|
||||||
if (cur == cur_constants_.end()) {
|
if (cur == cur_constants_.end()) {
|
||||||
cur = use_constants_.find(by_name);
|
cur = use_constants_.find(by_name);
|
||||||
|
|
@ -121,6 +124,8 @@ bool ScopeBase::find_constant(perm_string by_name, const VType*&typ, Expression*
|
||||||
exp = cur->second->val;
|
exp = cur->second->val;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Signal* ScopeBase::find_signal(perm_string by_name) const
|
Signal* ScopeBase::find_signal(perm_string by_name) const
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue