From a72746d4912b2331d73567953520979583113150 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Fri, 20 Dec 2024 17:55:33 -0600 Subject: [PATCH] refactor --- repertory/librepertory/include/types/repertory.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/repertory/librepertory/include/types/repertory.hpp b/repertory/librepertory/include/types/repertory.hpp index 0b010f35..9f4881e1 100644 --- a/repertory/librepertory/include/types/repertory.hpp +++ b/repertory/librepertory/include/types/repertory.hpp @@ -23,6 +23,8 @@ #define REPERTORY_INCLUDE_TYPES_REPERTORY_HPP_ namespace repertory { +constexpr const auto default_timeout_ms{60000U}; + template class atomic final { public: atomic() : mtx_(std::make_shared()) {} @@ -321,7 +323,7 @@ struct host_config final { std::string host_name_or_ip{"localhost"}; std::string path; std::string protocol{"http"}; - std::uint32_t timeout_ms{60000U}; + std::uint32_t timeout_ms{default_timeout_ms}; auto operator==(const host_config &cfg) const noexcept -> bool { if (&cfg != this) { @@ -350,7 +352,7 @@ struct s3_config final { std::string encryption_token; std::string region{"any"}; std::string secret_key; - std::uint32_t timeout_ms{60000U}; + std::uint32_t timeout_ms{default_timeout_ms}; std::string url; bool use_path_style{false}; bool use_region_in_url{false};