Jelajahi Sumber

Removed unused property

Source commit: 046c2bbfa007d17388062845fa609c133164e979
Martin Prikryl 6 tahun lalu
induk
melakukan
478471edcd
2 mengubah file dengan 2 tambahan dan 18 penghapusan
  1. 2 14
      source/core/HierarchicalStorage.cpp
  2. 0 4
      source/core/HierarchicalStorage.h

+ 2 - 14
source/core/HierarchicalStorage.cpp

@@ -15,10 +15,10 @@
 //---------------------------------------------------------------------------
 #define READ_REGISTRY(Method) \
   if (FRegistry->ValueExists(Name)) \
-  try { return FRegistry->Method(Name); } catch(...) { FFailed++; return Default; } \
+  try { return FRegistry->Method(Name); } catch(...) { return Default; } \
   else return Default;
 #define WRITE_REGISTRY(Method) \
-  try { FRegistry->Method(Name, Value); } catch(...) { FFailed++; }
+  try { FRegistry->Method(Name, Value); } catch(...) { }
 //---------------------------------------------------------------------------
 UnicodeString __fastcall MungeStr(const UnicodeString & Str, bool ForceAnsi, bool Value)
 {
@@ -432,7 +432,6 @@ __fastcall TRegistryStorage::TRegistryStorage(const UnicodeString AStorage, HKEY
 //---------------------------------------------------------------------------
 void __fastcall TRegistryStorage::Init()
 {
-  FFailed = 0;
   FRegistry = new TRegistry();
   FRegistry->Access = KEY_READ | FWowMode;
 }
@@ -615,7 +614,6 @@ __int64 __fastcall TRegistryStorage::ReadInt64(const UnicodeString Name, __int64
     }
     catch(...)
     {
-      FFailed++;
     }
   }
   return Result;
@@ -639,7 +637,6 @@ size_t __fastcall TRegistryStorage::ReadBinaryData(const UnicodeString Name,
     catch(...)
     {
       Result = 0;
-      FFailed++;
     }
   }
   else
@@ -682,7 +679,6 @@ void __fastcall TRegistryStorage::WriteInt64(const UnicodeString Name, __int64 V
   }
   catch(...)
   {
-    FFailed++;
   }
 }
 //---------------------------------------------------------------------------
@@ -695,16 +691,8 @@ void __fastcall TRegistryStorage::WriteBinaryData(const UnicodeString Name,
   }
   catch(...)
   {
-    FFailed++;
   }
 }
-//---------------------------------------------------------------------------
-int __fastcall TRegistryStorage::GetFailed()
-{
-  int Result = FFailed;
-  FFailed = 0;
-  return Result;
-}
 //===========================================================================
 __fastcall TCustomIniFileStorage::TCustomIniFileStorage(const UnicodeString Storage, TCustomIniFile * IniFile) :
   THierarchicalStorage(Storage),

+ 0 - 4
source/core/HierarchicalStorage.h

@@ -128,17 +128,13 @@ public:
   virtual void __fastcall GetValueNames(Classes::TStrings* Strings);
 
 protected:
-  int __fastcall GetFailed();
   virtual void __fastcall SetAccessMode(TStorageAccessMode value);
   virtual bool __fastcall DoKeyExists(const UnicodeString SubKey, bool ForceAnsi);
   virtual bool __fastcall DoOpenSubKey(const UnicodeString SubKey, bool CanCreate);
   virtual UnicodeString __fastcall GetSource();
 
-  __property int Failed  = { read=GetFailed, write=FFailed };
-
 private:
   TRegistry * FRegistry;
-  int FFailed;
   REGSAM FWowMode;
 
   void __fastcall Init();