refactor: use C++20's contains() method (#45742)
* chore: use std::map<>::contains() instead of count() or find() * chore: use std::map<>::contains() instead of base::Contains()
This commit is contained in:
parent
612da3ec47
commit
2a383e9ddd
29 changed files with 54 additions and 77 deletions
|
@ -11,7 +11,6 @@
|
|||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "base/containers/contains.h"
|
||||
#include "base/feature_list.h"
|
||||
#include "base/json/json_writer.h"
|
||||
#include "base/trace_event/trace_event.h"
|
||||
|
@ -69,7 +68,7 @@ bool DeepFreeze(const v8::Local<v8::Object>& object,
|
|||
const v8::Local<v8::Context>& context,
|
||||
std::set<int> frozen = std::set<int>()) {
|
||||
int hash = object->GetIdentityHash();
|
||||
if (base::Contains(frozen, hash))
|
||||
if (frozen.contains(hash))
|
||||
return true;
|
||||
frozen.insert(hash);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue