util/AllocatedString: rename to BasicAllocatedString
To make things simpler, AllocatedString is now a non-template class.
This commit is contained in:
committed by
Max Kellermann
parent
8d80280ab9
commit
cfb7f8ab84
@@ -25,7 +25,7 @@
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
AllocatedString<char>
|
||||
AllocatedString
|
||||
WideCharToMultiByte(unsigned code_page, std::wstring_view src)
|
||||
{
|
||||
int length = WideCharToMultiByte(code_page, 0, src.data(), src.size(),
|
||||
@@ -42,10 +42,10 @@ WideCharToMultiByte(unsigned code_page, std::wstring_view src)
|
||||
throw MakeLastError("Failed to convert from Unicode");
|
||||
|
||||
buffer[length] = '\0';
|
||||
return AllocatedString<char>::Donate(buffer.release());
|
||||
return AllocatedString::Donate(buffer.release());
|
||||
}
|
||||
|
||||
AllocatedString<wchar_t>
|
||||
BasicAllocatedString<wchar_t>
|
||||
MultiByteToWideChar(unsigned code_page, std::string_view src)
|
||||
{
|
||||
int length = MultiByteToWideChar(code_page, 0, src.data(), src.size(),
|
||||
@@ -60,5 +60,5 @@ MultiByteToWideChar(unsigned code_page, std::string_view src)
|
||||
throw MakeLastError("Failed to convert to Unicode");
|
||||
|
||||
buffer[length] = L'\0';
|
||||
return AllocatedString<wchar_t>::Donate(buffer.release());
|
||||
return BasicAllocatedString<wchar_t>::Donate(buffer.release());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user