Commit 55be8e6f authored by Max Kellermann's avatar Max Kellermann

util/AllocatedString: add typedef size_type

parent c75b9b0d
......@@ -48,6 +48,7 @@ public:
typedef typename StringPointer<T>::const_reference_type const_reference_type;
typedef typename StringPointer<T>::pointer_type pointer_type;
typedef typename StringPointer<T>::const_pointer_type const_pointer_type;
typedef size_t size_type;
static constexpr value_type SENTINEL = '\0';
......@@ -91,7 +92,7 @@ public:
}
static AllocatedString Duplicate(const_pointer_type begin,
size_t length) {
size_type length) {
auto p = new value_type[length + 1];
*std::copy_n(begin, length, p) = SENTINEL;
return Donate(p);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment