From 4638af09c9adc222388ab2a264e56736ac9f0d35 Mon Sep 17 00:00:00 2001 From: Gabor Gyimesi Date: Fri, 18 Aug 2023 15:41:42 +0200 Subject: [PATCH] Fix clang tidy issues --- extensions/sftp/processors/FetchSFTP.cpp | 5 ++--- extensions/sftp/processors/FetchSFTP.h | 3 ++- extensions/sftp/processors/ListSFTP.cpp | 5 ++--- extensions/sftp/processors/ListSFTP.h | 3 ++- extensions/sftp/processors/PutSFTP.cpp | 5 ++--- extensions/sftp/processors/PutSFTP.h | 3 ++- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/extensions/sftp/processors/FetchSFTP.cpp b/extensions/sftp/processors/FetchSFTP.cpp index 5c13a2eb01..7046c11de7 100644 --- a/extensions/sftp/processors/FetchSFTP.cpp +++ b/extensions/sftp/processors/FetchSFTP.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include "core/FlowFile.h" @@ -40,8 +39,8 @@ void FetchSFTP::initialize() { setSupportedRelationships(Relationships); } -FetchSFTP::FetchSFTP(std::string name, const utils::Identifier& uuid /*= utils::Identifier()*/) - : SFTPProcessorBase(std::move(name), uuid) { +FetchSFTP::FetchSFTP(std::string_view name, const utils::Identifier& uuid /*= utils::Identifier()*/) + : SFTPProcessorBase(name, uuid) { logger_ = core::logging::LoggerFactory::getLogger(uuid_); } diff --git a/extensions/sftp/processors/FetchSFTP.h b/extensions/sftp/processors/FetchSFTP.h index 5f3eb3b7d3..7a80cca9f3 100644 --- a/extensions/sftp/processors/FetchSFTP.h +++ b/extensions/sftp/processors/FetchSFTP.h @@ -18,6 +18,7 @@ #include #include +#include #include "SFTPProcessorBase.h" #include "utils/ByteArrayCallback.h" @@ -41,7 +42,7 @@ class FetchSFTP : public SFTPProcessorBase { static constexpr char const *COMPLETION_STRATEGY_MOVE_FILE = "Move File"; static constexpr char const *COMPLETION_STRATEGY_DELETE_FILE = "Delete File"; - explicit FetchSFTP(std::string name, const utils::Identifier& uuid = {}); + explicit FetchSFTP(std::string_view name, const utils::Identifier& uuid = {}); ~FetchSFTP() override; EXTENSIONAPI static constexpr const char* Description = "Fetches the content of a file from a remote SFTP server " diff --git a/extensions/sftp/processors/ListSFTP.cpp b/extensions/sftp/processors/ListSFTP.cpp index d278e5bf64..9bddb34a3d 100644 --- a/extensions/sftp/processors/ListSFTP.cpp +++ b/extensions/sftp/processors/ListSFTP.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -67,8 +66,8 @@ void ListSFTP::initialize() { setSupportedRelationships(Relationships); } -ListSFTP::ListSFTP(std::string name, const utils::Identifier& uuid /*= utils::Identifier()*/) - : SFTPProcessorBase(std::move(name), uuid) { +ListSFTP::ListSFTP(std::string_view name, const utils::Identifier& uuid /*= utils::Identifier()*/) + : SFTPProcessorBase(name, uuid) { logger_ = core::logging::LoggerFactory::getLogger(uuid_); } diff --git a/extensions/sftp/processors/ListSFTP.h b/extensions/sftp/processors/ListSFTP.h index 432c98002a..02aec005fc 100644 --- a/extensions/sftp/processors/ListSFTP.h +++ b/extensions/sftp/processors/ListSFTP.h @@ -27,6 +27,7 @@ #include #include #include +#include #include "SFTPProcessorBase.h" #include "core/Processor.h" @@ -54,7 +55,7 @@ class ListSFTP : public SFTPProcessorBase { static constexpr std::string_view ENTITY_TRACKING_INITIAL_LISTING_TARGET_TRACKING_TIME_WINDOW = "Tracking Time Window"; static constexpr std::string_view ENTITY_TRACKING_INITIAL_LISTING_TARGET_ALL_AVAILABLE = "All Available"; - explicit ListSFTP(std::string name, const utils::Identifier& uuid = {}); + explicit ListSFTP(std::string_view name, const utils::Identifier& uuid = {}); ~ListSFTP() override; EXTENSIONAPI static constexpr const char* Description = "Performs a listing of the files residing on an SFTP server. " diff --git a/extensions/sftp/processors/PutSFTP.cpp b/extensions/sftp/processors/PutSFTP.cpp index f1d82488ce..f1275210bd 100644 --- a/extensions/sftp/processors/PutSFTP.cpp +++ b/extensions/sftp/processors/PutSFTP.cpp @@ -21,7 +21,6 @@ #include #include #include -#include #include #include "core/FlowFile.h" @@ -41,8 +40,8 @@ void PutSFTP::initialize() { setSupportedRelationships(Relationships); } -PutSFTP::PutSFTP(std::string name, const utils::Identifier& uuid /*= utils::Identifier()*/) - : SFTPProcessorBase(std::move(name), uuid), +PutSFTP::PutSFTP(std::string_view name, const utils::Identifier& uuid /*= utils::Identifier()*/) + : SFTPProcessorBase(name, uuid), create_directory_(false), batch_size_(0), reject_zero_byte_(false), diff --git a/extensions/sftp/processors/PutSFTP.h b/extensions/sftp/processors/PutSFTP.h index acbfa7552c..0ef1db4da9 100644 --- a/extensions/sftp/processors/PutSFTP.h +++ b/extensions/sftp/processors/PutSFTP.h @@ -18,6 +18,7 @@ #include #include +#include #include #include #include @@ -50,7 +51,7 @@ class PutSFTP : public SFTPProcessorBase { static constexpr std::string_view CONFLICT_RESOLUTION_FAIL = "FAIL"; static constexpr std::string_view CONFLICT_RESOLUTION_NONE = "NONE"; - explicit PutSFTP(std::string name, const utils::Identifier& uuid = {}); + explicit PutSFTP(std::string_view name, const utils::Identifier& uuid = {}); ~PutSFTP() override; EXTENSIONAPI static constexpr const char* Description = "Sends FlowFiles to an SFTP Server";