From 9cc223d41988b9c99dfdc661ca5eafbb221e7643 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 15 Mar 2017 23:12:50 +0900 Subject: [PATCH] nghttpx: Use constexpr --- src/shrpx_connection.cc | 2 +- src/shrpx_http2_session.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/shrpx_connection.cc b/src/shrpx_connection.cc index 844735b6..b6c5b648 100644 --- a/src/shrpx_connection.cc +++ b/src/shrpx_connection.cc @@ -561,7 +561,7 @@ int Connection::check_http2_requirement() { } namespace { -const size_t SHRPX_SMALL_WRITE_LIMIT = 1300; +constexpr size_t SHRPX_SMALL_WRITE_LIMIT = 1300; } // namespace size_t Connection::get_tls_write_limit() { diff --git a/src/shrpx_http2_session.cc b/src/shrpx_http2_session.cc index 00d5afe7..997cbb4a 100644 --- a/src/shrpx_http2_session.cc +++ b/src/shrpx_http2_session.cc @@ -54,8 +54,8 @@ using namespace nghttp2; namespace shrpx { namespace { -const ev_tstamp CONNCHK_TIMEOUT = 5.; -const ev_tstamp CONNCHK_PING_TIMEOUT = 1.; +constexpr ev_tstamp CONNCHK_TIMEOUT = 5.; +constexpr ev_tstamp CONNCHK_PING_TIMEOUT = 1.; } // namespace namespace {