diff --git a/quicktex/s3tc/bc1/OrderTable.h b/quicktex/s3tc/bc1/OrderTable.h index 6d4b564..d24cf10 100644 --- a/quicktex/s3tc/bc1/OrderTable.h +++ b/quicktex/s3tc/bc1/OrderTable.h @@ -58,7 +58,7 @@ template class OrderTable { static bool Generate() { static_assert(N == 4 || N == 3); - table_mutex.lock(); + std::scoped_lock{table_mutex}; if (!generated) { hashes = new std::array(); factors = new std::array(); @@ -85,8 +85,6 @@ template class OrderTable { generated = true; } - table_mutex.unlock(); - assert(generated); return true; }