Prechádzať zdrojové kódy

* fix #39329: adjust visibilties of PT and TArr in TVector<> and TDeque<> so that they can be correctly used either by descendants or users outside of the class

(cherry picked from commit be069c8fa8306d60332b952b9e98126b2096718a)
Sven Barth 4 rokov pred
rodič
commit
d283596e05

+ 4 - 1
packages/fcl-stl/src/gdeque.pp

@@ -23,10 +23,13 @@ interface
 
 
 type
 type
   generic TDeque<T>=class
   generic TDeque<T>=class
-  private
+  public
   type
   type
     PT=^T;
     PT=^T;
+  protected
+  type
     TArr=array of T;
     TArr=array of T;
+  private
   var
   var
     FData:TArr;
     FData:TArr;
     FDataSize:SizeUInt;
     FDataSize:SizeUInt;

+ 4 - 1
packages/fcl-stl/src/gvector.pp

@@ -21,10 +21,13 @@ type
   { TVector }
   { TVector }
 
 
   generic TVector<T> = class
   generic TVector<T> = class
-  private
+  public
   type
   type
     PT = ^ T;
     PT = ^ T;
+  protected
+  type
     TArr = array of T;
     TArr = array of T;
+  private
   var
   var
     FCapacity:SizeUInt;
     FCapacity:SizeUInt;
     FDataSize:SizeUInt;
     FDataSize:SizeUInt;