diff options
author | Mike Jones <mjjones@us.ibm.com> | 2012-06-21 16:31:56 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-06-21 17:09:45 -0500 |
commit | 5b191e6a866b23f825045f610d8d6e7cbeab1588 (patch) | |
tree | f676e479c02dcf22ef08a038be932bd34b9741b8 /src/include/util | |
parent | 3325fd345ef3e8d17a2f5527b49b13758b615a46 (diff) | |
download | talos-hostboot-5b191e6a866b23f825045f610d8d6e7cbeab1588.tar.gz talos-hostboot-5b191e6a866b23f825045f610d8d6e7cbeab1588.zip |
Fix const-correctness bug in std::map splay tree implementation
Code that uses std::map::find on a reference to a constant map in order
to get a const_iterator fails due to a missing const in the underlying
splay tree implementation. This is Patrick's fix!
Change-Id: Ifcf65b097f55a635d24774c81fdbf380e9058943
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1234
Reviewed-by: Mark W. Wenning <wenning@us.ibm.com>
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/util')
-rw-r--r-- | src/include/util/impl/stlmap.H | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/include/util/impl/stlmap.H b/src/include/util/impl/stlmap.H index 6afa64c76..1ab234ef2 100644 --- a/src/include/util/impl/stlmap.H +++ b/src/include/util/impl/stlmap.H @@ -1,26 +1,26 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/util/impl/stlmap.h $ -// -// IBM CONFIDENTIAL -// -// COPYRIGHT International Business Machines Corp. 2012 -// -// p1 -// -// Object Code Only (OCO) source materials -// Licensed Internal Code Source Materials -// IBM HostBoot Licensed Internal Code -// -// The source code for this program is not published or other- -// wise divested of its trade secrets, irrespective of what has -// been deposited with the U.S. Copyright Office. -// -// Origin: 30 -// -// IBM_PROLOG_END - +/* IBM_PROLOG_BEGIN_TAG + * This is an automatically generated prolog. + * + * $Source: src/include/util/impl/stlmap.H $ + * + * IBM CONFIDENTIAL + * + * COPYRIGHT International Business Machines Corp. 2012 + * + * p1 + * + * Object Code Only (OCO) source materials + * Licensed Internal Code Source Materials + * IBM HostBoot Licensed Internal Code + * + * The source code for this program is not published or other- + * wise divested of its trade secrets, irrespective of what has + * been deposited with the U.S. Copyright Office. + * + * Origin: 30 + * + * IBM_PROLOG_END_TAG + */ #ifndef __UTIL_IMPL_STLMAP_H #define __UTIL_IMPL_STLMAP_H @@ -516,7 +516,7 @@ namespace Util * As in, it finds the pointer to the beginning key-value pair * based on the address of just the key. */ - const void** makeSplayTreeValue(const key_type& k) + const void** makeSplayTreeValue(const key_type& k) const { typename Util::Traits::remove_const<key_type*>::type key = const_cast<typename |