From ca0d389c8969ddb679358ca16e4bcddfcdaf9b03 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 29 Jul 2010 14:51:05 +0200 Subject: add inline DumpError() to avoid subtle API break --- apt-pkg/contrib/error.h | 14 +++++++++++++- debian/changelog | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/apt-pkg/contrib/error.h b/apt-pkg/contrib/error.h index d39500427..4af0302c0 100644 --- a/apt-pkg/contrib/error.h +++ b/apt-pkg/contrib/error.h @@ -217,10 +217,22 @@ public: /*{{{*/ * * \param threshold minimum level printed */ - void inline DumpErrors(MsgType const &threshold = WARNING) { + void inline DumpErrors(MsgType const &threshold) { DumpErrors(std::cerr, threshold); } + // mvo: we do this instead of using a default parameter in the + // previous declaration to avoid a (subtle) API break for + // e.g. sigc++ and mem_fun0 + /** \brief dumps the messages of type WARNING or higher to std::cerr + * + * Note that all messages are discarded, displayed or not. + * + */ + void inline DumpErrors() { + DumpErrors(WARNING); + } + /** \brief put the current Messages into the stack * * All "old" messages will be pushed into a stack to diff --git a/debian/changelog b/debian/changelog index 545703603..c526df66c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -35,6 +35,7 @@ apt (0.7.26~exp11) experimental; urgency=low [ Michael Vogt ] * apt-pkg/contrib/error.{cc,h} - docstring cleanup + - add inline DumpError() to avoid subtle API break -- David Kalnischkies Mon, 26 Jul 2010 12:40:44 +0200 -- cgit v1.2.3