summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/configuration.cc
diff options
context:
space:
mode:
authorMichael Vogt <egon@debian-devbox>2012-10-17 10:29:52 +0200
committerMichael Vogt <mvo@debian.org>2013-08-15 09:39:27 +0200
commitd8a06f6e478323b2fa8573f6f885c0b16d403642 (patch)
tree6ef2d5f6d1f4ac3ad9600f5117d12b1eca19a377 /apt-pkg/contrib/configuration.cc
parentb9674b755d40b1394c397864d1fcd05ad58a88a2 (diff)
* lp:~mvo/apt/config-clear:
- support Configuration.Clear() for a clear of the entire configuration Conflicts: debian/changelog
Diffstat (limited to 'apt-pkg/contrib/configuration.cc')
-rw-r--r--apt-pkg/contrib/configuration.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc
index 376617401..4ef4663c0 100644
--- a/apt-pkg/contrib/configuration.cc
+++ b/apt-pkg/contrib/configuration.cc
@@ -422,6 +422,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 /*{{{*/
// ---------------------------------------------------------------------
/* */