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:
@ -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() )
|
||||
{
|
||||
|
@ -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) {}
|
||||
|
||||
|
Reference in New Issue
Block a user