1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 19:29:09 +00:00

Replace hsMutex with std::mutex

This commit is contained in:
2014-04-05 20:45:58 -07:00
parent 964256411e
commit 2947acb2c8
16 changed files with 166 additions and 342 deletions

View File

@ -55,7 +55,7 @@ const float TimeBasedAvgRing<T>::kPercision = 0.001;
template <class T>
void TimeBasedAvgRing<T>::AddItem(T value, double time)
{
hsTempMutexLock lock( fLock );
std::lock_guard<std::mutex> lock(fLock);
if ( fList.empty() )
{

View File

@ -44,9 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "HeadSpin.h"
#include <list>
#include "hsThread.h"
#include <mutex>
// A Time based Value Averaging class
// implemented in a ring buffer
@ -91,7 +89,7 @@ private:
float fMaxAvg;
double fTotal;
TimeListIterator fRingStart, fRingEnd;
hsMutex fLock;
std::mutex fLock;
public:
TimeBasedAvgRing():fLen(0.f),fAvg(0.f),fMaxAvg(0.f),fTotal(0.0) {}