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

small refactoring

This commit is contained in:
Victor Zarubkin 2016-09-01 22:24:13 +03:00
parent 937f7d8fec
commit b90e13509e
2 changed files with 2 additions and 4 deletions

View File

@ -66,7 +66,7 @@ namespace profiler {
//////////////////////////////////////////////////////////////////////////
class BlocksTree
class BlocksTree final
{
typedef BlocksTree This;

View File

@ -421,9 +421,7 @@ void EasyMainWindow::onFileReaderTimeout()
EASY_GLOBALS.profiler_blocks.swap(threads_map);
EASY_GLOBALS.descriptors.swap(descriptors);
typedef decltype(EASY_GLOBALS.gui_blocks) gui_blocks_t;
gui_blocks_t().swap(EASY_GLOBALS.gui_blocks);
EASY_GLOBALS.gui_blocks.clear();
EASY_GLOBALS.gui_blocks.resize(nblocks);
memset(EASY_GLOBALS.gui_blocks.data(), 0, sizeof(::profiler_gui::EasyBlock) * nblocks);
for (decltype(nblocks) i = 0; i < nblocks; ++i) {