Imported Upstream version 14.47.1
[platform/upstream/libzypp.git] / zypp / base / StrMatcher.cc
index 2c5dfb3..95ab089 100644 (file)
@@ -22,6 +22,7 @@ extern "C"
 #include "zypp/base/String.h"
 
 #include "zypp/base/StrMatcher.h"
+#include "zypp/sat/detail/PoolMember.h"
 
 using std::endl;
 
@@ -185,7 +186,7 @@ namespace zypp
        if ( _flags.mode() == Match::OTHER )
          ZYPP_THROW( MatchUnknownModeException( _flags, _search ) );
 
-       _matcher.reset( new ::_Datamatcher );
+       _matcher.reset( new sat::detail::CDatamatcher );
        int res = ::datamatcher_init( _matcher.get(), _search.c_str(), _flags.get() );
        if ( res )
        {
@@ -197,7 +198,7 @@ namespace zypp
 
     /** Whether the pattern is already compiled. */
     bool isCompiled() const
-    { return _matcher; }
+    { return _matcher != nullptr; }
 
     /** Return whether string matches. */
     bool doMatch( const char * string_r ) const
@@ -237,7 +238,7 @@ namespace zypp
   private:
     std::string _search;
     Match       _flags;
-    mutable scoped_ptr< ::_Datamatcher> _matcher;
+    mutable scoped_ptr< sat::detail::CDatamatcher> _matcher;
 
   private:
     friend Impl * rwcowClone<Impl>( const Impl * rhs );