summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/configuration.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2012-09-28 14:43:39 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2012-09-28 14:43:39 +0200
commitd016834e39f668449385b1668240bdf905d62ade (patch)
treefa98cfface517e579dcda518c3820e1596035a00 /apt-pkg/contrib/configuration.cc
parent7735ad0500b6fefef03b2a3dc2a6843e82353e94 (diff)
add new ClearAll
Diffstat (limited to 'apt-pkg/contrib/configuration.cc')
-rw-r--r--apt-pkg/contrib/configuration.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc
index 36866a35a..43533e5bb 100644
--- a/apt-pkg/contrib/configuration.cc
+++ b/apt-pkg/contrib/configuration.cc
@@ -405,6 +405,17 @@ void Configuration::Clear(string const &Name, string const &Value)
}
/*}}}*/
+// Configuration::ClearAll - Clear everything /*{{{*/
+void Configuration::ClearAll()
+{
+ const Configuration::Item *Top = Tree(0);
+ while( Top != 0 )
+ {
+ Clear(Top->FullTag());
+ Top = Top->Next;
+ }
+}
+ /*}}}*/
// Configuration::Clear - Clear an entire tree /*{{{*/
// ---------------------------------------------------------------------
/* */