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
@@ -38,13 +38,13 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
AllocatedString<>
|
||||
AllocatedString
|
||||
IcuCaseFold(std::string_view src) noexcept
|
||||
try {
|
||||
#ifdef HAVE_ICU
|
||||
const auto u = UCharFromUTF8(src);
|
||||
if (u.IsNull())
|
||||
return AllocatedString<>::Duplicate(src);
|
||||
return AllocatedString::Duplicate(src);
|
||||
|
||||
AllocatedArray<UChar> folded(u.size() * 2U);
|
||||
|
||||
@@ -54,7 +54,7 @@ try {
|
||||
U_FOLD_CASE_DEFAULT,
|
||||
&error_code);
|
||||
if (folded_length == 0 || error_code != U_ZERO_ERROR)
|
||||
return AllocatedString<>::Duplicate(src);
|
||||
return AllocatedString::Duplicate(src);
|
||||
|
||||
folded.SetSize(folded_length);
|
||||
return UCharToUTF8({folded.begin(), folded.size()});
|
||||
@@ -63,7 +63,7 @@ try {
|
||||
#error not implemented
|
||||
#endif
|
||||
} catch (...) {
|
||||
return AllocatedString<>::Duplicate(src);
|
||||
return AllocatedString::Duplicate(src);
|
||||
}
|
||||
|
||||
#endif /* HAVE_ICU_CASE_FOLD */
|
||||
|
||||
Reference in New Issue
Block a user