]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/contrib/configuration.cc
merge patch from Daniel Hartwig to Show a error message if {,dist-}upgrade is used...
[apt.git] / apt-pkg / contrib / configuration.cc
index 4de17e3e1933ee8966403c8ff1ac65f245f91814..31cd9f8adc25efa0a4d6cf9a3bfd2f3a5105ee3b 100644 (file)
@@ -420,6 +420,18 @@ void Configuration::Clear(string const &Name, string const &Value)
       }
    }
      
       }
    }
      
+}
+                                                                       /*}}}*/
+// Configuration::Clear - Clear everything                             /*{{{*/
+// ---------------------------------------------------------------------
+void Configuration::Clear()
+{
+   const Configuration::Item *Top = Tree(0);
+   while( Top != 0 )
+   {
+      Clear(Top->FullTag());
+      Top = Top->Next;
+   }
 }
                                                                        /*}}}*/
 // Configuration::Clear - Clear an entire tree                         /*{{{*/
 }
                                                                        /*}}}*/
 // Configuration::Clear - Clear an entire tree                         /*{{{*/
@@ -958,7 +970,7 @@ Configuration::MatchAgainstConfig::MatchAgainstConfig(char const * Config)
         continue;
       }
    }
         continue;
       }
    }
-   if (strings.size() == 0)
+   if (strings.empty() == true)
       patterns.push_back(NULL);
 }
                                                                        /*}}}*/
       patterns.push_back(NULL);
 }
                                                                        /*}}}*/