added "const" prefix in ActiveIDManager

This commit is contained in:
HuYingzhuo(hugo/hyzboy) 2023-09-15 18:22:58 +08:00
parent 87b8ba6cc6
commit c78733216f

View File

@ -18,7 +18,7 @@ namespace hgl
private: private:
bool Create(int *id_list,int count) bool Create(int *id_list,const int count)
{ {
if(!id_list||count<=0)return(false); if(!id_list||count<=0)return(false);
@ -62,7 +62,7 @@ namespace hgl
* IDID列表中) * IDID列表中)
* @return * @return
*/ */
int CreateActive(int *id,int count=1) int CreateActive(int *id,const int count=1)
{ {
if(!id||count<=0)return(0); if(!id||count<=0)return(0);
@ -75,7 +75,7 @@ namespace hgl
* IDID列表中(ID) * IDID列表中(ID)
* @return * @return
*/ */
int CreateIdle(int count=1) int CreateIdle(const int count=1)
{ {
if(count<=0)return(0); if(count<=0)return(0);
@ -95,7 +95,7 @@ namespace hgl
/** /**
* ID数据(Idle中取,Active列表) * ID数据(Idle中取,Active列表)
*/ */
bool Get(int *id,int count=1) bool Get(int *id,const int count=1)
{ {
if(!id||count<=0)return(false); if(!id||count<=0)return(false);
@ -110,7 +110,7 @@ namespace hgl
/** /**
* ID数据(Idle中取Active列表) * ID数据(Idle中取Active列表)
*/ */
bool GetOrCreate(int *id,int count=1) bool GetOrCreate(int *id,const int count=1)
{ {
if(!id||count<=0)return(false); if(!id||count<=0)return(false);