X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/af13d1437cbcb383de89f126b316c02587e4b691..2a49601f69e08f06fb2727d869d420daacdd09d5:/apt-pkg/contrib/configuration.cc?ds=sidebyside diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc index 4de17e3e1..31cd9f8ad 100644 --- a/apt-pkg/contrib/configuration.cc +++ b/apt-pkg/contrib/configuration.cc @@ -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 /*{{{*/ @@ -958,7 +970,7 @@ Configuration::MatchAgainstConfig::MatchAgainstConfig(char const * Config) continue; } } - if (strings.size() == 0) + if (strings.empty() == true) patterns.push_back(NULL); } /*}}}*/