From 48ba106667813117dcd8e49f72efc8f4f1ca367e Mon Sep 17 00:00:00 2001 From: Vincent Gee Date: Sun, 30 Nov 2014 20:28:40 -0500 Subject: [PATCH] Just cleaned up some code --- Engine/source/platform/threads/threadPool.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Engine/source/platform/threads/threadPool.cpp b/Engine/source/platform/threads/threadPool.cpp index b0a34434d..2ef2bb69b 100644 --- a/Engine/source/platform/threads/threadPool.cpp +++ b/Engine/source/platform/threads/threadPool.cpp @@ -328,17 +328,14 @@ ThreadPool::ThreadPool( const char* name, U32 numThreads ) // Use platformCPUInfo directly as in the case of the global pool, // Platform::SystemInfo will not yet have been initialized. - U32 numLogical; - U32 numPhysical; - U32 numCores; + U32 numLogical = 0; + U32 numPhysical = 0; + U32 numCores = 0; CPUInfo::CPUCount( numLogical, numCores, numPhysical ); const U32 baseCount = getMax( numLogical, numCores ); - if( baseCount ) - mNumThreads = baseCount; - else - mNumThreads = 2; + mNumThreads = (baseCount > 0) ? baseCount : 2; } #ifdef DEBUG_SPEW