Use absl::flat_hash_map instead

This commit is contained in:
LoveSy 2022-06-22 15:37:29 +08:00
parent caeef02ef8
commit a56a6b9ed8
2 changed files with 5 additions and 5 deletions

View File

@ -5,8 +5,8 @@
#include <list> #include <list>
#include <shared_mutex> #include <shared_mutex>
#include <string_view> #include <string_view>
#include <unordered_map> #include <absl/container/flat_hash_map.h>
#include <unordered_set> #include <absl/container/flat_hash_set.h>
#include "logging.hpp" #include "logging.hpp"
#include "lsplant.hpp" #include "lsplant.hpp"
@ -102,13 +102,13 @@ class Class;
namespace { namespace {
// target, backup // target, backup
inline std::unordered_map<art::ArtMethod *, std::pair<jobject, art::ArtMethod *>> hooked_methods_; inline absl::flat_hash_map<art::ArtMethod *, std::pair<jobject, art::ArtMethod *>> hooked_methods_;
inline std::shared_mutex hooked_methods_lock_; inline std::shared_mutex hooked_methods_lock_;
inline std::list<std::pair<art::ArtMethod *, art::ArtMethod *>> jit_movements_; inline std::list<std::pair<art::ArtMethod *, art::ArtMethod *>> jit_movements_;
inline std::shared_mutex jit_movements_lock_; inline std::shared_mutex jit_movements_lock_;
inline std::unordered_map<const art::dex::ClassDef *, std::unordered_set<art::ArtMethod *>> inline absl::flat_hash_map<const art::dex::ClassDef *, absl::flat_hash_set<art::ArtMethod *>>
hooked_classes_; hooked_classes_;
inline std::shared_mutex hooked_classes_lock_; inline std::shared_mutex hooked_classes_lock_;
} // namespace } // namespace

@ -1 +1 @@
Subproject commit bf90652281cc588aa34bb277339b9e8234475a34 Subproject commit 5e926bd4e6e887f3a0d8d79b93c7e0eee2e92724