From: <ric...@us...> - 2013-06-23 01:15:00
|
Revision: 1185 http://sourceforge.net/p/loki-lib/code/1185 Author: rich_sposato Date: 2013-06-23 01:14:58 +0000 (Sun, 23 Jun 2013) Log Message: ----------- Changed types to remove compiler warning. Modified Paths: -------------- trunk/test/LevelMutex/ThreadPool.cpp trunk/test/LevelMutex/ThreadPool.hpp trunk/test/SmallObj/timer.h Modified: trunk/test/LevelMutex/ThreadPool.cpp =================================================================== --- trunk/test/LevelMutex/ThreadPool.cpp 2013-06-19 02:23:00 UTC (rev 1184) +++ trunk/test/LevelMutex/ThreadPool.cpp 2013-06-23 01:14:58 UTC (rev 1185) @@ -177,7 +177,7 @@ if ( threadCount <= countNow ) return threadCount; - const unsigned int totalCount = pThis->m_threads.size(); + const size_t totalCount = pThis->m_threads.size(); const unsigned int howManyToAdd = threadCount - countNow; if ( pThis->m_threads.capacity() <= howManyToAdd ) pThis->m_threads.reserve( totalCount + howManyToAdd ); @@ -200,12 +200,12 @@ // ---------------------------------------------------------------------------- -unsigned int ThreadPool::GetCount( void ) const volatile +size_t ThreadPool::GetCount( void ) const volatile { assert( IsValid() ); LOKI_DEBUG_CODE( Checker checker( this ); (void)checker; ) ThreadPool * pThis = const_cast< ThreadPool * >( this ); - const unsigned int count = pThis->m_threads.size(); + const size_t count = pThis->m_threads.size(); return count; } Modified: trunk/test/LevelMutex/ThreadPool.hpp =================================================================== --- trunk/test/LevelMutex/ThreadPool.hpp 2013-06-19 02:23:00 UTC (rev 1184) +++ trunk/test/LevelMutex/ThreadPool.hpp 2013-06-23 01:14:58 UTC (rev 1185) @@ -139,7 +139,7 @@ void JoinAll( void ) const volatile; - unsigned int GetCount( void ) const volatile; + size_t GetCount( void ) const volatile; unsigned int GetCount( Thread::Status status ) const volatile; Modified: trunk/test/SmallObj/timer.h =================================================================== --- trunk/test/SmallObj/timer.h 2013-06-19 02:23:00 UTC (rev 1184) +++ trunk/test/SmallObj/timer.h 2013-06-23 01:14:58 UTC (rev 1185) @@ -38,8 +38,8 @@ { t1 = clock(); } - - int t() + + clock_t t() { return t1-t0; } @@ -67,8 +67,8 @@ std::cout << s << "\tseconds: " << sec(t) << "\trelative time: " << rel(t) << "%\tspeed-up factor: " << speedup(t) << "" << std::endl; } private: - int t0; - int t1; + clock_t t0; + clock_t t1; }; #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |