From ba9a285d56ec364e3e5b63e2f3c1e7677bfaa738 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 26 Apr 2021 16:45:57 +0200 Subject: [PATCH] Profiler: Use NonnullOwnPtr for libraries --- Userland/DevTools/Profiler/Process.cpp | 2 -- Userland/DevTools/Profiler/Process.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Userland/DevTools/Profiler/Process.cpp b/Userland/DevTools/Profiler/Process.cpp index ca6179d08e3..ac03c69a44d 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 f4a765ecd52..3e7c6b131bc 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> m_libraries; + mutable HashMap> m_libraries; }; struct Thread {