Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
shmuz committed Nov 12, 2023
1 parent 3594adf commit a3f7518
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion far/src/copy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion far/src/macro/macro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
Expand Down
2 changes: 1 addition & 1 deletion far/src/mix/udlist.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(); }
};

0 comments on commit a3f7518

Please sign in to comment.