util/{Const,Writable}Buffer: drop more "_type" suffixes from type names
This commit is contained in:
@@ -47,8 +47,8 @@ class AllocatedArray {
|
||||
|
||||
public:
|
||||
typedef typename Buffer::size_type size_type;
|
||||
typedef typename Buffer::reference_type reference_type;
|
||||
typedef typename Buffer::const_reference_type const_reference_type;
|
||||
typedef typename Buffer::reference reference;
|
||||
typedef typename Buffer::const_reference const_reference;
|
||||
typedef typename Buffer::iterator iterator;
|
||||
typedef typename Buffer::const_iterator const_iterator;
|
||||
|
||||
@@ -147,33 +147,33 @@ public:
|
||||
return buffer.size;
|
||||
}
|
||||
|
||||
reference_type front() noexcept {
|
||||
reference front() noexcept {
|
||||
return buffer.front();
|
||||
}
|
||||
|
||||
const_reference_type front() const noexcept {
|
||||
const_reference front() const noexcept {
|
||||
return buffer.front();
|
||||
}
|
||||
|
||||
reference_type back() noexcept {
|
||||
reference back() noexcept {
|
||||
return buffer.back();
|
||||
}
|
||||
|
||||
const_reference_type back() const noexcept {
|
||||
const_reference back() const noexcept {
|
||||
return buffer.back();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns one element. No bounds checking.
|
||||
*/
|
||||
reference_type operator[](size_type i) noexcept {
|
||||
reference operator[](size_type i) noexcept {
|
||||
return buffer[i];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns one constant element. No bounds checking.
|
||||
*/
|
||||
const_reference_type operator[](size_type i) const noexcept {
|
||||
const_reference operator[](size_type i) const noexcept {
|
||||
return buffer[i];
|
||||
}
|
||||
|
||||
|
@@ -44,8 +44,8 @@ template<typename T=char>
|
||||
class AllocatedString {
|
||||
public:
|
||||
typedef typename StringPointer<T>::value_type value_type;
|
||||
typedef typename StringPointer<T>::reference_type reference_type;
|
||||
typedef typename StringPointer<T>::const_reference_type const_reference_type;
|
||||
typedef typename StringPointer<T>::reference reference;
|
||||
typedef typename StringPointer<T>::const_reference const_reference;
|
||||
typedef typename StringPointer<T>::pointer pointer;
|
||||
typedef typename StringPointer<T>::const_pointer const_pointer;
|
||||
typedef std::size_t size_type;
|
||||
@@ -127,11 +127,11 @@ public:
|
||||
return value;
|
||||
}
|
||||
|
||||
reference_type operator[](size_type i) {
|
||||
reference operator[](size_type i) {
|
||||
return value[i];
|
||||
}
|
||||
|
||||
const reference_type operator[](size_type i) const {
|
||||
const reference operator[](size_type i) const {
|
||||
return value[i];
|
||||
}
|
||||
|
||||
|
@@ -93,8 +93,8 @@ template<typename T>
|
||||
struct ConstBuffer {
|
||||
typedef std::size_t size_type;
|
||||
typedef T value_type;
|
||||
typedef const T &reference_type;
|
||||
typedef reference_type const_reference_type;
|
||||
typedef const T &reference;
|
||||
typedef reference const_reference;
|
||||
typedef const T *pointer;
|
||||
typedef pointer const_pointer;
|
||||
typedef pointer iterator;
|
||||
@@ -198,7 +198,7 @@ struct ConstBuffer {
|
||||
#ifdef NDEBUG
|
||||
constexpr
|
||||
#endif
|
||||
reference_type operator[](size_type i) const noexcept {
|
||||
reference operator[](size_type i) const noexcept {
|
||||
#ifndef NDEBUG
|
||||
assert(i < size);
|
||||
#endif
|
||||
@@ -213,7 +213,7 @@ struct ConstBuffer {
|
||||
#ifdef NDEBUG
|
||||
constexpr
|
||||
#endif
|
||||
reference_type front() const noexcept {
|
||||
reference front() const noexcept {
|
||||
#ifndef NDEBUG
|
||||
assert(!empty());
|
||||
#endif
|
||||
@@ -227,7 +227,7 @@ struct ConstBuffer {
|
||||
#ifdef NDEBUG
|
||||
constexpr
|
||||
#endif
|
||||
reference_type back() const noexcept {
|
||||
reference back() const noexcept {
|
||||
#ifndef NDEBUG
|
||||
assert(!empty());
|
||||
#endif
|
||||
@@ -263,8 +263,8 @@ struct ConstBuffer {
|
||||
* Remove the first element and return a reference to it.
|
||||
* Buffer must not be empty.
|
||||
*/
|
||||
reference_type shift() noexcept {
|
||||
reference_type result = front();
|
||||
reference shift() noexcept {
|
||||
reference result = front();
|
||||
pop_front();
|
||||
return result;
|
||||
}
|
||||
|
@@ -142,8 +142,8 @@ class HugeArray {
|
||||
public:
|
||||
typedef typename Buffer::size_type size_type;
|
||||
typedef typename Buffer::value_type value_type;
|
||||
typedef typename Buffer::reference_type reference;
|
||||
typedef typename Buffer::const_reference_type const_reference;
|
||||
typedef typename Buffer::reference reference;
|
||||
typedef typename Buffer::const_reference const_reference;
|
||||
typedef typename Buffer::iterator iterator;
|
||||
typedef typename Buffer::const_iterator const_iterator;
|
||||
|
||||
|
@@ -37,8 +37,8 @@ template<typename T=char>
|
||||
class StringPointer {
|
||||
public:
|
||||
typedef T value_type;
|
||||
typedef T &reference_type;
|
||||
typedef const T &const_reference_type;
|
||||
typedef T &reference;
|
||||
typedef const T &const_reference;
|
||||
typedef T *pointer;
|
||||
typedef const T *const_pointer;
|
||||
|
||||
|
@@ -92,8 +92,8 @@ template<typename T>
|
||||
struct WritableBuffer {
|
||||
typedef std::size_t size_type;
|
||||
typedef T value_type;
|
||||
typedef T &reference_type;
|
||||
typedef const T &const_reference_type;
|
||||
typedef T &reference;
|
||||
typedef const T &const_reference;
|
||||
typedef T *pointer;
|
||||
typedef const T *const_pointer;
|
||||
typedef pointer iterator;
|
||||
@@ -191,7 +191,7 @@ struct WritableBuffer {
|
||||
#ifdef NDEBUG
|
||||
constexpr
|
||||
#endif
|
||||
reference_type operator[](size_type i) const noexcept {
|
||||
reference operator[](size_type i) const noexcept {
|
||||
#ifndef NDEBUG
|
||||
assert(i < size);
|
||||
#endif
|
||||
@@ -206,7 +206,7 @@ struct WritableBuffer {
|
||||
#ifdef NDEBUG
|
||||
constexpr
|
||||
#endif
|
||||
reference_type front() const noexcept {
|
||||
reference front() const noexcept {
|
||||
#ifndef NDEBUG
|
||||
assert(!empty());
|
||||
#endif
|
||||
@@ -220,7 +220,7 @@ struct WritableBuffer {
|
||||
#ifdef NDEBUG
|
||||
constexpr
|
||||
#endif
|
||||
reference_type back() const noexcept {
|
||||
reference back() const noexcept {
|
||||
#ifndef NDEBUG
|
||||
assert(!empty());
|
||||
#endif
|
||||
@@ -252,8 +252,8 @@ struct WritableBuffer {
|
||||
* Remove the first element and return a reference to it.
|
||||
* Buffer must not be empty.
|
||||
*/
|
||||
reference_type shift() noexcept {
|
||||
reference_type result = front();
|
||||
reference shift() noexcept {
|
||||
reference result = front();
|
||||
pop_front();
|
||||
return result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user