fcl-pdf: less hints

This commit is contained in:
mattias 2023-06-21 10:13:16 +02:00
parent fcb5cf42bf
commit 51fa67c234
3 changed files with 9 additions and 6 deletions

View File

@ -25,7 +25,11 @@ unit fppdfobjects;
interface
uses
TypInfo, Types, rtlConsts, SysUtils, Classes, Contnrs, fppdfconsts;
TypInfo,
{$IFDEF DEBUGPDFALLOCATION}
Types,
{$ENDIF}
rtlConsts, SysUtils, Classes, Contnrs, fppdfconsts;
Const
PDFTextArraySpaceTreshold = 200;
@ -1426,7 +1430,7 @@ Var
begin
if aUnicodeMap=Nil then
Exit(GetFullText);
Exit('');
Result:='';
if Length(Tokens)>=2 then
For I:=1 to Length(Tokens)-2 do
@ -2108,7 +2112,7 @@ begin
If (Length(TokenData)>2) and (TokenData[1]=#254) and (TokenData[2]=#255) then
begin
Len:=Length(TokenData)-2;
SetLength(UString,Len div 2);
SetLength(UString{%H-},Len div 2);
Move(TokenData[3],UString[1],Len);
P:=PWord(PUnicodeChar(UString));
For I:=1 to Length(UString) do

View File

@ -1410,7 +1410,7 @@ class procedure TPDFParser.RunlengthDecode(aSrc, aDest: TStream);
Var
I : Integer;
RLE,B,Cnt,C : Byte;
Buf : Array[0..128] of byte;
{%H-}Buf : Array[0..128] of byte;
begin
RLE:=128;

View File

@ -588,7 +588,7 @@ Var
begin
aValue:=Char(aStartByte)+GetTillByte(Ord('>'));
lRawlen:=Length(aValue) div 2;
SetLength(Result,lRawLen);
SetLength(Result{%H-},lRawLen);
lRes:=HexToBin(PChar(aValue),PChar(Result),lRawLen);
if lRes=-1 then
DoError(senInvalidHexString,SErrInvalidHexString,[aValue]);
@ -611,7 +611,6 @@ Var
CharPos : Integer;
lOpenCount : Integer;
aByte,aByte2 : Byte;
aChar : Char absolute aByte;
aChar2 : Char absolute aByte2;
aChar3,aChar4 : Char;
aOctal : integer;