From db1320dd3a3d92ada967ca47db6f7db7a0ec88d9 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Thu, 31 Oct 2024 14:12:32 -0500 Subject: [PATCH] updated build system --- support/include/utils/collection.hpp | 28 +++++++++--------- support/include/utils/common.hpp | 43 ++++++++++++++-------------- support/include/utils/unix.hpp | 12 ++++---- support/test/include/test.hpp | 4 +-- 4 files changed, 44 insertions(+), 43 deletions(-) diff --git a/support/include/utils/collection.hpp b/support/include/utils/collection.hpp index a1e59e9b..2da36e0c 100644 --- a/support/include/utils/collection.hpp +++ b/support/include/utils/collection.hpp @@ -29,22 +29,22 @@ namespace repertory::utils::collection { template -[[nodiscard]] inline auto -excludes(const col_t &collection, - const typename col_t::value_type &val) -> bool; +[[nodiscard]] inline auto excludes(const col_t &collection, + const typename col_t::value_type &val) + -> bool; template -[[nodiscard]] inline auto -includes(const col_t &collection, - const typename col_t::value_type &val) -> bool; +[[nodiscard]] inline auto includes(const col_t &collection, + const typename col_t::value_type &val) + -> bool; template -[[nodiscard]] inline auto from_hex_string(std::string_view str, - val_t &val) -> bool; +[[nodiscard]] inline auto from_hex_string(std::string_view str, val_t &val) + -> bool; template -[[nodiscard]] inline auto from_hex_string(std::wstring_view str, - val_t &val) -> bool; +[[nodiscard]] inline auto from_hex_string(std::wstring_view str, val_t &val) + -> bool; template inline auto remove_element(col_t &collection, const typename col_t::value_type &value) -> col_t &; @@ -53,8 +53,8 @@ template [[nodiscard]] inline auto to_hex_string(const col_t &collection) -> std::string; template -[[nodiscard]] inline auto -to_hex_wstring(const col_t &collection) -> std::wstring; +[[nodiscard]] inline auto to_hex_wstring(const col_t &collection) + -> std::wstring; template inline auto excludes(const col_t &collection, @@ -71,8 +71,8 @@ inline auto includes(const col_t &collection, } template -[[nodiscard]] inline auto from_hex_string_t(std::string_view str, - val_t &val) -> bool { +[[nodiscard]] inline auto from_hex_string_t(std::string_view str, val_t &val) + -> bool { REPERTORY_USES_FUNCTION_NAME(); static constexpr const auto base16{16}; diff --git a/support/include/utils/common.hpp b/support/include/utils/common.hpp index 1da0974b..d305fb54 100644 --- a/support/include/utils/common.hpp +++ b/support/include/utils/common.hpp @@ -44,13 +44,13 @@ calculate_read_size(std::uint64_t total_size, std::size_t read_size, : read_size); } -[[nodiscard]] auto -compare_version_strings(std::string version1, - std::string version2) -> std::int32_t; +[[nodiscard]] auto compare_version_strings(std::string version1, + std::string version2) + -> std::int32_t; -[[nodiscard]] auto -compare_version_strings(std::wstring_view version1, - std::wstring_view version2) -> std::int32_t; +[[nodiscard]] auto compare_version_strings(std::wstring_view version1, + std::wstring_view version2) + -> std::int32_t; #if defined(PROJECT_ENABLE_STDUUID) [[nodiscard]] auto create_uuid_string() -> std::string; @@ -59,12 +59,13 @@ compare_version_strings(std::wstring_view version1, #endif // defined(PROJECT_ENABLE_STDUUID) template -[[nodiscard]] inline constexpr auto -divide_with_ceiling(result_t numerator, data_t denominator) -> result_t; +[[nodiscard]] inline constexpr auto divide_with_ceiling(result_t numerator, + data_t denominator) + -> result_t; template -[[nodiscard]] inline auto generate_random_between(data_t begin, - data_t end) -> data_t; +[[nodiscard]] inline auto generate_random_between(data_t begin, data_t end) + -> data_t; [[nodiscard]] auto generate_random_string(std::size_t length) -> std::string; @@ -78,22 +79,22 @@ template [[nodiscard]] inline auto generate_secure_random(std::size_t size) -> data_t; #endif // defined(PROJECT_ENABLE_LIBSODIUM) -[[nodiscard]] auto -get_environment_variable(std::string_view variable) -> std::string; +[[nodiscard]] auto get_environment_variable(std::string_view variable) + -> std::string; -[[nodiscard]] auto -get_environment_variable(std::wstring_view variable) -> std::wstring; +[[nodiscard]] auto get_environment_variable(std::wstring_view variable) + -> std::wstring; #if defined(PROJECT_ENABLE_BOOST) -[[nodiscard]] auto -get_next_available_port(std::uint16_t first_port, - std::uint16_t &available_port) -> bool; +[[nodiscard]] auto get_next_available_port(std::uint16_t first_port, + std::uint16_t &available_port) + -> bool; #endif // defined(PROJECT_ENABLE_BOOST) -[[nodiscard]] auto retry_action(retryable_action_t action, - std::size_t retry_count = 200U, - std::chrono::milliseconds retry_wait = - std::chrono::milliseconds(10)) -> bool; +[[nodiscard]] auto retry_action( + retryable_action_t action, std::size_t retry_count = 200U, + std::chrono::milliseconds retry_wait = std::chrono::milliseconds(10)) + -> bool; template inline constexpr auto divide_with_ceiling(result_t numerator, diff --git a/support/include/utils/unix.hpp b/support/include/utils/unix.hpp index 4c54d828..424cf9b1 100644 --- a/support/include/utils/unix.hpp +++ b/support/include/utils/unix.hpp @@ -31,8 +31,8 @@ using passwd_callback_t = std::function; #if defined(__APPLE__) template -[[nodiscard]] auto -convert_to_uint64(const thread_t *thread_ptr) -> std::uint64_t; +[[nodiscard]] auto convert_to_uint64(const thread_t *thread_ptr) + -> std::uint64_t; #else // !defined(__APPLE__) [[nodiscard]] auto convert_to_uint64(const pthread_t &thread) -> std::uint64_t; #endif // defined(__APPLE__) @@ -45,14 +45,14 @@ convert_to_uint64(const thread_t *thread_ptr) -> std::uint64_t; void set_last_error_code(int error_code); -[[nodiscard]] auto use_getpwuid(uid_t uid, - passwd_callback_t callback) -> utils::result; +[[nodiscard]] auto use_getpwuid(uid_t uid, passwd_callback_t callback) + -> utils::result; // template implementations #if defined(__APPLE__) template -[[nodiscard]] auto -convert_to_uint64(const thread_t *thread_ptr) -> std::uint64_t { +[[nodiscard]] auto convert_to_uint64(const thread_t *thread_ptr) + -> std::uint64_t { return static_cast( reinterpret_cast(thread_ptr)); } diff --git a/support/test/include/test.hpp b/support/test/include/test.hpp index 52693dc4..7aea9c00 100644 --- a/support/test/include/test.hpp +++ b/support/test/include/test.hpp @@ -37,8 +37,8 @@ using namespace ::testing; #include "utils/all.hpp" namespace repertory::test { -[[nodiscard]] auto -create_random_file(std::size_t size) -> utils::file::i_file &; +[[nodiscard]] auto create_random_file(std::size_t size) + -> utils::file::i_file &; [[nodiscard]] auto generate_test_file_name(std::string_view file_name_no_extension) -> std::string;