From b05644c4fdc436c7d1ecda6dcb773ac696354bfa Mon Sep 17 00:00:00 2001 From: Dylan Brasseur Date: Fri, 15 Sep 2023 12:52:05 +0200 Subject: [PATCH] Fixed some namespaces and warnings --- .../header/submitter/SubmitterClient.h | 3 +-- packages/cpp/ArmoniK.Api.Common/header/logger/util.h | 2 +- .../header/options/GrpcSocketType.h | 10 ++++++++-- .../header/utils/EnvConfiguration.h | 12 ++++++++++-- packages/cpp/ArmoniK.Api.Common/header/utils/GuuId.h | 10 ++++++++-- 5 files changed, 28 insertions(+), 9 deletions(-) diff --git a/packages/cpp/ArmoniK.Api.Client/header/submitter/SubmitterClient.h b/packages/cpp/ArmoniK.Api.Client/header/submitter/SubmitterClient.h index fadff0205..5f4e7e735 100644 --- a/packages/cpp/ArmoniK.Api.Client/header/submitter/SubmitterClient.h +++ b/packages/cpp/ArmoniK.Api.Client/header/submitter/SubmitterClient.h @@ -92,8 +92,7 @@ class SubmitterClient { */ std::pair, std::vector> submit_tasks_with_dependencies(std::string session_id, armonik::api::grpc::v1::TaskOptions task_options, - const std::vector &payloads_with_dependencies, - [[maybe_unused]] int max_retries); + const std::vector &payloads_with_dependencies, int max_retries); /** * @brief Get result without streaming. diff --git a/packages/cpp/ArmoniK.Api.Common/header/logger/util.h b/packages/cpp/ArmoniK.Api.Common/header/logger/util.h index 3256601be..a2c706991 100644 --- a/packages/cpp/ArmoniK.Api.Common/header/logger/util.h +++ b/packages/cpp/ArmoniK.Api.Common/header/logger/util.h @@ -3,4 +3,4 @@ #include #include -const fmt::string_view to_fmt(const absl::string_view sv) { return fmt::string_view(sv.data(), sv.size()); } \ No newline at end of file +fmt::string_view to_fmt(const absl::string_view sv) { return {sv.data(), sv.size()}; } diff --git a/packages/cpp/ArmoniK.Api.Common/header/options/GrpcSocketType.h b/packages/cpp/ArmoniK.Api.Common/header/options/GrpcSocketType.h index 73c7d2c30..0e5bb04eb 100644 --- a/packages/cpp/ArmoniK.Api.Common/header/options/GrpcSocketType.h +++ b/packages/cpp/ArmoniK.Api.Common/header/options/GrpcSocketType.h @@ -4,7 +4,10 @@ * @namespace armonik::api::common::options * @brief This namespace contains common options for the armonik API. */ -namespace armonik::api::common::options { +namespace armonik { +namespace api { +namespace common { +namespace options { /** * @enum grpc_socket_type * @brief Enumerates the types of gRPC sockets supported by armonik API. @@ -13,4 +16,7 @@ enum grpc_socket_type { tcp = 1, /**< @brief TCP/IP socket type */ UnixDomainSocket = 2 /**< @brief Unix domain socket type */ }; -} // namespace armonik::api::common::options +} // namespace options +} // namespace common +} // namespace api +} // namespace armonik diff --git a/packages/cpp/ArmoniK.Api.Common/header/utils/EnvConfiguration.h b/packages/cpp/ArmoniK.Api.Common/header/utils/EnvConfiguration.h index 67974f15b..f7c4b6898 100644 --- a/packages/cpp/ArmoniK.Api.Common/header/utils/EnvConfiguration.h +++ b/packages/cpp/ArmoniK.Api.Common/header/utils/EnvConfiguration.h @@ -7,11 +7,19 @@ #include "utils/Configuration.h" -namespace armonik::api::common::utils::EnvConfiguration { +namespace armonik { +namespace api { +namespace common { +namespace utils { +namespace EnvConfiguration { inline void fromEnv(Configuration &config) { config.add_env_configuration(); } inline Configuration fromEnv() { Configuration config; config.add_env_configuration(); return config; } -} // namespace armonik::api::common::utils::EnvConfiguration +} // namespace EnvConfiguration +} // namespace utils +} // namespace common +} // namespace api +} // namespace armonik diff --git a/packages/cpp/ArmoniK.Api.Common/header/utils/GuuId.h b/packages/cpp/ArmoniK.Api.Common/header/utils/GuuId.h index ada30259d..f4abb4ee4 100644 --- a/packages/cpp/ArmoniK.Api.Common/header/utils/GuuId.h +++ b/packages/cpp/ArmoniK.Api.Common/header/utils/GuuId.h @@ -12,7 +12,10 @@ /** * @brief The armonik::api::common::utils namespace provides utility classes and functions for the ArmoniK API. */ -namespace armonik::api::common::utils { +namespace armonik { +namespace api { +namespace common { +namespace utils { /** * @class GuuId * @brief The GuuId class provides a static method for generating UUIDs. @@ -44,4 +47,7 @@ class GuuId { return uuid; } }; -} // namespace armonik::api::common::utils +} // namespace utils +} // namespace common +} // namespace api +} // namespace armonik