From aa783c2876a1ead3b719fcbe8f1c7de8cf8f38cc Mon Sep 17 00:00:00 2001 From: chrivers Date: Sat, 5 Aug 2006 20:04:55 +0000 Subject: [PATCH] Cleanup for readability. timplementedinterfaces.searchintf() simplified, dummy-var renamed to mark it as such in tstoreddef.is_integrable git-svn-id: trunk@4351 - --- compiler/symdef.pas | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/compiler/symdef.pas b/compiler/symdef.pas index c19cd281cd..ad4b4c4920 100644 --- a/compiler/symdef.pas +++ b/compiler/symdef.pas @@ -1149,7 +1149,7 @@ implementation function tstoreddef.is_intregable : boolean; var - recsize,recsizep2: longint; + recsize,temp: longint; begin is_intregable:=false; case deftype of @@ -1168,7 +1168,7 @@ implementation begin recsize:=size; is_intregable:= - ispowerof2(recsize,recsizep2) and + ispowerof2(recsize,temp) and (recsize <= sizeof(aint)); end; end; @@ -5191,15 +5191,11 @@ implementation end; function timplementedinterfaces.searchintf(def: tdef): longint; - var - i: longint; begin - i:=1; - while (i<=count) and (tdef(interfaces(i))<>def) do inc(i); - if i<=count then - searchintf:=i - else - searchintf:=-1; + for result := 1 to count do + if tdef(interfaces(result)) = def then + exit; + result := -1; end;