Mailinglist Archive: zypp-commit (149 mails)

< Previous Next >
[zypp-commit] r5425 - /trunk/libzypp/zypp/Edition.cc
  • From: dmacvicar@xxxxxxxxxxxxxxxx
  • Date: Fri, 20 Apr 2007 12:27:44 -0000
  • Message-id: <20070420122744.E9875355BC@xxxxxxxxxxxxxxxx>
Author: dmacvicar
Date: Fri Apr 20 14:27:44 2007
New Revision: 5425

URL: http://svn.opensuse.org/viewcvs/zypp?rev=5425&view=rev
Log:

This removes like 4 seconds when loading 19k packages


Modified:
    trunk/libzypp/zypp/Edition.cc

Modified: trunk/libzypp/zypp/Edition.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Edition.cc?rev=5425&r1=5424&r2=5425&view=diff
==============================================================================
--- trunk/libzypp/zypp/Edition.cc (original)
+++ trunk/libzypp/zypp/Edition.cc Fri Apr 20 14:27:44 2007
@@ -202,9 +202,9 @@
     /** return validated version/release or throw */
     static const std::string & validateVR( const std::string & vr_r )
     {
-      str::smatch what;
-      if( ! str::regex_match( vr_r.begin(), vr_r.end(), what, _rxVR ) )
+      if ( vr_r.find('-') != string::npos )
         ZYPP_THROW( Exception(string("Invalid version/release: ")+vr_r) );
+    
       return vr_r;
     }
 
@@ -212,13 +212,10 @@
     std::string _version;
     std::string _release;
 
-    static const str::regex _rxVR;
     static const str::regex _rxEdition;
   };
   ///////////////////////////////////////////////////////////////////
 
-  const str::regex Edition::Impl::_rxVR( "([^-]*)" );
-
   const str::regex Edition::Impl::_rxEdition( "(([0-9]+):)?([^-]*)(-([^-]*))?" );
 
   ///////////////////////////////////////////////////////////////////

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages