From a68171002cc596d832debef8daa20551c5c12547 Mon Sep 17 00:00:00 2001 From: Riyyi Date: Sat, 20 Aug 2022 03:43:00 +0200 Subject: [PATCH] Emulator: Fix out of scope destruction of string_view --- src/emu.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/emu.h b/src/emu.h index 02d19a2..5f16a56 100644 --- a/src/emu.h +++ b/src/emu.h @@ -1,6 +1,7 @@ #pragma once #include // uint32_t +#include #include #include #include @@ -27,6 +28,8 @@ public: ProcessingUnit* processingUnit(std::string_view name) const { return m_processing_units.at(name); } + std::string_view bootrom() const { return m_bootrom; } + private: uint32_t m_frequency { 0 }; double m_timestep { 0 }; @@ -39,5 +42,5 @@ private: std::unordered_map m_processing_units; std::unordered_map> m_memory_spaces; - std::string_view m_bootrom; + std::string m_bootrom; };