Browse Source

rtl: less hints

mattias 3 years ago
parent
commit
1dd4eaa96c
1 changed files with 5 additions and 3 deletions
  1. 5 3
      packages/rtl/classes.pas

+ 5 - 3
packages/rtl/classes.pas

@@ -881,12 +881,12 @@ type
   TResourceStream = class(TCustomMemoryStream)
   TResourceStream = class(TCustomMemoryStream)
   private
   private
     procedure Initialize(aInfo : TResourceInfo);
     procedure Initialize(aInfo : TResourceInfo);
-    procedure Initialize(Instance: TFPResourceHMODULE; Name, ResType: String);
+    procedure Initialize(Instance{%H-}: TFPResourceHMODULE; Name, ResType{%H-}: String);
   public
   public
     constructor Create(aInfo: TResourceInfo);
     constructor Create(aInfo: TResourceInfo);
     constructor Create(Instance: TFPResourceHMODULE; const ResName, ResType : String);
     constructor Create(Instance: TFPResourceHMODULE; const ResName, ResType : String);
     constructor CreateFromID(Instance: TFPResourceHMODULE; ResID: Integer; ResType: String);
     constructor CreateFromID(Instance: TFPResourceHMODULE; ResID: Integer; ResType: String);
-    function Write(const Buffer: TBytes; Offset, Count: LongInt): LongInt; override;
+    function Write(const Buffer{%H-}: TBytes; Offset{%H-}, Count{%H-}: LongInt): LongInt; override;
     destructor Destroy; override;
     destructor Destroy; override;
   end;
   end;
 
 
@@ -1672,6 +1672,7 @@ function TResourceStream.Write(const Buffer: TBytes; Offset, Count: LongInt
   ): LongInt;
   ): LongInt;
 begin
 begin
   Raise ENotSupportedException.Create(SErrResourceStreamNoWrite);
   Raise ENotSupportedException.Create(SErrResourceStreamNoWrite);
+  Result:=0;
 end;
 end;
 
 
 destructor TResourceStream.Destroy;
 destructor TResourceStream.Destroy;
@@ -11269,7 +11270,7 @@ begin
   Writer.WriteInteger(FDSIze.Y);
   Writer.WriteInteger(FDSIze.Y);
 end;
 end;
 
 
-function CreateComponentfromRes(const res : string;Inst : THandle; var Component : TComponent) : Boolean;
+function CreateComponentfromRes(const res : string; Inst : THandle; var Component : TComponent) : Boolean;
 
 
 var
 var
   ResStream : TResourceStream;
   ResStream : TResourceStream;
@@ -11278,6 +11279,7 @@ var
   aInfo : TResourceInfo;
   aInfo : TResourceInfo;
 
 
 begin
 begin
+  if Inst=0 then ;
   result:=GetResourceInfo(Res,aInfo);
   result:=GetResourceInfo(Res,aInfo);
   if Result then
   if Result then
     begin
     begin