瀏覽代碼

* If overflow checking enabled, disable it for hash calculation. IDE
now works fine if range checking and overflow checking are enabled.

git-svn-id: trunk@3474 -

daniel 19 年之前
父節點
當前提交
cdde454cc4
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9 0
      ide/wini.pas

+ 9 - 0
ide/wini.pas

@@ -88,6 +88,11 @@ implementation
 uses
 uses
   WUtils;
   WUtils;
 
 
+{$IFOPT Q+}
+  {$Q-}
+  {$DEFINE REENABLE_Q}
+{$ENDIF}
+
 function CalcHash(const s: String): Cardinal;
 function CalcHash(const s: String): Cardinal;
 var
 var
   i: integer;
   i: integer;
@@ -97,6 +102,10 @@ begin
     CalcHash := CalcHash shl 9 - CalcHash shl 4 + Ord(S[I]);
     CalcHash := CalcHash shl 9 - CalcHash shl 4 + Ord(S[I]);
 end;
 end;
 
 
+{$IFDEF REENABLE_Q}
+  {$Q+}
+{$ENDIF}
+
 constructor TINIEntry.Init(const ALine: string);
 constructor TINIEntry.Init(const ALine: string);
 begin
 begin
   inherited Init;
   inherited Init;