util/AllocatedString: add typedef size_type
This commit is contained in:
parent
c75b9b0d12
commit
55be8e6f52
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue