From dd5a9691f992f7f257243cbecb516a4ab584dcde Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Thu, 20 Jul 2023 07:36:30 -0700 Subject: [PATCH] Clarify that data is not null-terminated --- include/fmt/core.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index 7b442502..37336751 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -836,10 +836,8 @@ template class buffer { /** Returns the capacity of this buffer. */ constexpr auto capacity() const noexcept -> size_t { return capacity_; } - /** Returns a pointer to the buffer data. */ + /** Returns a pointer to the buffer data (not null-terminated). */ FMT_CONSTEXPR auto data() noexcept -> T* { return ptr_; } - - /** Returns a pointer to the buffer data. */ FMT_CONSTEXPR auto data() const noexcept -> const T* { return ptr_; } /** Clears this buffer. */