Browse Source

* fixed (harmless) range check errors

git-svn-id: trunk@17643 -
Jonas Maebe 14 năm trước cách đây
mục cha
commit
7173b9dfed
1 tập tin đã thay đổi với 6 bổ sung16 xóa
  1. 6 16
      compiler/cclasses.pas

+ 6 - 16
compiler/cclasses.pas

@@ -1089,10 +1089,8 @@ end;
       Var
         p,pmax : pchar;
       begin
-{$ifopt Q+}
-{$define overflowon}
-{$Q-}
-{$endif}
+{$push}
+{$q-,r-}
         result:=0;
         p:=@s[1];
         pmax:=@s[length(s)+1];
@@ -1101,20 +1099,15 @@ end;
             result:=LongWord(LongInt(result shl 5) - LongInt(result)) xor LongWord(P^);
             inc(p);
           end;
-{$ifdef overflowon}
-{$Q+}
-{$undef overflowon}
-{$endif}
+{$pop}
       end;
 
     function FPHash(P: PChar; Len: Integer): LongWord;
       Var
         pmax : pchar;
       begin
-{$ifopt Q+}
-{$define overflowon}
-{$Q-}
-{$endif}
+{$push}
+{$q-,r-}
         result:=0;
         pmax:=p+len;
         while (p<pmax) do
@@ -1122,10 +1115,7 @@ end;
             result:=LongWord(LongInt(result shl 5) - LongInt(result)) xor LongWord(P^);
             inc(p);
           end;
-{$ifdef overflowon}
-{$Q+}
-{$undef overflowon}
-{$endif}
+{$pop}
       end;