Decompile fn_07595 (?GetBuffer@ThreadSafeBuffer@?A0xda7967a1@@QAEPADXZ)
Batch #14950 by SapitoSucio: 0 byte-identical, 1 confirmed by peer review. - fn_07595 ?GetBuffer@ThreadSafeBuffer@?A0xda7967a1@@QAEPADXZ: logic confirmed by peer review Peer-reviewed-by: Yommy, Tanke Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
72496ab386
commit
105fa0c3f3
1 changed files with 4 additions and 3 deletions
|
|
@ -51,13 +51,14 @@ namespace {
|
|||
char* ThreadSafeBuffer::GetBuffer() {
|
||||
NSyncObject lock(&this->m_criticalSection);
|
||||
const int thread = reinterpret_cast<int>(GetCurrentThread());
|
||||
std::map<int, std::array<char, 2048>>& buffers = this->m_buffers;
|
||||
|
||||
if (this->m_buffers.find(thread) == this->m_buffers.end()) {
|
||||
if (buffers.find(thread) == buffers.end()) {
|
||||
std::array<char, 2048> buffer{};
|
||||
this->m_buffers[thread] = buffer;
|
||||
buffers[thread] = buffer;
|
||||
}
|
||||
|
||||
return this->m_buffers[thread].data();
|
||||
return buffers[thread].data();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue