改进代码,减少一次查找
This commit is contained in:
parent
cb61e4d6f1
commit
3ecd4faa12
@ -62,12 +62,9 @@ namespace hgl
|
|||||||
if(index==-1)
|
if(index==-1)
|
||||||
return(nullptr);
|
return(nullptr);
|
||||||
|
|
||||||
T *result;
|
ResItem *obj=items.GetItem(index);
|
||||||
|
|
||||||
if(items.Get(flag,result))
|
return obj->right;
|
||||||
return(result);
|
|
||||||
|
|
||||||
return(nullptr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename F,typename T>
|
template<typename F,typename T>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user