few update about GraphModulesMap

This commit is contained in:
2024-12-18 08:26:01 +08:00
parent 34846acae0
commit 260fb1b2ba
4 changed files with 40 additions and 41 deletions

View File

@@ -85,9 +85,9 @@ GraphModule *CreateGraphModule(const AnsiIDName &name,GraphModuleManager *gmm);
GraphModule *GraphModuleManager::GetModule(const AnsiIDName &name,bool create)
{
GraphModule *gm;
GraphModule *gm=graph_module_map.Get(name);
if(graph_module_map.Get(name,gm))
if(gm)
return gm;
if(create)
@@ -95,15 +95,10 @@ GraphModule *GraphModuleManager::GetModule(const AnsiIDName &name,bool create)
gm=CreateGraphModule(name,this);
if(gm)
{
graph_module_map.Add(name,gm);
module_list.Add(gm);
}
return gm;
graph_module_map.Add(gm);
}
return nullptr;
return gm;
}
GraphModuleManager::GraphModuleManager(RenderFramework *rf)