pichar fix

This commit is contained in:
2022-04-26 00:17:53 +03:00
parent cb179de856
commit e70e1c0203
2 changed files with 5 additions and 1 deletions

View File

@@ -61,6 +61,10 @@ public:
//! \~russian Оператор присваивания
PIChar & operator =(const char v) {ch = v; return *this;}
//! \~english Copy operator
//! \~russian Оператор присваивания
PIChar & operator =(const wchar_t v) {ch = v; return *this;}
//! \~english Compare operator
//! \~russian Оператор сравнения
bool operator ==(const PIChar & o) const;

View File

@@ -248,7 +248,7 @@ void PIString::appendFromChars(const char * c, int s, const char * codepage) {
mbsrtowcs(&wstr[0], pc, len+1, &state);
if (c_) free(c_);
enlarge(len);
for (size_t i=0; i<len; ++i) (*this)[old_sz+i] = PIChar(wstr[i]);
for (size_t i=0; i<len; ++i) (*this)[old_sz+i] = wstr[i];
// //qDebug() << "FromChars done" << size();
# endif
#endif