From d69ee37362d536e652e60883e45592c215edbe12 Mon Sep 17 00:00:00 2001 From: deniskovalchuk Date: Mon, 2 Oct 2023 17:35:01 +0300 Subject: [PATCH] refactor: reorder methods No functional changes. --- src/client.cpp | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/client.cpp b/src/client.cpp index 21bc005..edd32e4 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -337,6 +337,23 @@ reply client::set_transfer_type(transfer_type type) return reply; } +std::string client::make_type_command(transfer_type type) +{ + if (type == transfer_type::binary) + { + return make_command("TYPE", "I"); + } + else if (type == transfer_type::ascii) + { + return make_command("TYPE", "A"); + } + else + { + assert(false); + return ""; + } +} + transfer_type client::get_transfer_type() const { return transfer_type_; @@ -884,23 +901,6 @@ std::string client::make_command(std::string_view command, const std::optional & observer : observers_)