Преглед изворни кода

* changed parameters of references_equal from value to const to
avoid copying

git-svn-id: trunk@2693 -

Jonas Maebe пре 19 година
родитељ
комит
a9dbc0c8ab
2 измењених фајлова са 3 додато и 3 уклоњено
  1. 1 1
      compiler/aoptobj.pas
  2. 2 2
      compiler/cgutils.pas

+ 1 - 1
compiler/aoptobj.pas

@@ -56,7 +56,7 @@ Unit AoptObj;
     { ************************************************************************* }
     { ************************* Some general type definitions ***************** }
     { ************************************************************************* }
-      TRefCompare = Function(r1, r2: TReference): Boolean;
+      TRefCompare = Function(const r1, r2: TReference): Boolean;
       //!!! FIXME
       TRegArray = Array[byte] of tsuperregister;
       TRegSet = Set of byte;

+ 2 - 2
compiler/cgutils.pas

@@ -105,7 +105,7 @@ unit cgutils;
     { This routine verifies if two references are the same, and
        if so, returns TRUE, otherwise returns false.
     }
-    function references_equal(sref : treference;dref : treference) : boolean;
+    function references_equal(const sref,dref : treference) : boolean;
 
     { tlocation handling }
 
@@ -144,7 +144,7 @@ implementation
       end;
 
 
-    function references_equal(sref : treference;dref : treference):boolean;
+    function references_equal(const sref,dref : treference):boolean;
       begin
         references_equal:=CompareByte(sref,dref,sizeof(treference))=0;
       end;