From c7923f356edc7217561a4f2b4edffa9f23e5b7d9 Mon Sep 17 00:00:00 2001 From: lisyarus Date: Sun, 7 Aug 2022 11:20:32 +0300 Subject: [PATCH] Fix profiler result merging --- libs/prof/source/profiler.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libs/prof/source/profiler.cpp b/libs/prof/source/profiler.cpp index 29a05931..17a82b1b 100644 --- a/libs/prof/source/profiler.cpp +++ b/libs/prof/source/profiler.cpp @@ -124,13 +124,10 @@ namespace psemek::prof auto it1 = t1.children.find(it2->first); if (it1 == t1.children.end()) { - it1 = t1.children.insert(*it2).first; + it1 = t1.children.insert({it2->first, profiler_tree{}}).first; t1.children_list.push_back(it1); } - else - { - it1->second = merge(std::move(it1->second), it2->second); - } + it1->second = merge(std::move(it1->second), it2->second); } return t1;