util/{Const,Writable}Buffer: drop "_type" from type names

Behave like STL.
This commit is contained in:
Max Kellermann
2020-01-03 15:49:29 +01:00
parent 53f8053188
commit 4937d77cb6
26 changed files with 176 additions and 180 deletions

View File

@@ -44,7 +44,7 @@ template<typename T>
struct BasicStringView : ConstBuffer<T> {
using typename ConstBuffer<T>::size_type;
using typename ConstBuffer<T>::value_type;
using typename ConstBuffer<T>::pointer_type;
using typename ConstBuffer<T>::pointer;
using ConstBuffer<T>::data;
using ConstBuffer<T>::size;
@@ -57,14 +57,13 @@ struct BasicStringView : ConstBuffer<T> {
explicit constexpr BasicStringView(ConstBuffer<void> src)
:ConstBuffer<T>(ConstBuffer<T>::FromVoid(src)) {}
constexpr BasicStringView(pointer_type _data, size_type _size) noexcept
constexpr BasicStringView(pointer _data, size_type _size) noexcept
:ConstBuffer<T>(_data, _size) {}
constexpr BasicStringView(pointer_type _begin,
pointer_type _end) noexcept
constexpr BasicStringView(pointer _begin, pointer _end) noexcept
:ConstBuffer<T>(_begin, _end - _begin) {}
BasicStringView(pointer_type _data) noexcept
BasicStringView(pointer _data) noexcept
:ConstBuffer<T>(_data,
_data != nullptr ? StringLength(_data) : 0) {}
@@ -90,12 +89,12 @@ struct BasicStringView : ConstBuffer<T> {
using ConstBuffer<T>::skip_front;
gcc_pure
pointer_type Find(value_type ch) const noexcept {
pointer Find(value_type ch) const noexcept {
return StringFind(data, ch, this->size);
}
gcc_pure
pointer_type FindLast(value_type ch) const noexcept {
pointer FindLast(value_type ch) const noexcept {
return StringFindLast(data, ch, size);
}