Skip to content

Commit

Permalink
Update HttpParser.h
Browse files Browse the repository at this point in the history
  • Loading branch information
uNetworkingAB authored Dec 15, 2023
1 parent 16f0e95 commit 7f43b5d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/HttpParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ static void *FULLPTR = (void *)~(uintptr_t)0;

/* STL needs one of these */
template <typename T>
std::optional<T *> maybeify(T *ptr) {
return ptr ? ptr : std::nullopt;
std::optional<T *> optional_ptr(T *ptr) {
return ptr ? std::optional<T *>(ptr) : std::nullopt;
}

static const size_t MAX_FALLBACK_SIZE = atoi(maybeify(getenv("UWS_HTTP_MAX_HEADERS_SIZE")).value_or("4096"));
static const size_t MAX_FALLBACK_SIZE = atoi(optional_ptr(getenv("UWS_HTTP_MAX_HEADERS_SIZE")).value_or("4096"));

struct HttpRequest {

Expand Down

0 comments on commit 7f43b5d

Please sign in to comment.