forked from boostorg/regex
Merge pull request #132 from ClaymorePT/regex_mutex_fix
Fixes wrong type for mutex in regex v5
This commit is contained in:
@ -85,10 +85,10 @@ struct mem_block_node
|
|||||||
struct mem_block_cache
|
struct mem_block_cache
|
||||||
{
|
{
|
||||||
// this member has to be statically initialsed:
|
// this member has to be statically initialsed:
|
||||||
mem_block_node* next;
|
mem_block_node* next { nullptr };
|
||||||
unsigned cached_blocks;
|
unsigned cached_blocks { 0 };
|
||||||
#ifdef BOOST_HAS_THREADS
|
#ifdef BOOST_HAS_THREADS
|
||||||
boost::static_mutex mut;
|
std::mutex mut;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
~mem_block_cache()
|
~mem_block_cache()
|
||||||
@ -133,11 +133,7 @@ struct mem_block_cache
|
|||||||
}
|
}
|
||||||
static mem_block_cache& instance()
|
static mem_block_cache& instance()
|
||||||
{
|
{
|
||||||
#ifdef BOOST_HAS_THREADS
|
static mem_block_cache block_cache;
|
||||||
static mem_block_cache block_cache = { 0, 0, BOOST_STATIC_MUTEX_INIT, };
|
|
||||||
#else
|
|
||||||
static mem_block_cache block_cache = { 0, 0, };
|
|
||||||
#endif
|
|
||||||
return block_cache;
|
return block_cache;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user