summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorjorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-03 05:48:45 +0000
committerjorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-03 05:48:45 +0000
commit6ae06aa5ad0ac526ad8a34538ecbaca61bbac218 (patch)
tree6235216793f217d952a937160a1b29bead4f98f2 /base
parent7f2d811b54b16f1005b44b775fd2f21c35c7b9ae (diff)
downloadchromium_src-6ae06aa5ad0ac526ad8a34538ecbaca61bbac218.zip
chromium_src-6ae06aa5ad0ac526ad8a34538ecbaca61bbac218.tar.gz
chromium_src-6ae06aa5ad0ac526ad8a34538ecbaca61bbac218.tar.bz2
Add a comment about templates for hashing pointers and correct the case of a function inside a comment.
TEST=none BUG=none Review URL: http://codereview.chromium.org/190003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25300 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/hash_tables.h6
-rw-r--r--base/scoped_ptr.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/base/hash_tables.h b/base/hash_tables.h
index c2dcde5..ad7d465 100644
--- a/base/hash_tables.h
+++ b/base/hash_tables.h
@@ -11,6 +11,12 @@
// base::hash_map<int> my_map;
// base::hash_set<int> my_set;
//
+// NOTE: It is an explicit non-goal of this class to provide a generic hash
+// function for pointers. If you want to hash a pointers to a particular class,
+// please define the template specialization elsewhere (for example, in its
+// header file) and keep it specific to just pointers to that class. This is
+// because identity hashes are not desirable for all types that might show up
+// in containers as pointers.
#ifndef BASE_HASH_TABLES_H_
#define BASE_HASH_TABLES_H_
diff --git a/base/scoped_ptr.h b/base/scoped_ptr.h
index 4489f2da..34e4666a 100644
--- a/base/scoped_ptr.h
+++ b/base/scoped_ptr.h
@@ -19,7 +19,7 @@
// foo.reset(new Foo("wee3")); // Foo("wee2") was destroyed.
// foo->Method(); // Foo::Method() called.
// foo.get()->Method(); // Foo::Method() called.
-// SomeFunc(foo.Release()); // SomeFunc takes owernship, foo no longer
+// SomeFunc(foo.release()); // SomeFunc takes owernship, foo no longer
// // manages a pointer.
// foo.reset(new Foo("wee4")); // foo manages a pointer again.
// foo.reset(); // Foo("wee4") destroyed, foo no longer