diff options
author | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-18 06:13:52 +0000 |
---|---|---|
committer | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-18 06:13:52 +0000 |
commit | 681ccff34ef98c5a12d261643179a9044f4397d1 (patch) | |
tree | ae0ff3d0b1e2cb84224f76db5300bc7723c1f34c /cc/scoped_ptr_algorithm.h | |
parent | 8b9d37b0f4faaa93d88ba30acf0462b9849711bd (diff) | |
download | chromium_src-681ccff34ef98c5a12d261643179a9044f4397d1.zip chromium_src-681ccff34ef98c5a12d261643179a9044f4397d1.tar.gz chromium_src-681ccff34ef98c5a12d261643179a9044f4397d1.tar.bz2 |
Part 1 of cc/ directory shuffles: base
This establishes cc/base/ as discussed in https://groups.google.com/a/chromium.org/d/msg/graphics-dev/wNRsl3BwU_Y/jFXeRQq7e30J.
This patch will likely touch the most locations since it moves cc/switches.h
BUG=190824
TBR=piman@chromium.org, thakis@chromium.org
Review URL: https://codereview.chromium.org/12472028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188681 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/scoped_ptr_algorithm.h')
-rw-r--r-- | cc/scoped_ptr_algorithm.h | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/cc/scoped_ptr_algorithm.h b/cc/scoped_ptr_algorithm.h deleted file mode 100644 index 2972b00..0000000 --- a/cc/scoped_ptr_algorithm.h +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CC_SCOPED_PTR_ALGORITHM_H_ -#define CC_SCOPED_PTR_ALGORITHM_H_ - -namespace cc { - -// ScopedContainers need to implement a swap() method since they do not allow -// assignment to their iterators. -template <class ForwardIterator, class Predicate, class ScopedContainer> -ForwardIterator remove_if( - ScopedContainer& container, - ForwardIterator first, - ForwardIterator last, - Predicate predicate) { - ForwardIterator result = first; - for (; first != last; ++first) { - if (!predicate(*first)) { - container.swap(first, result); - ++result; - } - } - return result; -} - -} // namespace cc - -#endif // CC_SCOPED_PTR_ALGORITHM_H_ |