Permalink
Browse files

do not override FPC $hints value (which is commonly disabled)

  • Loading branch information...
Arnaud Bouchez
Arnaud Bouchez committed Feb 7, 2019
1 parent 08e8ec4 commit 932268ced79f547d73efc258bb5f1f7a32a016fe
Showing with 15 additions and 11 deletions.
  1. +3 −2 SynCommons.pas
  2. +5 −4 SynMongoDB.pas
  3. +3 −2 SynSM.pas
  4. +3 −2 SynSelfTests.pas
  5. +1 −1 SynopseCommit.inc
result := (Count*QWord(1000*1000)) div iTime;
end;

{$HINTS OFF} // for FillZero() complain about loop executed zero times
{$IFDEF FPC} {$PUSH} {$ENDIF} {$HINTS OFF}
// for FillZero() complain about loop executed zero times
procedure TPrecisionTimer.Init;
begin
FillZero(self,SizeOf(self));
QueryPerformanceCounter(iStart);
iLast := iStart;
end;
{$HINTS ON}
{$IFDEF FPC} {$POP} {$ELSE} {$HINTS ON} {$ENDIF}

function TPrecisionTimer.Started: boolean;
begin
@@ -352,10 +352,11 @@ TBSONObjectID = record
/// the kind of element stored
case VKind: TBSONElementType of
betObjectID: (
{$HINTS OFF} // does not complain if Filler is declared but never used
{$IFDEF FPC} {$PUSH} {$ENDIF} {$HINTS OFF}
// does not complain if Filler is declared but never used
VFiller: array[1..SizeOf(TVarData)-SizeOf(TVarType)-SizeOf(TBSONElementType)
-SizeOf(TBSONObjectID)] of byte;
{$HINTS ON}
{$IFDEF FPC} {$POP} {$ELSE} {$HINTS ON} {$ENDIF}
VObjectID: TBSONObjectID
);
betBinary, betDoc, betArray, betRegEx, betDeprecatedDbptr, betTimestamp,
@@ -4071,7 +4072,7 @@ procedure TBSONVariant.FromJSON(json: PUTF8Char; var result: variant);
const
BSON_JSON_NEWDATE: string[8] = 'ew Date('; // circumvent Delphi XE4 Win64 bug

{$HINTS OFF} // avoid hints with CompareMemFixed() inlining
{$IFDEF FPC} {$PUSH} {$ENDIF} {$HINTS OFF} // avoid hints with CompareMemFixed() inlining
function TBSONVariant.TryJSONToVariant(var JSON: PUTF8Char;
var Value: variant; EndOfObject: PUTF8Char): boolean;
var bsonvalue: TBSONVariantData absolute Value;
@@ -4243,7 +4244,7 @@ function TBSONVariant.TryJSONToVariant(var JSON: PUTF8Char;
'/': TryRegExShell(JSON+1);
end;
end;
{$HINTS ON}
{$IFDEF FPC} {$POP} {$ELSE} {$HINTS ON} {$ENDIF}

procedure TBSONVariant.Cast(var Dest: TVarData; const Source: TVarData);
begin
@@ -925,9 +925,10 @@ TSMVariantData = record
protected
{$endif}
VType: TVarType;
{$HINTS OFF} // does not complain if Filler is declared but never used
{$IFDEF FPC} {$PUSH} {$ENDIF} {$HINTS OFF}
// does not complain if Filler is declared but never used
Filler: array[1..SizeOf(TVarData)-SizeOf(TVarType)-SizeOf(TSMObject)] of byte;
{$HINTS ON}
{$IFDEF FPC} {$POP} {$ELSE} {$HINTS ON} {$ENDIF}
VObject: TSMObject;
public
/// initialize a TSMVariant structure to store a specified JavaScript object
@@ -4682,7 +4682,8 @@ procedure testBias(year,expected: integer);
{$endif}
end;

{$HINTS OFF} // [dcc64 Hint] H2135 FOR or WHILE loop executes zero times - deleted
{$IFDEF FPC} {$PUSH} {$ENDIF} {$HINTS OFF}
// [dcc64 Hint] H2135 FOR or WHILE loop executes zero times - deleted
procedure TTestLowLevelCommon._IdemPropName;
function IPNUSL(const s1,s2: RawUTF8; len: integer): boolean;
begin
@@ -4784,7 +4785,7 @@ procedure TTestLowLevelCommon._IdemPropName;
Check(PosExChar('B','AB')=2,'ABC');
Check(PosExChar('C','ABC')=3,'ABC');
end;
{$HINTS ON}
{$IFDEF FPC} {$POP} {$ELSE} {$HINTS ON} {$ENDIF}

procedure TTestLowLevelCommon._TSynTable;
var T: TSynTable;
@@ -1 +1 @@
'1.18.5026'
'1.18.5027'

0 comments on commit 932268c

Please sign in to comment.