From 8c53d65362a4e0cc958231994a5e61c9ca147935 Mon Sep 17 00:00:00 2001 From: Victor Zarubkin Date: Sun, 14 Aug 2016 23:13:18 +0300 Subject: [PATCH] (profiler core) Remove clang warning. Remove useless 2 bytes in memory per block --- src/profile_manager.cpp | 2 +- src/reader.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/profile_manager.cpp b/src/profile_manager.cpp index 60021ae..5d27dfa 100644 --- a/src/profile_manager.cpp +++ b/src/profile_manager.cpp @@ -39,7 +39,7 @@ extern "C"{ SerializedBlock* SerializedBlock::create(const Block* block, uint64_t& memory_size) { auto name_length = static_cast(strlen(block->getName())); - auto size = static_cast(sizeof(BaseBlockData) + sizeof(uint16_t) + name_length + 1); + auto size = static_cast(sizeof(BaseBlockData) + name_length + 1); auto data = ::new char[size]; ::new (static_cast(data)) SerializedBlock(block, name_length); memory_size += size; diff --git a/src/reader.cpp b/src/reader.cpp index 7dec23d..2af05bc 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -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)