Flutter Engine
Loading...
Searching...
No Matches
container.h
Go to the documentation of this file.
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#ifndef FLUTTER_FML_CONTAINER_H_
6
#define FLUTTER_FML_CONTAINER_H_
7
8
#include <functional>
9
#include <map>
10
11
namespace
fml
{
12
13
template
<
14
class
Collection =
15
std::unordered_map<class Key, class Value, class Hash, class Equal>>
16
void
erase_if
(
17
Collection& container,
18
const
std::function<
bool
(
typename
Collection::iterator)>& predicate) {
19
auto
it = container.begin();
20
while
(it != container.end()) {
21
if
(predicate(it)) {
22
it = container.erase(it);
23
continue
;
24
}
25
it++;
26
}
27
}
28
29
}
// namespace fml
30
31
#endif
// FLUTTER_FML_CONTAINER_H_
fml
Definition
ascii_trie.cc:9
fml::erase_if
void erase_if(Collection &container, const std::function< bool(typename Collection::iterator)> &predicate)
Definition
container.h:16
fml
container.h
Generated on Thu Nov 6 2025 16:11:22 for Flutter Engine by
1.9.8