From bd8cc3c0fd3a92d747a8e340f198fdb33773d0d1 Mon Sep 17 00:00:00 2001 From: Arniiiii Date: Wed, 30 Oct 2024 17:43:15 +0000 Subject: [PATCH] remove unnecessary const add necessary const --- f_to_string.hpp | 6 +++--- to_string.hpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/f_to_string.hpp b/f_to_string.hpp index 204a5f2..df4d7be 100644 --- a/f_to_string.hpp +++ b/f_to_string.hpp @@ -68,7 +68,7 @@ class f_to_string_t { constexpr auto size() const noexcept { return sizeof(buf) / sizeof(buf[0]); } // Element access constexpr auto data() noexcept { return buf; } - constexpr const auto data() const noexcept { return buf; } + constexpr auto data() const noexcept { return buf; } constexpr auto& operator[](unsigned int i) noexcept { return buf[i]; } constexpr const auto& operator[](unsigned int i) const noexcept { return buf[i]; } constexpr auto& front() noexcept { return buf[0]; } @@ -77,9 +77,9 @@ class f_to_string_t { constexpr const auto& back() const noexcept { return buf[size() - 1]; } // Iterators constexpr auto begin() noexcept { return buf; } - constexpr const auto begin() const noexcept { return buf; } + constexpr auto begin() const noexcept { return buf; } constexpr auto end() noexcept { return buf + size(); } - constexpr const auto end() const noexcept { return buf + size(); } + constexpr auto end() const noexcept { return buf + size(); } }; } // namespace constexpr_to_string diff --git a/to_string.hpp b/to_string.hpp index d0a4dbe..257718c 100644 --- a/to_string.hpp +++ b/to_string.hpp @@ -58,7 +58,7 @@ class to_string_t { // Element access constexpr auto data() noexcept { return buf; } - constexpr const auto data() const noexcept { return buf; } + constexpr auto data() const noexcept { return buf; } constexpr auto& operator[](unsigned int i) noexcept { return buf[i]; } constexpr const auto& operator[](unsigned int i) const noexcept { return buf[i]; } constexpr auto& front() noexcept { return buf[0]; } @@ -68,9 +68,9 @@ class to_string_t { // Iterators constexpr auto begin() noexcept { return buf; } - constexpr const auto begin() const noexcept { return buf; } + constexpr auto begin() const noexcept { return buf; } constexpr auto end() noexcept { return buf + size(); } - constexpr const auto end() const noexcept { return buf + size(); } + constexpr auto end() const noexcept { return buf + size(); } }; } // namespace constexpr_to_string