C++ templates are just a glorified macro facility
This commit is contained in:
		
							parent
							
								
									5f862658c3
								
							
						
					
					
						commit
						ccdbf589a4
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -58,7 +58,7 @@ private: | ||||||
| 
 | 
 | ||||||
| public: | public: | ||||||
| 
 | 
 | ||||||
|     Pool(size_t max = std::numeric_limits<size_t>::max, |     Pool(size_t max = std::numeric_limits<size_t>::max(), | ||||||
|         const Factory & factory = []() { return make_ref<R>(); }, |         const Factory & factory = []() { return make_ref<R>(); }, | ||||||
|         const Validator & validator = [](ref<R> r) { return true; }) |         const Validator & validator = [](ref<R> r) { return true; }) | ||||||
|         : factory(factory) |         : factory(factory) | ||||||
|  | @ -144,7 +144,7 @@ public: | ||||||
|     unsigned int count() |     unsigned int count() | ||||||
|     { |     { | ||||||
|         auto state_(state.lock()); |         auto state_(state.lock()); | ||||||
|         return state_->count + state_->inUse; |         return state_->idle.size() + state_->inUse; | ||||||
|     } |     } | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue