scripted-diff: Use inline constexpr over plain constexpr

Both are identical since C++17 and this refactor shouldn't change any
behavior. The benefits are consistency and to be explicit, to avoid
confusion with the C++11/14 constexpr.

Co-Authored-By: l0rinc <pap.lorinc@gmail.com>

-BEGIN VERIFY SCRIPT-
 sed -i --regexp-extended 's/^constexpr \S+ \w+(\[\])? ?[={]/inline &/' $( \
     git grep -l '^constexpr ' -- \
       '*.h' \
       ':(exclude)src/minisketch' \
 )
-END VERIFY SCRIPT-
This commit is contained in:
MarcoFalke
2026-08-04 10:11:10 +02:00
parent fa74f58a26
commit fae759be79
14 changed files with 38 additions and 38 deletions

View File

@@ -68,16 +68,16 @@ namespace http_bitcoin {
using util::LineReader;
//! Shortest valid request line, used by libevent in evhttp_parse_request_line()
constexpr size_t MIN_REQUEST_LINE_LENGTH = std::string_view("GET / HTTP/1.0").size();
inline constexpr size_t MIN_REQUEST_LINE_LENGTH = std::string_view("GET / HTTP/1.0").size();
//! Maximum size of each headers line in an HTTP request,
//! also the maximum size of all headers total.
//! See https://github.com/bitcoin/bitcoin/pull/6859
//! And libevent http.c evhttp_parse_headers_()
constexpr size_t MAX_HEADERS_SIZE{8192};
inline constexpr size_t MAX_HEADERS_SIZE{8192};
//! Maximum size of an HTTP request body
constexpr uint64_t MAX_BODY_SIZE{32_MiB};
inline constexpr uint64_t MAX_BODY_SIZE{32_MiB};
//! Thrown when a request body exceeds MAX_BODY_SIZE (or *will* exceed, in chunked transfer)
//! so the server can reply with more specific code 413 (content too large) vs general 400 (bad request)