From ccdbf589a47b486876de28a9beab64360ba8b8fc Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 24 Feb 2016 13:07:32 +0100 Subject: C++ templates are just a glorified macro facility --- src/libutil/pool.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/libutil/pool.hh b/src/libutil/pool.hh index b75a3cbf8..b9eb2dd1e 100644 --- a/src/libutil/pool.hh +++ b/src/libutil/pool.hh @@ -58,7 +58,7 @@ private: public: - Pool(size_t max = std::numeric_limits::max, + Pool(size_t max = std::numeric_limits::max(), const Factory & factory = []() { return make_ref(); }, const Validator & validator = [](ref r) { return true; }) : factory(factory) @@ -144,7 +144,7 @@ public: unsigned int count() { auto state_(state.lock()); - return state_->count + state_->inUse; + return state_->idle.size() + state_->inUse; } }; -- cgit v1.2.3