From 5b191e6a866b23f825045f610d8d6e7cbeab1588 Mon Sep 17 00:00:00 2001 From: Mike Jones Date: Thu, 21 Jun 2012 16:31:56 -0500 Subject: 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 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III --- src/include/util/impl/stlmap.H | 48 +++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'src') 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::type key = const_cast