From a3f75188f74ad46e639f7b9777f9bdcc9b8787d0 Mon Sep 17 00:00:00 2001 From: Shmuel Zeigerman Date: Sun, 12 Nov 2023 20:00:25 +0200 Subject: [PATCH] Refactoring --- far/src/copy.cpp | 2 +- far/src/macro/macro.cpp | 2 +- far/src/mix/udlist.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/far/src/copy.cpp b/far/src/copy.cpp index 180c0baeb..db7263893 100644 --- a/far/src/copy.cpp +++ b/far/src/copy.cpp @@ -1152,7 +1152,7 @@ ShellCopy::ShellCopy(Panel *SrcPanel, // исходная панель ( const wchar_t *NamePtr; FARString strNameTmp; // посчитаем количество целей. - CountTarget=DestList.GetTotal(); + CountTarget=DestList.Size(); TotalFiles=0; TotalCopySize=TotalCopiedSize=TotalSkippedSize=0; ProgressUpdateTime=0; diff --git a/far/src/macro/macro.cpp b/far/src/macro/macro.cpp index b15fe62bd..230e452bd 100644 --- a/far/src/macro/macro.cpp +++ b/far/src/macro/macro.cpp @@ -3485,7 +3485,7 @@ int FarMacroApi::UDList_Split() auto Subj = Params[1].toString(); UserDefinedList udl(Flags); - if (udl.Set(Subj)) + if (udl.Set(Subj) && udl.Size()) { const wchar_t* str; for (int i=0; (str=udl.Get(i)); i++) diff --git a/far/src/mix/udlist.hpp b/far/src/mix/udlist.hpp index ea5a025cd..bdb3c20f3 100644 --- a/far/src/mix/udlist.hpp +++ b/far/src/mix/udlist.hpp @@ -128,5 +128,5 @@ class UserDefinedList : private NonCopyable bool IsLastElement(size_t Index) const { return Index + 1 == Array.size(); } // Вернуть количество элементов в списке - size_t GetTotal() const { return Array.size(); } + size_t Size() const { return Array.size(); } };