diff options
author | Gunnar Beutner <gbeutner@serenityos.org> | 2021-04-26 16:45:57 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-26 17:13:55 +0200 |
commit | ba9a285d56ec364e3e5b63e2f3c1e7677bfaa738 (patch) | |
tree | ca8341f68cae4e80c385997a647d4a100df81a6c | |
parent | eb798d5538ea3c978034d8d8364ecfd7fbc6a8ee (diff) | |
download | serenity-ba9a285d56ec364e3e5b63e2f3c1e7677bfaa738.zip |
Profiler: Use NonnullOwnPtr for libraries
-rw-r--r-- | Userland/DevTools/Profiler/Process.cpp | 2 | ||||
-rw-r--r-- | Userland/DevTools/Profiler/Process.h | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/Userland/DevTools/Profiler/Process.cpp b/Userland/DevTools/Profiler/Process.cpp index ca6179d08e..ac03c69a44 100644 --- a/Userland/DevTools/Profiler/Process.cpp +++ b/Userland/DevTools/Profiler/Process.cpp @@ -109,8 +109,6 @@ String LibraryMetadata::Library::symbolicate(FlatPtr ptr, u32* offset) const const LibraryMetadata::Library* LibraryMetadata::library_containing(FlatPtr ptr) const { for (auto& it : m_libraries) { - if (!it.value) - continue; auto& library = *it.value; if (ptr >= library.base && ptr < (library.base + library.size)) return &library; diff --git a/Userland/DevTools/Profiler/Process.h b/Userland/DevTools/Profiler/Process.h index f4a765ecd5..3e7c6b131b 100644 --- a/Userland/DevTools/Profiler/Process.h +++ b/Userland/DevTools/Profiler/Process.h @@ -35,7 +35,7 @@ public: const Library* library_containing(FlatPtr) const; private: - mutable HashMap<String, OwnPtr<Library>> m_libraries; + mutable HashMap<String, NonnullOwnPtr<Library>> m_libraries; }; struct Thread { |