diff --git a/repertory/librepertory/include/app_config.hpp b/repertory/librepertory/include/app_config.hpp index b7ec3de1..dea68fcc 100644 --- a/repertory/librepertory/include/app_config.hpp +++ b/repertory/librepertory/include/app_config.hpp @@ -106,28 +106,6 @@ private: std::uint64_t version_{REPERTORY_CONFIG_VERSION}; private: - template - auto get_value(const json &data, const std::string &name, dest &dst, - bool &found) -> bool { - REPERTORY_USES_FUNCTION_NAME(); - - try { - if (data.find(name) == data.end()) { - found = false; - return false; - } - - data.at(name).get_to(dst); - return true; - } catch (const std::exception &ex) { - utils::error::raise_error( - function_name, ex, fmt::format("failed to get value|name|{}", name)); - } - - found = false; - return false; - } - [[nodiscard]] auto load() -> bool; template diff --git a/repertory/librepertory/src/app_config.cpp b/repertory/librepertory/src/app_config.cpp index 75d36f5d..8a1ee353 100644 --- a/repertory/librepertory/src/app_config.cpp +++ b/repertory/librepertory/src/app_config.cpp @@ -53,6 +53,28 @@ constexpr const auto default_retry_read_count{6U}; constexpr const auto default_ring_buffer_file_size{512U}; constexpr const auto default_task_wait_ms{100U}; constexpr const auto min_cache_size_bytes{100ULL * 1024ULL * 1024ULL}; + +template +auto get_value(const json &data, const std::string &name, dest &dst, + bool &found) -> bool { + REPERTORY_USES_FUNCTION_NAME(); + + try { + if (data.find(name) == data.end()) { + found = false; + return false; + } + + data.at(name).get_to(dst); + return true; + } catch (const std::exception &ex) { + repertory::utils::error::raise_error( + function_name, ex, fmt::format("failed to get value|name|{}", name)); + } + + found = false; + return false; +} } // namespace namespace repertory {