修改Map::Get函数名称为GetBySerial以避免可能的错误
This commit is contained in:
parent
5524bc7ebb
commit
bb66ce1f5a
@ -239,7 +239,7 @@ namespace hgl
|
||||
* @return 是否取得成功
|
||||
*/
|
||||
template<typename F,typename T,typename DataPair>
|
||||
bool _Map<F,T,DataPair>::Get(int index,F &f,T &t) const
|
||||
bool _Map<F,T,DataPair>::GetBySerial(int index,F &f,T &t) const
|
||||
{
|
||||
if(index<0||index>=data_list.GetCount())return(false);
|
||||
|
||||
|
@ -94,7 +94,7 @@ namespace hgl
|
||||
}
|
||||
|
||||
IDItem *GetItem(int n){return GetListObject(data_list,n);} ///<取指定序号的数据
|
||||
bool Get(int,F &,T &) const; ///<取指定序号的数据
|
||||
bool GetBySerial(int,F &,T &) const; ///<取指定序号的数据
|
||||
bool GetKey(int,F &); ///<取指定序号的索引
|
||||
bool GetValue(int,T &); ///<取指定序号的数据
|
||||
|
||||
@ -136,7 +136,9 @@ namespace hgl
|
||||
void DeleteObject(DataPair *ds)
|
||||
{
|
||||
if(!ds)return;
|
||||
DeleteObject(ds->left,ds->right);
|
||||
|
||||
if(ds->right) ///<存在数据就是nullptr的可能
|
||||
DeleteObject(ds->left,ds->right);
|
||||
}
|
||||
|
||||
void DeleteObject(int index)
|
||||
|
Loading…
x
Reference in New Issue
Block a user