diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/SnapshotManager/SnapshotManager.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/SnapshotManager/SnapshotManager.cpp index 3f8ee556..bfc20218 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/SnapshotManager/SnapshotManager.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/SnapshotManager/SnapshotManager.cpp @@ -174,10 +174,10 @@ namespace Bloom::Widgets } void SnapshotManager::addSnapshot(MemorySnapshot&& snapshotTmp) { - const auto snapshotIt = this->snapshotsById.emplace(snapshotTmp.id, std::move(snapshotTmp)); + const auto snapshotIt = this->snapshotsById.insert(snapshotTmp.id, std::move(snapshotTmp)); const auto& snapshot = *snapshotIt; - const auto snapshotItemIt = this->snapshotItemsById.emplace(snapshot.id, new MemorySnapshotItem(snapshot)); + const auto snapshotItemIt = this->snapshotItemsById.insert(snapshot.id, new MemorySnapshotItem(snapshot)); auto& snapshotItem = *snapshotItemIt; this->snapshotListScene->addListItem(snapshotItem); diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/SnapshotManager/SnapshotManager.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/SnapshotManager/SnapshotManager.hpp index 5e1f8379..e22237a5 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/SnapshotManager/SnapshotManager.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/SnapshotManager/SnapshotManager.hpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include "src/Insight/UserInterfaces/InsightWindow/Widgets/PaneWidget.hpp" #include "src/Insight/UserInterfaces/InsightWindow/Widgets/SvgToolButton.hpp" @@ -56,8 +56,8 @@ namespace Bloom::Widgets const std::vector& focusedMemoryRegions; const std::vector& excludedMemoryRegions; - QHash snapshotsById; - QHash snapshotItemsById; + QMap snapshotsById; + QMap snapshotItemsById; QWidget* container = nullptr; QWidget* toolBar = nullptr;