Browse Source

* Fix bug ID #33883, incorrectly initialized CacheUpdates depending on what constructor is used

git-svn-id: trunk@39322 -
michael 7 years ago
parent
commit
7a6bd69685
1 changed files with 11 additions and 2 deletions
  1. 11 2
      packages/fcl-base/src/inifiles.pp

+ 11 - 2
packages/fcl-base/src/inifiles.pp

@@ -244,9 +244,12 @@ type
     property CacheUpdates : Boolean read FCacheUpdates write SetCacheUpdates;
   end;
 
+  { TMemIniFile }
+
   TMemIniFile = class(TIniFile)
   public
-    constructor Create(const AFileName: string; AEscapeLineFeeds : Boolean = False); overload; override;
+    constructor Create(const AFileName: string; AOptions : TIniFileoptions = []); overload; override;
+    constructor Create(const AFileName: string; AEscapeLineFeeds : Boolean); overload; override;
     procedure Clear;
     procedure GetStrings(List: TStrings);
     procedure Rename(const AFileName: string; Reload: Boolean);
@@ -1396,7 +1399,13 @@ end;
 
 { TMemIniFile }
 
-constructor TMemIniFile.Create(const AFileName: string; AEscapeLineFeeds : Boolean = False);
+constructor TMemIniFile.Create(const AFileName: string; AOptions: TIniFileoptions);
+begin
+  inherited;
+  FCacheUpdates:=True;
+end;
+
+constructor TMemIniFile.Create(const AFileName: string; AEscapeLineFeeds : Boolean);
 
 begin
   Inherited;