From ca726a01105287a09eed110339e7c76774156a5e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 25 Mar 2021 17:37:03 +0100 Subject: [PATCH] util/StringBuffer: make capacity() static This allows using it in constant expressions. --- src/util/StringBuffer.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/StringBuffer.hxx b/src/util/StringBuffer.hxx index 817e31063..49593d6c1 100644 --- a/src/util/StringBuffer.hxx +++ b/src/util/StringBuffer.hxx @@ -53,7 +53,7 @@ protected: public: using const_iterator = typename Array::const_iterator; - constexpr size_type capacity() const noexcept { + static constexpr size_type capacity() noexcept { return CAPACITY; }