0
0
mirror of https://github.com/yse/easy_profiler.git synced 2025-01-14 00:27:55 +08:00

Again, auto can only add to confusion here.

This commit is contained in:
Blake Martin 2017-08-22 15:07:37 -05:00
parent 15323cc8ff
commit 01415cbdb8

View File

@ -711,9 +711,9 @@ void ThreadStorage::storeBlock(const profiler::Block& block)
void ThreadStorage::storeCSwitch(const CSwitchBlock& block)
{
auto name_length = static_cast<uint16_t>(strlen(block.name()));
auto size = static_cast<uint16_t>(sizeof(CSwitchEvent) + name_length + 1);
auto data = sync.closedList.allocate(size);
uint16_t name_length = static_cast<uint16_t>(strlen(block.name()));
uint16_t size = static_cast<uint16_t>(sizeof(CSwitchEvent) + name_length + 1);
void* data = sync.closedList.allocate(size);
::new (data) SerializedCSwitch(block, name_length);
sync.usedMemorySize += size;
}