================ @@ -53,44 +49,52 @@ bool WatchpointResource::Contains(addr_t addr) { void WatchpointResource::AddOwner(const WatchpointSP &wp_sp) { std::lock_guard<std::recursive_mutex> guard(m_owners_mutex); - m_owners.Add(wp_sp); + m_owners.push_back(wp_sp); } void WatchpointResource::RemoveOwner(WatchpointSP &wp_sp) { std::lock_guard<std::recursive_mutex> guard(m_owners_mutex); - m_owners.Remove(wp_sp); + const auto &it = std::find(m_owners.begin(), m_owners.end(), wp_sp); + if (it != m_owners.end()) + m_owners.erase(it); } size_t WatchpointResource::GetNumberOfOwners() { std::lock_guard<std::recursive_mutex> guard(m_owners_mutex); - return m_owners.GetSize(); + return m_owners.size(); } bool WatchpointResource::OwnersContains(WatchpointSP &wp_sp) { std::lock_guard<std::recursive_mutex> guard(m_owners_mutex); - return m_owners.Contains(wp_sp); + const auto &it = std::find(m_owners.begin(), m_owners.end(), wp_sp); + if (it != m_owners.end()) + return true; + return false; ---------------- bulbazord wrote:
`return it != m_owners.end();` https://github.com/llvm/llvm-project/pull/68845 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits