Code clean up at TFontManager.SetExtention
by 'lagprogramming'.
packages/fcl-image/src/freetype.pp has
procedure TFontManager.SetExtention (AValue : string);
begin
if AValue <> '' then
if AValue[1] <> '.' then
FExtention := '.' + AValue
else
FExtention := AValue
else
AValue := '';
end;
The following patch remove the else part of "if AValue <> ''"
diff --git a/packages/fcl-image/src/freetype.pp b/packages/fcl-image/src/freetype.pp
index f66586c033..17ce8cf8da 100644
--- a/packages/fcl-image/src/freetype.pp
+++ b/packages/fcl-image/src/freetype.pp
@@ -400,9 +400,7 @@ procedure TFontManager.SetExtention (AValue : string);
if AValue[1] <> '.' then
FExtention := '.' + AValue
else
- FExtention := AValue
- else
- AValue := '';
+ FExtention := AValue;
end;
function TFontManager.SearchFont (afilename:string; doraise : boolean = true) : string;
Edited by Alexey Torgashin