Mercurial > hg > svcore
changeset 1768:4fec4527e50e
Remove debug output (by default)
author | Chris Cannam |
---|---|
date | Thu, 18 Jul 2019 13:28:14 +0100 |
parents | aa0b56d72f27 |
children | 9a8327e7b2dc |
files | base/ById.cpp |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/base/ById.cpp Thu Jul 18 13:17:49 2019 +0100 +++ b/base/ById.cpp Thu Jul 18 13:28:14 2019 +0100 @@ -17,6 +17,8 @@ #include <unordered_map> #include <typeinfo> +//#define DEBUG_BY_ID 1 + int IdAlloc::getNextId() { static int nextId = 0; @@ -70,8 +72,10 @@ if (id == IdAlloc::NO_ID) { throw std::logic_error("item id should never be NO_ID"); } +#ifdef DEBUG_BY_ID SVCERR << "ById::add(#" << id << ") of type " << typeid(*item.get()).name() << endl; +#endif QMutexLocker locker(&m_mutex); if (m_items.find(id) != m_items.end()) { SVCERR << "ById::add: item with id " << id @@ -89,7 +93,9 @@ if (id == IdAlloc::NO_ID) { return; } +#ifdef DEBUG_BY_ID SVCERR << "ById::release(#" << id << ")" << endl; +#endif QMutexLocker locker(&m_mutex); if (m_items.find(id) == m_items.end()) { SVCERR << "ById::release: unknown item id " << id << endl;