Use unsigned to define number of threads

This commit is contained in:
elsid 2022-07-12 14:58:25 +02:00
parent 8c3c65fe9f
commit 22ed6d5c1e
No known key found for this signature in database
GPG key ID: 4DE04C198CBA7625
3 changed files with 13 additions and 18 deletions

View file

@ -1,7 +1,6 @@
#ifndef OPENMW_BARRIER_H
#define OPENMW_BARRIER_H
#include <cassert>
#include <condition_variable>
#include <mutex>
@ -12,9 +11,8 @@ namespace Misc
{
public:
/// @param count number of threads to wait on
explicit Barrier(int count) : mThreadCount(count), mRendezvousCount(0), mGeneration(0)
explicit Barrier(unsigned count) : mThreadCount(count), mRendezvousCount(0), mGeneration(0)
{
assert(count >= 0);
}
/// @brief stop execution of threads until count distinct threads reach this point