Преглед на файлове

HasSubKey and KeyExists seem to do the same thing

Source commit: 130f1d63d92e0e12632a874e8ecc3d1121807492
Martin Prikryl преди 6 години
родител
ревизия
2662c867b2
променени са 3 файла, в които са добавени 1 реда и са изтрити 12 реда
  1. 0 10
      source/core/HierarchicalStorage.cpp
  2. 0 1
      source/core/HierarchicalStorage.h
  3. 1 1
      source/windows/WinConfiguration.cpp

+ 0 - 10
source/core/HierarchicalStorage.cpp

@@ -242,16 +242,6 @@ bool __fastcall THierarchicalStorage::HasSubKeys()
   return Result;
 }
 //---------------------------------------------------------------------------
-bool __fastcall THierarchicalStorage::HasSubKey(const UnicodeString & SubKey)
-{
-  bool Result = OpenSubKey(SubKey, false);
-  if (Result)
-  {
-    CloseSubKey();
-  }
-  return Result;
-}
-//---------------------------------------------------------------------------
 bool __fastcall THierarchicalStorage::KeyExists(const UnicodeString & SubKey)
 {
   return DoKeyExists(SubKey, ForceAnsi);

+ 0 - 1
source/core/HierarchicalStorage.h

@@ -23,7 +23,6 @@ public:
   virtual void __fastcall GetSubKeyNames(TStrings* Strings) = 0;
   virtual void __fastcall GetValueNames(TStrings* Strings) = 0;
   bool __fastcall HasSubKeys();
-  bool __fastcall HasSubKey(const UnicodeString & SubKey);
   bool __fastcall KeyExists(const UnicodeString & SubKey);
   virtual bool __fastcall ValueExists(const UnicodeString & Value) = 0;
   virtual void __fastcall RecursiveDeleteSubKey(const UnicodeString & Key);

+ 1 - 1
source/windows/WinConfiguration.cpp

@@ -1502,7 +1502,7 @@ void __fastcall TWinConfiguration::LoadData(THierarchicalStorage * Storage)
     Storage->CloseSubKey();
   }
 
-  if (Storage->HasSubKey(L"CustomCommands"))
+  if (Storage->KeyExists(L"CustomCommands"))
   {
     FCustomCommandList->Load(Storage);
     FCustomCommandsDefaults = false;