diff --git a/inc/hgl/type/Map.cpp b/inc/hgl/type/Map.cpp index 02882f1..59f668c 100644 --- a/inc/hgl/type/Map.cpp +++ b/inc/hgl/type/Map.cpp @@ -469,7 +469,7 @@ namespace hgl } template - void _Map::operator=(const _Map &ftd) + void _Map::operator=(const ThisClass &ftd) { Clear(); diff --git a/inc/hgl/type/Map.h b/inc/hgl/type/Map.h index b76e900..1b885f7 100644 --- a/inc/hgl/type/Map.h +++ b/inc/hgl/type/Map.h @@ -13,11 +13,14 @@ namespace hgl template class _Map { protected: + + using ThisClass=_Map; - ObjectPool data_pool; - List data_list; + using DataPairPool=ObjectPool; + using DataPairList=List; - using this_calss=_Map; + DataPairPool data_pool; + DataPairList data_list; public: //方法 @@ -47,8 +50,8 @@ namespace hgl virtual void Clear(); ///<清除所有数据 virtual void ClearData(); ///<清除所有数据,但不释放内存 - List & GetList(){return data_list;} ///<取得线性列表 - DataPair ** GetDataList()const{return data_list.GetData();} ///<取得纯数据线性列表 + DataPairList & GetList(){return data_list;} ///<取得线性列表 + DataPair ** GetDataList()const{return data_list.GetData();} ///<取得纯数据线性列表 template int GetKey(IT &il_list) ///<取得所有索引合集 @@ -95,7 +98,7 @@ namespace hgl bool SetValueBySerial(int,V &); ///<根据序号设置数据 - void operator=(const _Map &); ///<操作符重载,复制一个列表 + void operator=(const ThisClass &); ///<操作符重载,复制一个列表 void Enum(void (*enum_func)(const K &,V)); ///<枚举所有数据项 void EnumKey(void (*enum_func)(const K &)); ///<枚举所有索引