mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
Remove redundant synchronization for 'static' variable initialization
This commit is contained in:
parent
8be8a76cba
commit
3914bd0062
@ -56,7 +56,6 @@
|
|||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
sf::Mutex maxTextureUnitsMutex;
|
|
||||||
sf::Mutex isAvailableMutex;
|
sf::Mutex isAvailableMutex;
|
||||||
|
|
||||||
GLint checkMaxTextureUnits()
|
GLint checkMaxTextureUnits()
|
||||||
@ -70,11 +69,7 @@ namespace
|
|||||||
// Retrieve the maximum number of texture units available
|
// Retrieve the maximum number of texture units available
|
||||||
std::size_t getMaxTextureUnits()
|
std::size_t getMaxTextureUnits()
|
||||||
{
|
{
|
||||||
// TODO: Remove this lock when it becomes unnecessary in C++11
|
|
||||||
sf::Lock lock(maxTextureUnitsMutex);
|
|
||||||
|
|
||||||
static GLint maxUnits = checkMaxTextureUnits();
|
static GLint maxUnits = checkMaxTextureUnits();
|
||||||
|
|
||||||
return static_cast<std::size_t>(maxUnits);
|
return static_cast<std::size_t>(maxUnits);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user