From 8d81cca86c51838c29598e982918d1f8ec3dfd68 Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 3 May 2024 18:34:16 +0300 Subject: [PATCH] constexpr in tcp_client_unix --- include/spdlog/details/tcp_client_unix.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/spdlog/details/tcp_client_unix.h b/include/spdlog/details/tcp_client_unix.h index 9364eda5..945ef2df 100644 --- a/include/spdlog/details/tcp_client_unix.h +++ b/include/spdlog/details/tcp_client_unix.h @@ -61,9 +61,9 @@ public: int last_errno = 0; for (auto *rp = addrinfo_result; rp != nullptr; rp = rp->ai_next) { #if defined(SOCK_CLOEXEC) - const int flags = SOCK_CLOEXEC; + constexpr int flags = SOCK_CLOEXEC; #else - const int flags = 0; + constexpr int flags = 0; #endif socket_ = ::socket(rp->ai_family, rp->ai_socktype | flags, rp->ai_protocol); if (socket_ == -1) {