Skip to content
Permalink
Browse files

avoid some FPC hints

  • Loading branch information...
Arnaud Bouchez
Arnaud Bouchez committed Mar 12, 2019
1 parent bd3f1dd commit fb0779ce441ba0b61d3483c0958ed504a8fcea0f
Showing with 8 additions and 7 deletions.
  1. +1 −0 SQLite3/mORMotSQLite3.pas
  2. +6 −6 SynMongoDB.pas
  3. +1 −1 SynopseCommit.inc
@@ -556,6 +556,7 @@ TSQLRestServerDB = class(TSQLRestServer)
function TableMaxID(Table: TSQLRecordClass): TID; override;
/// after how many bytes a sllSQL statement log entry should be truncated
// - default is 0, meaning no truncation
// - typical value is 2048 (2KB), which will avoid any heap allocation
property StatementTruncateSQLLogLen: integer read fStatementTruncateSQLLogLen
write fStatementTruncateSQLLogLen;
/// executes (therefore log) the QUERY PLAN for each prepared statement
@@ -6502,7 +6502,7 @@ procedure TDecimal128.FromInt32(value: integer);
Bits.hi := BSON_DECIMAL128_HI_INT64POS;
end else begin
Bits.lo := -value;
Bits.hi := BSON_DECIMAL128_HI_INT64NEG;
Bits.hi := QWord(BSON_DECIMAL128_HI_INT64NEG);
end;
end;

@@ -6519,7 +6519,7 @@ procedure TDecimal128.FromInt64(value: Int64);
Bits.hi := BSON_DECIMAL128_HI_INT64POS;
end else begin
Bits.lo := -value;
Bits.hi := BSON_DECIMAL128_HI_INT64NEG;
Bits.hi := QWord(BSON_DECIMAL128_HI_INT64NEG);
end;
end;

@@ -6548,7 +6548,7 @@ procedure TDecimal128.FromCurr(const value: Currency);
begin // force exactly 4 decimals
if value<0 then begin
Bits.lo := -PInt64(@value)^;
Bits.hi := BSON_DECIMAL128_HI_CURRNEG;
Bits.hi := QWord(BSON_DECIMAL128_HI_CURRNEG);
end else begin
Bits.lo := PInt64(@value)^;
Bits.hi := BSON_DECIMAL128_HI_CURRPOS;
@@ -6622,11 +6622,11 @@ function TDecimal128.ToText(out Buffer: TDecimal128Str): integer;
if combi shr 3=3 then
case combi of
30: begin
result := AppendRawUTF8ToBuffer(dest,DECIMAL128_SPECIAL_TEXT[dsvPosInf])-@Buffer;
result := AppendRawUTF8ToBuffer(dest,DECIMAL128_SPECIAL_TEXT[dsvPosInf])-PUTF8Char(@Buffer);
exit;
end;
31: begin
result := AppendRawUTF8ToBuffer(@Buffer,DECIMAL128_SPECIAL_TEXT[dsvNan])-@Buffer;
result := AppendRawUTF8ToBuffer(@Buffer,DECIMAL128_SPECIAL_TEXT[dsvNan])-PUTF8Char(@Buffer);
exit;
end;
else begin
@@ -6710,7 +6710,7 @@ function TDecimal128.ToText(out Buffer: TDecimal128Str): integer;
append(dest,dig,signdig-radixpos);
end;
end;
result := dest-@Buffer;
result := dest-PUTF8Char(@Buffer);
end;

function TDecimal128.ToText: RawUTF8;
@@ -1 +1 @@
'1.18.5096'
'1.18.5097'

0 comments on commit fb0779c

Please sign in to comment.
You can’t perform that action at this time.