mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-13 10:04:04 +01:00
Forgotten with previous commit.
This commit is contained in:
parent
c405c4e4f3
commit
c248c89a50
@ -97,7 +97,7 @@ wchar_t * XStringW::forgetDataWithoutFreeing()
|
||||
return ret;
|
||||
}
|
||||
|
||||
const XStringW& XStringW::takeValueFrom(const wchar_t* S, xsize count)
|
||||
XStringW& XStringW::takeValueFrom(const wchar_t* S, xsize count)
|
||||
{
|
||||
if ( !S ) {
|
||||
// DebugLog(2, "takeValueFrom(const wchar_t* S) called with NULL. Use setEmpty()\n");
|
||||
@ -110,14 +110,14 @@ const XStringW& XStringW::takeValueFrom(const wchar_t* S, xsize count)
|
||||
return *this;
|
||||
}
|
||||
|
||||
const XStringW& XStringW::takeValueFrom(const wchar_t* S)
|
||||
XStringW& XStringW::takeValueFrom(const wchar_t* S)
|
||||
{
|
||||
if ( S ) return takeValueFrom(S, wcslen(S));
|
||||
Init(0);
|
||||
return *this;
|
||||
}
|
||||
|
||||
const XStringW& XStringW::takeValueFrom(const char* S)
|
||||
XStringW& XStringW::takeValueFrom(const char* S)
|
||||
{
|
||||
xsize newLen = utf8_string_wchar_count(S);
|
||||
Init(newLen);
|
||||
@ -523,21 +523,21 @@ const XStringW &XStringW::operator =(const XStringW &aString)
|
||||
//
|
||||
//*************************************************************************************************
|
||||
|
||||
const XStringW &XStringW::operator +=(wchar_t aChar)
|
||||
XStringW &XStringW::operator +=(wchar_t aChar)
|
||||
{
|
||||
//TRACE("Operator +=wchar_t \n");
|
||||
StrnCat(&aChar, 1);
|
||||
return *this;
|
||||
}
|
||||
|
||||
const XStringW &XStringW::operator +=(const XStringW &aString)
|
||||
XStringW &XStringW::operator +=(const XStringW &aString)
|
||||
{
|
||||
//TRACE("Operator +=const XStringW&\n");
|
||||
StrnCat(aString.data(), aString.size());
|
||||
return *this;
|
||||
}
|
||||
|
||||
const XStringW &XStringW::operator +=(const wchar_t *S)
|
||||
XStringW &XStringW::operator +=(const wchar_t *S)
|
||||
{
|
||||
//TRACE("operator +=const wchar_t *\n");
|
||||
StrCat(S);
|
||||
|
@ -177,6 +177,9 @@ int XStringW_tests()
|
||||
}
|
||||
}
|
||||
|
||||
wchar_t* s = XStringW().takeValueFrom("aa").forgetDataWithoutFreeing();
|
||||
if ( s != L"aa"_XSW ) return 102;
|
||||
|
||||
// XStringW CommonName(L"EFI\\CLOVER\\misc\\screenshot");
|
||||
// for (UINTN Index = 0; Index < 20; Index++) {
|
||||
// XStringW Name = CommonName + SPrintf("%lld", Index) + L".png";
|
||||
|
Loading…
Reference in New Issue
Block a user