diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-08 20:41:34 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-08 20:41:34 +0000 |
commit | da429b901af02d580d5ad602c484d57d75be3f24 (patch) | |
tree | 8182aa751fc7bd56beb57c5be571a2f0598b0cdc /base/linked_list.h | |
parent | 9e0b9c2c640c7b62fc4d7fa03b48d3645742ee0f (diff) | |
download | chromium_src-da429b901af02d580d5ad602c484d57d75be3f24.zip chromium_src-da429b901af02d580d5ad602c484d57d75be3f24.tar.gz chromium_src-da429b901af02d580d5ad602c484d57d75be3f24.tar.bz2 |
Use static_cast in LinkNode<T>::value() so that it works with
multiple inheritance.
R=eroman
BUG=none
TEST=LinkedList.MultipleInheritanceNode
Review URL: http://codereview.chromium.org/266020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28439 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/linked_list.h')
-rw-r--r-- | base/linked_list.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/base/linked_list.h b/base/linked_list.h index ab77a96e..5b5184f 100644 --- a/base/linked_list.h +++ b/base/linked_list.h @@ -118,11 +118,11 @@ class LinkNode { // Cast from the node-type to the value type. const T* value() const { - return reinterpret_cast<const T*>(this); + return static_cast<const T*>(this); } T* value() { - return reinterpret_cast<T*>(this); + return static_cast<T*>(this); } private: |