13,824
社区成员
发帖
与我相关
我的任务
分享
procedure TThreadList.Add(Item: Pointer);
begin
LockList;
try
if (Duplicates = dupAccept) or
(FList.IndexOf(Item) = -1) then
FList.Add(Item)
else if Duplicates = dupError then
FList.Error(@SDuplicateItem, Integer(Item));
finally
UnlockList;
end;
end;
void __fastcall TThreadList::Add(void *Item)
{
LockList();
try{
if ((Duplicates == dupAccept) ||
(FList->IndexOf(Item) == -1))
FList->Add(Item);
else if (Duplicates == dupError)
FList->Error(&SDuplicateItem, (int)Item);
}__finally{
UnlockList();
}
}