parse regexp only once
authorDuncan Mac-Vicar P <dmacvicar@suse.de>
Tue, 18 Jul 2006 15:42:01 +0000 (15:42 +0000)
committerDuncan Mac-Vicar P <dmacvicar@suse.de>
Tue, 18 Jul 2006 15:42:01 +0000 (15:42 +0000)
zypp/source/susetags/ProductMetadataParser.cc

index 9468111..d1567fd 100644 (file)
@@ -66,10 +66,10 @@ namespace zypp
 
         std::string buffer;
        volatile_content = false;
+        boost::regex e("^(([A-Z]+)(\\.([_A-Z0-9a-z]+)){0,1}) (.+)$");
         while(file && !file.eof())
         {
           getline(file, buffer);
-          boost::regex e("^(([A-Z]+)(\\.([_A-Z0-9a-z]+)){0,1}) (.+)$");
           boost::smatch what;
           if(boost::regex_match(buffer, what, e, boost::match_extra))
           {