1.fix List::GetBegin/GetEnd bug.
2.fix TextOutputStream bug
This commit is contained in:
@@ -123,7 +123,7 @@ namespace hgl
|
|||||||
|
|
||||||
for(int i=0;i<count;i++)
|
for(int i=0;i<count;i++)
|
||||||
{
|
{
|
||||||
const BaseString<T> &str=sl[i];
|
const T &str=sl.GetString(i);
|
||||||
|
|
||||||
const int len=str.Length();
|
const int len=str.Length();
|
||||||
|
|
||||||
|
@@ -19,7 +19,7 @@ namespace hgl
|
|||||||
template<typename T>
|
template<typename T>
|
||||||
bool List<T>::Begin(T &ti)const
|
bool List<T>::Begin(T &ti)const
|
||||||
{
|
{
|
||||||
if(!items)
|
if(!items||count<=0)
|
||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
memcpy(&ti,items,sizeof(T));
|
memcpy(&ti,items,sizeof(T));
|
||||||
@@ -29,7 +29,7 @@ namespace hgl
|
|||||||
template<typename T>
|
template<typename T>
|
||||||
bool List<T>::End(T &ti)const
|
bool List<T>::End(T &ti)const
|
||||||
{
|
{
|
||||||
if(!items)
|
if(!items||count<=0)
|
||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
memcpy(&ti,items+count-1,sizeof(T));
|
memcpy(&ti,items+count-1,sizeof(T));
|
||||||
|
@@ -205,7 +205,7 @@ namespace hgl
|
|||||||
Items.Exchange(index1,index2);
|
Items.Exchange(index1,index2);
|
||||||
}
|
}
|
||||||
|
|
||||||
T &GetString(int n)const{return *(Items[n]);} ///<取得指定行字符串
|
const T &GetString(int n)const{return *(Items[n]);} ///<取得指定行字符串
|
||||||
};//template<typename T> class StringList
|
};//template<typename T> class StringList
|
||||||
|
|
||||||
template<typename T> T StringList<T>::NullString; ///<空字符串实例
|
template<typename T> T StringList<T>::NullString; ///<空字符串实例
|
||||||
|
Reference in New Issue
Block a user