From 1c5084c6defa6429b6f1a696fb17a6c8263950ee Mon Sep 17 00:00:00 2001 From: Sergey Yagovtsev Date: Mon, 5 Jun 2017 13:11:02 +0300 Subject: [PATCH] for #41: minor beautifulize --- easy_profiler_core/reader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/easy_profiler_core/reader.cpp b/easy_profiler_core/reader.cpp index 5c3516b..3a8ca48 100644 --- a/easy_profiler_core/reader.cpp +++ b/easy_profiler_core/reader.cpp @@ -553,14 +553,14 @@ extern "C" { uint32_t read_number = 0; ::profiler::block_index_t blocks_counter = 0; ::std::vector name; + + const size_t thread_id_t_size = version < EASY_V_130 ? sizeof(uint32_t) : sizeof(::profiler::thread_id_t); + while (!inFile.eof() && read_number < total_blocks_number) { EASY_BLOCK("Read thread data", ::profiler::colors::DarkGreen); ::profiler::thread_id_t thread_id = 0; - long thread_id_t_size = sizeof(decltype(thread_id)); - if (version < EASY_V_130) - thread_id_t_size = sizeof(uint32_t); inFile.read((char*)&thread_id, thread_id_t_size); auto& root = threaded_trees[thread_id];