From 8a88a019ea5510e029a2fef5b66ba9073276a40a Mon Sep 17 00:00:00 2001 From: eidheim Date: Sun, 18 Dec 2016 17:34:22 +0100 Subject: [PATCH] Minor cleanup, replaced expression with std::min --- server_https.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server_https.hpp b/server_https.hpp index 58266c4..85fda94 100644 --- a/server_https.hpp +++ b/server_https.hpp @@ -4,6 +4,7 @@ #include "server_http.hpp" #include #include +#include namespace SimpleWeb { typedef boost::asio::ssl::stream HTTPS; @@ -35,7 +36,7 @@ namespace SimpleWeb { session_id_context=std::to_string(config.port)+':'; session_id_context.append(config.address.rbegin(), config.address.rend()); SSL_CTX_set_session_id_context(context.native_handle(), reinterpret_cast(session_id_context.data()), - session_id_context.size()<=SSL_MAX_SSL_SESSION_ID_LENGTH?session_id_context.size():SSL_MAX_SSL_SESSION_ID_LENGTH); + std::min(session_id_context.size(), SSL_MAX_SSL_SESSION_ID_LENGTH)); } ServerBase::start(); }