From: Wolfgang Bangerth Date: Wed, 17 Jul 2013 14:36:21 +0000 (+0000) Subject: Do say if there is no additional information. Move code under an if() statement as... X-Git-Tag: v8.0.0~99 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2fc33e573ff5ab73ade6c5be702e60aab4991ac5;p=dealii.git Do say if there is no additional information. Move code under an if() statement as well. git-svn-id: https://svn.dealii.org/trunk@30023 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/base/subscriptor.cc b/deal.II/source/base/subscriptor.cc index 17278853fa..0100b1d314 100644 --- a/deal.II/source/base/subscriptor.cc +++ b/deal.II/source/base/subscriptor.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2010, 2012 by the deal.II authors +// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2010, 2012, 2013 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -69,13 +69,6 @@ Subscriptor::~Subscriptor () // running the c++filt program over // the output. #ifdef DEBUG - std::string infostring; - for (map_iterator it = counter_map.begin(); it != counter_map.end(); ++it) - { - if (it->second > 0) - infostring += std::string("\n from Subscriber ") - + std::string(it->first); - } // if there are still active pointers, show // a message and kill the program. However, @@ -99,6 +92,17 @@ Subscriptor::~Subscriptor () { if (std::uncaught_exception() == false) { + std::string infostring; + for (map_iterator it = counter_map.begin(); it != counter_map.end(); ++it) + { + if (it->second > 0) + infostring += std::string("\n from Subscriber ") + + std::string(it->first); + } + + if (infostring == "") + infostring = ""; + Assert (counter == 0, ExcInUse (counter, object_info->name(), infostring)); }