| Index: courgette/memory_allocator.h
|
| diff --git a/courgette/memory_allocator.h b/courgette/memory_allocator.h
|
| index e1d8573df8effa0baba605b2129224e99286fcd6..5b402d37d9bae704e31b7d67e1689095e73b0ebf 100644
|
| --- a/courgette/memory_allocator.h
|
| +++ b/courgette/memory_allocator.h
|
| @@ -5,9 +5,9 @@
|
| #ifndef COURGETTE_MEMORY_ALLOCATOR_H_
|
| #define COURGETTE_MEMORY_ALLOCATOR_H_
|
|
|
| -#include <stddef.h>
|
| -#include <stdint.h>
|
| -#include <stdlib.h>
|
| +#include <cstddef>
|
| +#include <cstdint>
|
| +#include <cstdlib>
|
|
|
| #include "base/compiler_specific.h"
|
| #include "base/files/file.h"
|
| @@ -331,7 +331,10 @@ class MemoryAllocator {
|
| template<typename T, class Allocator = MemoryAllocator<T> >
|
| class NoThrowBuffer {
|
| public:
|
| - typedef T value_type;
|
| + using value_type = T;
|
| + using iterator = T*;
|
| + using const_iterator = const T*;
|
| +
|
| static const size_t kAllocationFailure = 0xffffffff;
|
| static const size_t kStartSize = sizeof(T) > 0x100 ? 1 : 0x100 / sizeof(T);
|
|
|
| @@ -443,25 +446,25 @@ class NoThrowBuffer {
|
| return buffer_[size_ - 1];
|
| }
|
|
|
| - const T* begin() const {
|
| + const_iterator begin() const {
|
| if (!size_)
|
| return NULL;
|
| return buffer_;
|
| }
|
|
|
| - T* begin() {
|
| + iterator begin() {
|
| if (!size_)
|
| return NULL;
|
| return buffer_;
|
| }
|
|
|
| - const T* end() const {
|
| + const_iterator end() const {
|
| if (!size_)
|
| return NULL;
|
| return buffer_ + size_;
|
| }
|
|
|
| - T* end() {
|
| + iterator end() {
|
| if (!size_)
|
| return NULL;
|
| return buffer_ + size_;
|
|
|