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 <egon@debian-devbox>2012-10-17 10:29:52 +0200
commitd4273c55e34cdf5a355b4edd92df61a83cfab318 (patch)
tree171d8a91864f0b746c58ded2f1c2bdaf0bb82d29 /apt-pkg/contrib/configuration.cc
parent20a2b201389092a17763b703039b2e4528234e30 (diff)
parent62b66f2593293aea5b42185fd2a2eb9d6e4d0cf2 (diff)
* lp:~mvo/apt/config-clear:
- support Configuration.Clear() for a clear of the entire configuration
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 4de17e3e1..d5334ae72 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 /*{{{*/
// ---------------------------------------------------------------------
/* */