mirror of
https://github.com/SpaceManiac/SpacemanDMM.git
synced 2025-12-23 05:36:47 +00:00
Reserve 1 instead of 4 ProcValue entries for most procs
This commit is contained in:
parent
f82df10f80
commit
8b47ea8147
1 changed files with 4 additions and 1 deletions
|
|
@ -1097,7 +1097,10 @@ impl ObjectTreeBuilder {
|
|||
code: Option<Block>,
|
||||
) -> Result<(usize, &mut ProcValue), DMError> {
|
||||
let node = &mut self.inner.graph[parent.index()];
|
||||
let proc = node.procs.entry(name.to_owned()).or_insert_with(Default::default);
|
||||
let proc = node.procs.entry(name.to_owned()).or_insert_with(|| TypeProc {
|
||||
value: Vec::with_capacity(1),
|
||||
declaration: None,
|
||||
});
|
||||
if let Some(kind) = declaration {
|
||||
if let Some(ref decl) = proc.declaration {
|
||||
DMError::new(location, format!("duplicate definition of {}/{}", kind, name))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue