type dict: get_typename_create
This commit is contained in:
parent
a730b48c49
commit
bda36b4856
1 changed files with 8 additions and 0 deletions
|
@ -24,6 +24,14 @@ pub trait TypeDict : Send + Sync {
|
|||
self.insert(new, tyid);
|
||||
}
|
||||
}
|
||||
|
||||
fn get_typeid_creat(&mut self, tn: &String) -> TypeID {
|
||||
if let Some(id) = self.get_typeid(tn) {
|
||||
id
|
||||
} else {
|
||||
self.add_typename(tn.clone())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//<<<<>>>><<>><><<>><<<*>>><<>><><<>><<<<>>>>\\
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue