Browse Source

Core: add procedure overload

Herman Schoenfeld 7 years ago
parent
commit
0cba8985ff
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/core/UAccounts.pas

+ 8 - 0
src/core/UAccounts.pas

@@ -212,6 +212,7 @@ Type
     Constructor Create(AccountList : TPCSafeBox; AutoAddAll : Boolean);
     Destructor Destroy; override;
     Procedure AddAccountKey(Const AccountKey : TAccountKey);
+    Procedure AddAccountKeys(Const AccountKeys : array of TAccountKey);
     Procedure RemoveAccountKey(Const AccountKey : TAccountKey);
     Procedure AddAccounts(Const AccountKey : TAccountKey; const accounts : Array of Cardinal);
     Procedure RemoveAccounts(Const AccountKey : TAccountKey; const accounts : Array of Cardinal);
@@ -4394,6 +4395,13 @@ begin
   end;
 end;
 
+Procedure TOrderedAccountKeysList.AddAccountKeys(Const AccountKeys : array of TAccountKey);
+var i : integer;
+begin
+  for i := Low(AccountKeys) to High(AccountKeys) do
+    AddAccountKey(AccountKeys[i]);
+end;
+
 procedure TOrderedAccountKeysList.AddAccounts(const AccountKey: TAccountKey; const accounts: array of Cardinal);
 Var P : POrderedAccountKeyList;
   i,i2 : Integer;