From e5c93108e615fa9377953d11a2f2821ae18a3a14 Mon Sep 17 00:00:00 2001 From: gabime Date: Mon, 9 Jul 2018 14:47:22 +0300 Subject: [PATCH] Added clear() to basic_buffer --- include/fmt/core.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/fmt/core.h b/include/fmt/core.h index 7a0db5d6..de44556b 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -379,6 +379,11 @@ class basic_buffer { size_ = new_size; } + /** Clears this buffer. */ + void clear() { + size_ = 0; + } + /** Reserves space to store at least *capacity* elements. */ void reserve(std::size_t new_capacity) { if (new_capacity > capacity_)