Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Unified Diff: cc/base/scoped_ptr_algorithm.h

Issue 1437413002: cc: Remove ScopedPtrVector and cc::remove_if. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: just the vector Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/base/scoped_ptr_algorithm.h
diff --git a/cc/base/scoped_ptr_algorithm.h b/cc/base/scoped_ptr_algorithm.h
deleted file mode 100644
index 79f4eee49e6d264e0a913280024d1c024b9cf9eb..0000000000000000000000000000000000000000
--- a/cc/base/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_BASE_SCOPED_PTR_ALGORITHM_H_
-#define CC_BASE_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_BASE_SCOPED_PTR_ALGORITHM_H_

Powered by Google App Engine
This is Rietveld 408576698