commit 2025-10-07 22:28 edit a bit ZCppMain/ZtCArray.H

This commit is contained in:
2025-10-07 22:28:56 +09:00
parent dc84354861
commit f35984ba84

View File

@ -184,8 +184,8 @@ namespace ZNsMain
TypeSize GetUseSize() const{return ml_UseSize;}
TypeSize GetAddSize() const{return ml_AddSize;}
TypeSize size () const{return ml_UseSize;}
TypeSize capacity() const{return ml_AllSize;}
TypeSize size () const{return ml_UseSize;}
TypeSize capacity () const{return ml_AllSize;}
void SetAddSize(TypeSize AL_NewAddSize)
@ -259,44 +259,12 @@ namespace ZNsMain
Type& operator[](TypeSize AL_Index)
{
#ifdef _DEBUG
if(AL_Index>=ml_UseSize)
{
std::fstream fileout("DEBUG.txt",std::ios::out | std::ios::app);
fileout<<std::endl<<"File : "<<__FILE__<<std::endl<<"Line : "<<__LINE__<<std::endl;
fileout<<"Error In 'Type& operator[](TypeSize AL_Index)"<<std::endl;
fileout<<" AL_Index>=ml_UseSize"<<", "<<AL_Index<<">="<<ml_UseSize<<std::endl;
fileout.close();
::exit(1);
}/*
if(AL_Index>=ml_UseSize)*/
#endif //_DEBUG
return mp_TypeArr[AL_Index] ;
}/*
Type& operator[](TypeSize AL_Index)*/
const Type& operator[](TypeSize AL_Index) const
{
#ifdef _DEBUG
if(AL_Index>=ml_UseSize)
{
std::fstream fileout("DEBUG.txt", std::ios::out | std::ios::app);
fileout<<std::endl<<"File : "<<__FILE__<<std::endl<<"Line : "<<__LINE__<<std::endl;
fileout<<"Error In 'const Type& operator[](TypeSize AL_Index) const"<<std::endl;
fileout<<" AL_Index>=ml_UseSize"<<std::endl;
fileout.close();
::exit(1);
}/*
if(AL_Index>=ml_UseSize)*/
#endif //_DEBUG
return mp_TypeArr[AL_Index] ;
}/*
const Type& operator[](TypeSize AL_Index) const*/
@ -304,44 +272,12 @@ namespace ZNsMain
Type& GetData(TypeSize AL_Index)
{
#ifdef _DEBUG
if(AL_Index>=ml_UseSize)
{
std::fstream fileout("DEBUG.txt",std::ios::out | std::ios::app);
fileout<<std::endl<<"File : "<<__FILE__<<std::endl<<"Line : "<<__LINE__<<std::endl;
fileout<<"Error In 'Type& GetData(TypeSize AL_Index)"<<std::endl;
fileout<<" AL_Index>=ml_UseSize"<<std::endl;
fileout.close();
::exit(1);
}/*
if(AL_Index>=ml_UseSize)*/
#endif //_DEBUG
return mp_TypeArr[AL_Index] ;
}/*
Type& GetData(TypeSize AL_Index)*/
const Type& GetData(TypeSize AL_Index) const
{
#ifdef _DEBUG
if(AL_Index>=ml_UseSize)
{
std::fstream fileout("DEBUG.txt",std::ios::out | std::ios::app);
fileout<<std::endl<<"File : "<<__FILE__<<std::endl<<"Line : "<<__LINE__<<std::endl;
fileout<<"Error In 'const Type& GetData(TypeSize AL_Index) const"<<std::endl;
fileout<<" AL_Index>=ml_UseSize"<<std::endl;
fileout.close();
::exit(1);
}/*
if(AL_Index>=ml_UseSize)*/
#endif //_DEBUG
return mp_TypeArr[AL_Index];
}/*
const Type& GetData(TypeSize AL_Index) const*/
@ -354,8 +290,8 @@ namespace ZNsMain
for(TypeSize i=ml_UseSize-2; i>=0; --i)
{
mp_TypeArr[i+1]=mp_TypeArr[i] ;
}/*
for(TypeSize i=ml_UseSize-2; i>=0; --i)*/
}
/*:::::::::::::::::::::::::::::::::::*/
mp_TypeArr[0]=AR_TypeArg ;
}/*
@ -370,8 +306,8 @@ namespace ZNsMain
for(TypeSize i=ml_UseSize-2; i>=0; --i)
{
mp_TypeArr[i+1]=mp_TypeArr[i] ;
}/*
for(TypeSize i=ml_UseSize-2; i>=0; --i)*/
}
/*:::::::::::::::::::::::::::::::::::*/
return mp_TypeArr[0] ;
}/*
@ -404,8 +340,8 @@ namespace ZNsMain
Type& push_front(){return AddHead();}
Type& push_back (){return AddTail();}
ZCIterator begin() {return ZCIterator(*this);}
const ZCIterator begin() const{return ZCIterator(*this);}
/***/ ZCIterator begin() {return ZCIterator(*this);}
const ZCIterator begin() const{return ZCIterator(*this);}
template<typename TFunctor> void IterElement(TFunctor AO_Functor)