浏览代码

* the checks for no parameters are not needed for Insert() and Delete() as they take care of that themselves with an overload listing

git-svn-id: trunk@37428 -
svenbarth 7 年之前
父节点
当前提交
c01b36a2fa
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 5 5
      compiler/pinline.pas

+ 5 - 5
compiler/pinline.pas

@@ -632,7 +632,7 @@ implementation
       end;
       end;
 
 
 
 
-    function inline_copy_insert_delete(nr:tinlinenumber;name:string) : tnode;
+    function inline_copy_insert_delete(nr:tinlinenumber;name:string;checkempty:boolean) : tnode;
       var
       var
         paras   : tnode;
         paras   : tnode;
         { for easy exiting if something goes wrong }
         { for easy exiting if something goes wrong }
@@ -642,7 +642,7 @@ implementation
         consume(_LKLAMMER);
         consume(_LKLAMMER);
         paras:=parse_paras(false,false,_RKLAMMER);
         paras:=parse_paras(false,false,_RKLAMMER);
         consume(_RKLAMMER);
         consume(_RKLAMMER);
-        if not assigned(paras) then
+        if not assigned(paras) and checkempty then
           begin
           begin
             CGMessage1(parser_e_wrong_parameter_size,name);
             CGMessage1(parser_e_wrong_parameter_size,name);
             exit;
             exit;
@@ -654,19 +654,19 @@ implementation
 
 
     function inline_copy: tnode;
     function inline_copy: tnode;
       begin
       begin
-        result:=inline_copy_insert_delete(in_copy_x,'Copy');
+        result:=inline_copy_insert_delete(in_copy_x,'Copy',true);
       end;
       end;
 
 
 
 
     function inline_insert: tnode;
     function inline_insert: tnode;
       begin
       begin
-        result:=inline_copy_insert_delete(in_insert_x_y_z,'Insert');
+        result:=inline_copy_insert_delete(in_insert_x_y_z,'Insert',false);
       end;
       end;
 
 
 
 
     function inline_delete: tnode;
     function inline_delete: tnode;
       begin
       begin
-        result:=inline_copy_insert_delete(in_delete_x_y_z,'Delete');
+        result:=inline_copy_insert_delete(in_delete_x_y_z,'Delete',false);
       end;
       end;