diff --git a/Source/Utility/Text/FormatString.cpp b/Source/Utility/Text/FormatString.cpp index 41a984f0b..d58e9d8c9 100644 --- a/Source/Utility/Text/FormatString.cpp +++ b/Source/Utility/Text/FormatString.cpp @@ -51,13 +51,14 @@ namespace { char* ThreadSafeBuffer::GetBuffer() { NSyncObject lock(&this->m_criticalSection); const int thread = reinterpret_cast(GetCurrentThread()); + std::map>& buffers = this->m_buffers; - if (this->m_buffers.find(thread) == this->m_buffers.end()) { + if (buffers.find(thread) == buffers.end()) { std::array buffer{}; - this->m_buffers[thread] = buffer; + buffers[thread] = buffer; } - return this->m_buffers[thread].data(); + return buffers[thread].data(); } }