Ver código fonte

Factoring out NotImplemented()

Source commit: 7a72c7024d5636476d85c4ef6ac837654d2224c9
Martin Prikryl 3 anos atrás
pai
commit
fb707f79f3

+ 6 - 0
source/core/Common.cpp

@@ -4293,3 +4293,9 @@ UnicodeString GetAncestorProcessNames()
   }
   return AncestorProcessNames;
 }
+//---------------------------------------------------------------------------
+void NotImplemented()
+{
+  DebugFail();
+  throw Exception(L"Not implemented");
+}

+ 1 - 0
source/core/Common.h

@@ -191,6 +191,7 @@ UnicodeString GetEnvironmentInfo();
 void SetStringValueEvenIfEmpty(TStrings * Strings, const UnicodeString & Name, const UnicodeString & Value);
 UnicodeString __fastcall GetAncestorProcessName(int Levels = 1);
 UnicodeString GetAncestorProcessNames();
+void NotImplemented();
 //---------------------------------------------------------------------------
 struct TSearchRecSmart : public TSearchRec
 {

+ 2 - 1
source/core/FileSystems.cpp

@@ -20,5 +20,6 @@ __fastcall TCustomFileSystem::~TCustomFileSystem()
 //---------------------------------------------------------------------------
 UnicodeString __fastcall TCustomFileSystem::GetHomeDirectory()
 {
-  throw Exception(L"Not implemented");
+  NotImplemented();
+  return EmptyStr;
 }

+ 0 - 6
source/core/HierarchicalStorage.cpp

@@ -1756,7 +1756,6 @@ private:
   UnicodeString FRootKey;
 
   bool __fastcall AllowWrite();
-  void __fastcall NotImplemented();
   bool __fastcall AllowSection(const UnicodeString & Section);
   UnicodeString __fastcall FormatKey(const UnicodeString & Section, const UnicodeString & Ident);
 };
@@ -1773,11 +1772,6 @@ __fastcall TOptionsIniFile::TOptionsIniFile(TStrings * Options, TWriteMode Write
   }
 }
 //---------------------------------------------------------------------------
-void __fastcall TOptionsIniFile::NotImplemented()
-{
-  throw Exception(L"Not implemented");
-}
-//---------------------------------------------------------------------------
 bool __fastcall TOptionsIniFile::AllowWrite()
 {
   switch (FWriteMode)