mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-27 03:21:34 +00:00
Add comments.
This commit is contained in:
parent
6798c1704e
commit
c1f947f4fb
6
format.h
6
format.h
@ -126,10 +126,13 @@ class BasicFormatter;
|
|||||||
struct FormatSpec;
|
struct FormatSpec;
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
|
// The number of characters to store in the Array object, representing the
|
||||||
|
// output buffer, itself to avoid dynamic memory allocation.
|
||||||
enum { INLINE_BUFFER_SIZE = 500 };
|
enum { INLINE_BUFFER_SIZE = 500 };
|
||||||
|
|
||||||
#if _SECURE_SCL
|
#if _SECURE_SCL
|
||||||
|
// Use checked iterator to avoid warnings on MSVC.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
inline stdext::checked_array_iterator<T*> CheckPtr(T *ptr, std::size_t size) {
|
inline stdext::checked_array_iterator<T*> CheckPtr(T *ptr, std::size_t size) {
|
||||||
return stdext::checked_array_iterator<T*>(ptr, size);
|
return stdext::checked_array_iterator<T*>(ptr, size);
|
||||||
@ -203,6 +206,7 @@ class Array {
|
|||||||
size_ = new_size;
|
size_ = new_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reserves space to store at least capacity elements.
|
||||||
void reserve(std::size_t capacity) {
|
void reserve(std::size_t capacity) {
|
||||||
if (capacity > capacity_)
|
if (capacity > capacity_)
|
||||||
Grow(capacity);
|
Grow(capacity);
|
||||||
|
Loading…
Reference in New Issue
Block a user