lib/icu/Compare: use AllocatedString::Clone()
This commit is contained in:
		| @@ -38,12 +38,12 @@ public: | |||||||
|  |  | ||||||
| 	IcuCompare(const IcuCompare &src) noexcept | 	IcuCompare(const IcuCompare &src) noexcept | ||||||
| 		:needle(src | 		:needle(src | ||||||
| 			? AllocatedString<>::Duplicate(src.needle.c_str()) | 			? src.needle.Clone() | ||||||
| 			: nullptr) {} | 			: nullptr) {} | ||||||
|  |  | ||||||
| 	IcuCompare &operator=(const IcuCompare &src) noexcept { | 	IcuCompare &operator=(const IcuCompare &src) noexcept { | ||||||
| 		needle = src | 		needle = src | ||||||
| 			? AllocatedString<>::Duplicate(src.needle.c_str()) | 			? src.needle.Clone() | ||||||
| 			: nullptr; | 			: nullptr; | ||||||
| 		return *this; | 		return *this; | ||||||
| 	} | 	} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Max Kellermann
					Max Kellermann