Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
fml
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
(Collection& container,
17
std::function<
bool
(
typename
Collection::iterator)> predicate) {
18
auto
it = container.begin();
19
while
(it != container.end()) {
20
if
(predicate(it)) {
21
it = container.erase(it);
22
continue
;
23
}
24
it++;
25
}
26
}
27
28
}
// namespace fml
29
30
#endif
// FLUTTER_FML_CONTAINER_H_
fml
Definition
ascii_trie.cc:9
fml::erase_if
void erase_if(Collection &container, std::function< bool(typename Collection::iterator)> predicate)
Definition
container.h:16
Generated on Fri Apr 26 2024 06:14:05 for Flutter Engine by
1.9.8