From afc13b45f4a9acc47950728f99b5554ee8ab852d Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Thu, 25 Jul 2024 10:16:17 -0500 Subject: [PATCH] refactor --- project.cmake | 5 ----- .../include/providers/s3/s3_provider.hpp | 2 -- repertory/librepertory/include/types/s3.hpp | 1 - repertory/librepertory/include/utils/cli_utils.hpp | 4 ---- repertory/librepertory/src/providers/provider.cpp | 2 -- .../librepertory/src/providers/s3/s3_provider.cpp | 4 ---- repertory/librepertory/src/utils/cli_utils.cpp | 13 +++---------- repertory/repertory/include/cli/help.hpp | 4 ---- repertory/repertory/main.cpp | 2 -- .../include/fixtures/winfsp_fixture.hpp | 2 -- repertory/repertory_test/src/fuse_drive_test.cpp | 4 ---- repertory/repertory_test/src/providers_test.cpp | 2 -- repertory/repertory_test/src/winfsp_test.cpp | 2 -- 13 files changed, 3 insertions(+), 44 deletions(-) diff --git a/project.cmake b/project.cmake index f670899c..a89eada3 100644 --- a/project.cmake +++ b/project.cmake @@ -1,8 +1,3 @@ -option(PROJECT_ENABLE_S3 "Enable S3 support" ON) -if (PROJECT_ENABLE_S3) - add_definitions(-DPROJECT_ENABLE_S3) -endif() - set(CMAKE_CXX_FLAGS "-include common.hpp ${CMAKE_CXX_FLAGS}") add_project_library(lib${PROJECT_NAME} "" "" "${PROJECT_ADDITIONAL_SOURCES}") diff --git a/repertory/librepertory/include/providers/s3/s3_provider.hpp b/repertory/librepertory/include/providers/s3/s3_provider.hpp index 5234f008..0d8643fd 100644 --- a/repertory/librepertory/include/providers/s3/s3_provider.hpp +++ b/repertory/librepertory/include/providers/s3/s3_provider.hpp @@ -21,7 +21,6 @@ */ #ifndef INCLUDE_PROVIDERS_S3_S3_PROVIDER_HPP_ #define INCLUDE_PROVIDERS_S3_S3_PROVIDER_HPP_ -#if defined(PROJECT_ENABLE_S3) #include "providers/base_provider.hpp" #include "types/repertory.hpp" @@ -138,5 +137,4 @@ public: }; } // namespace repertory -#endif // PROJECT_ENABLE_S3 #endif // INCLUDE_PROVIDERS_S3_S3_PROVIDER_HPP_ diff --git a/repertory/librepertory/include/types/s3.hpp b/repertory/librepertory/include/types/s3.hpp index 0aaa8bfa..f72ffb7e 100644 --- a/repertory/librepertory/include/types/s3.hpp +++ b/repertory/librepertory/include/types/s3.hpp @@ -21,7 +21,6 @@ */ #ifndef INCLUDE_TYPES_S3_HPP_ #define INCLUDE_TYPES_S3_HPP_ -#if defined(PROJECT_ENABLE_S3) #include "types/repertory.hpp" #include "utils/string_utils.hpp" diff --git a/repertory/librepertory/include/utils/cli_utils.hpp b/repertory/librepertory/include/utils/cli_utils.hpp index a73dd469..fca6f004 100644 --- a/repertory/librepertory/include/utils/cli_utils.hpp +++ b/repertory/librepertory/include/utils/cli_utils.hpp @@ -33,10 +33,8 @@ static const option display_config_option = {"-dc", "--display_config"}; static const option data_directory_option = {"-dd", "--data_directory"}; static const option encrypt_option = {"-en", "--encrypt"}; static const option drive_information_option = {"-di", "--drive_information"}; -#if defined(PROJECT_ENABLE_S3) static const option name_option = {"-na", "--name"}; static const option s3_option = {"-s3", "--s3"}; -#endif // defined(PROJECT_ENABLE_S3) static const option generate_config_option = {"-gc", "--generate_config"}; static const option get_option = {"-get", "--get"}; static const option get_directory_items_option = {"-gdi", @@ -62,10 +60,8 @@ static const std::vector