This commit is contained in:
Sergey Isakov 2020-04-09 21:04:57 +03:00
commit fc567c71c0
2 changed files with 18 additions and 2 deletions

View File

@ -145,7 +145,7 @@ void XObjArrayNC<TYPE>::Init()
/* Constructeur */
template<class TYPE>
XObjArray<TYPE>::XObjArray(const XObjArray<TYPE> &anObjArray)
XObjArray<TYPE>::XObjArray(const XObjArray<TYPE> &anObjArray) : XObjArrayNC<TYPE>()
{
xsize ui;

View File

@ -431,13 +431,25 @@ void XStringW::RemoveLastEspCtrl()
if ( size() > 0 ) {
p = _data(0) + size() - 1;
#if __WCHAR_MIN__ < 0
if ( *p >= 0 && *p <= ' ' ) {
#else
if ( *p <= ' ' ) {
#endif
p -= 1;
#if __WCHAR_MIN__ < 0
while ( p>data() && *p >= 0 && *p <= ' ' ) p -= 1;
#else
while ( p>data() && *p <= ' ' ) p -= 1;
#endif
if ( p>data() ) {
SetLength( (UINTN)(p-data())+1);
}else{
#if __WCHAR_MIN__ < 0
if ( *p >= 0 && *p <= ' ' ) SetLength(0);
#else
if ( *p <= ' ' ) SetLength(0);
#endif
else SetLength(1);
}
}
@ -573,7 +585,11 @@ XStringW CleanCtrl(const XStringW &S)
UINTN i;
for ( i=0 ; i<S.size() ; i+=1 ) {
if ( S.wc_str()[i] >=0 && S.wc_str()[i] < ' ' ) ReturnValue += 'x'; /* wchar_t are signed !!! */
#if __WCHAR_MIN__ < 0
if ( S.wc_str()[i] >=0 && S.wc_str()[i] < ' ' ) ReturnValue += 'x'; /* wchar_t are signed */
#else
if ( S.wc_str()[i] < ' ' ) ReturnValue += 'x'; /* wchar_t are unsigned */
#endif
else ReturnValue += S.wc_str()[i];
}
return ReturnValue;