summaryrefslogtreecommitdiffstats
path: root/base/stl_util-inl.h
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-21 03:10:04 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-21 03:10:04 +0000
commite1791eb5f5b9043c8bad12509deb7db687073755 (patch)
treee377656046dabb86fcb321a67be08871f69f1f7a /base/stl_util-inl.h
parent6990bdfce1a73519e2c4ae08fd13d6896caeaa81 (diff)
downloadchromium_src-e1791eb5f5b9043c8bad12509deb7db687073755.zip
chromium_src-e1791eb5f5b9043c8bad12509deb7db687073755.tar.gz
chromium_src-e1791eb5f5b9043c8bad12509deb7db687073755.tar.bz2
views: Use STLDeleteElements to delete pointer objects.
BUG=None TEST=None Review URL: http://codereview.chromium.org/2135002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47879 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/stl_util-inl.h')
-rw-r--r--base/stl_util-inl.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/base/stl_util-inl.h b/base/stl_util-inl.h
index 70fa69e..4abc0d2 100644
--- a/base/stl_util-inl.h
+++ b/base/stl_util-inl.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -57,8 +57,7 @@ template<class T> void STLReserveIfNeeded(T* obj, int new_size) {
// advanced, which could result in the hash function trying to deference a
// stale pointer.
template <class ForwardIterator>
-void STLDeleteContainerPointers(ForwardIterator begin,
- ForwardIterator end) {
+void STLDeleteContainerPointers(ForwardIterator begin, ForwardIterator end) {
while (begin != end) {
ForwardIterator temp = begin;
++begin;
@@ -190,13 +189,10 @@ inline char* string_as_array(std::string* str) {
// differed.
template <class HashSet>
-inline bool
-HashSetEquality(const HashSet& set_a,
- const HashSet& set_b) {
+inline bool HashSetEquality(const HashSet& set_a, const HashSet& set_b) {
if (set_a.size() != set_b.size()) return false;
for (typename HashSet::const_iterator i = set_a.begin();
- i != set_a.end();
- ++i) {
+ i != set_a.end(); ++i) {
if (set_b.find(*i) == set_b.end())
return false;
}
@@ -204,9 +200,7 @@ HashSetEquality(const HashSet& set_a,
}
template <class HashMap>
-inline bool
-HashMapEquality(const HashMap& map_a,
- const HashMap& map_b) {
+inline bool HashMapEquality(const HashMap& map_a, const HashMap& map_b) {
if (map_a.size() != map_b.size()) return false;
for (typename HashMap::const_iterator i = map_a.begin();
i != map_a.end(); ++i) {