mirror of
https://github.com/yse/easy_profiler.git
synced 2025-01-14 00:27:55 +08:00
(profiler core) Remove clang warning. Remove useless 2 bytes in memory per block
This commit is contained in:
parent
197a585307
commit
8c53d65362
@ -39,7 +39,7 @@ extern "C"{
|
||||
SerializedBlock* SerializedBlock::create(const Block* block, uint64_t& memory_size)
|
||||
{
|
||||
auto name_length = static_cast<uint16_t>(strlen(block->getName()));
|
||||
auto size = static_cast<uint16_t>(sizeof(BaseBlockData) + sizeof(uint16_t) + name_length + 1);
|
||||
auto size = static_cast<uint16_t>(sizeof(BaseBlockData) + name_length + 1);
|
||||
auto data = ::new char[size];
|
||||
::new (static_cast<void*>(data)) SerializedBlock(block, name_length);
|
||||
memory_size += size;
|
||||
|
@ -364,7 +364,7 @@ extern "C"{
|
||||
auto& per_parent_statistics = parent_statistics[it.first];
|
||||
per_parent_statistics.clear();
|
||||
|
||||
statistics_threads.emplace_back(::std::move(::std::thread([&per_parent_statistics, &per_frame_statistics](::profiler::BlocksTreeRoot& root)
|
||||
statistics_threads.emplace_back(::std::thread([&per_parent_statistics, &per_frame_statistics](::profiler::BlocksTreeRoot& root)
|
||||
{
|
||||
for (auto& frame : root.tree.children)
|
||||
{
|
||||
@ -379,7 +379,7 @@ extern "C"{
|
||||
}
|
||||
|
||||
++root.tree.depth;
|
||||
}, ::std::ref(root))));
|
||||
}, ::std::ref(root)));
|
||||
}
|
||||
|
||||
for (auto& t : statistics_threads)
|
||||
|
Loading…
x
Reference in New Issue
Block a user