mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
[ATL] CStringT fixes
- Added copy constructor and assignment from CSimpleStringT to CStringT This fixed initialization while using `operator+` in GCC. ```CStringW s = a + b; ``` operator+ operators are defined for CSimpleStringT. It worked in MSVC because it did implicit conversion of CSimpleStringT to PCXSTR which called appropriate CStringT constructor. GCC doesn't do such conversions and triggers an error. - Unified `operator=(CStringT, PCXSTR)` with the rest svn path=/branches/GSoC_2017/rapps/; revision=75822
This commit is contained in:
parent
164da232b6
commit
79ee865810
1 changed files with 12 additions and 1 deletions
|
@ -319,6 +319,11 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
CStringT(_In_ const CThisSimpleString& strSrc) :
|
||||
CThisSimpleString(strSrc)
|
||||
{
|
||||
}
|
||||
|
||||
template<class StringTraits_>
|
||||
CStringT(_In_ const CStringT<YCHAR, StringTraits_> & strSrc) :
|
||||
CThisSimpleString(StringTraits::GetDefaultManager())
|
||||
|
@ -404,6 +409,12 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
CStringT& operator=(_In_ const CThisSimpleString &strSrc)
|
||||
{
|
||||
CThisSimpleString::operator=(strSrc);
|
||||
return *this;
|
||||
}
|
||||
|
||||
friend bool operator==(const CStringT& str1, const CStringT& str2) throw()
|
||||
{
|
||||
return str1.Compare(str2) == 0;
|
||||
|
@ -417,7 +428,7 @@ public:
|
|||
friend bool operator==(const CStringT& str1, PCYSTR psz2) throw()
|
||||
{
|
||||
CStringT tmp(psz2, str1.GetManager());
|
||||
return tmp == str1;
|
||||
return tmp.Compare(str1) == 0;
|
||||
}
|
||||
|
||||
friend bool operator==(const CStringT& str1, XCHAR ch2) throw()
|
||||
|
|
Loading…
Reference in a new issue