Browse Source

IsAnyMask is just an opposite of IsEffectiveFileNameMask

Source commit: 74a000c1d80d060544b5af13f2563472cf9419f3
Martin Prikryl 9 years ago
parent
commit
4ccbd9c352
2 changed files with 2 additions and 8 deletions
  1. 2 7
      source/core/FileMasks.cpp
  2. 0 1
      source/core/FileMasks.h

+ 2 - 7
source/core/FileMasks.cpp

@@ -151,14 +151,9 @@ bool __fastcall TFileMasks::IsMask(const UnicodeString Mask)
   return (Mask.LastDelimiter(L"?*[") > 0);
 }
 //---------------------------------------------------------------------------
-bool __fastcall TFileMasks::IsAnyMask(const UnicodeString & Mask)
-{
-  return Mask.IsEmpty() || (Mask == AnyMask) || (Mask == L"*");
-}
-//---------------------------------------------------------------------------
 UnicodeString __fastcall TFileMasks::NormalizeMask(const UnicodeString & Mask, const UnicodeString & AnyMask)
 {
-  if (IsAnyMask(Mask))
+  if (!IsEffectiveFileNameMask(Mask))
   {
     return AnyMask;
   }
@@ -502,7 +497,7 @@ void __fastcall TFileMasks::CreateMaskMask(const UnicodeString & Mask, int Start
   try
   {
     DebugAssert(MaskMask.Mask == NULL);
-    if (Ex && IsAnyMask(Mask))
+    if (Ex && !IsEffectiveFileNameMask(Mask))
     {
       MaskMask.Kind = TMaskMask::Any;
       MaskMask.Mask = NULL;

+ 0 - 1
source/core/FileMasks.h

@@ -116,7 +116,6 @@ private:
   static bool __fastcall MatchesMasks(const UnicodeString FileName, bool Directory,
     const UnicodeString Path, const TParams * Params, const TMasks & Masks, bool Recurse);
   static inline bool __fastcall MatchesMaskMask(const TMaskMask & MaskMask, const UnicodeString & Str);
-  static inline bool __fastcall IsAnyMask(const UnicodeString & Mask);
   void __fastcall ThrowError(int Start, int End);
 };
 //---------------------------------------------------------------------------