From 6dafbab7e5febd9324c3f2bb919bb8b287fddf1d Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Wed, 28 Nov 2001 19:58:19 +0100 Subject: [PATCH] 2001-11-28 Paolo Carlini Loren J. Rittle * include/bits/basic_string.h (basic_string::_Rep::__default_excess, _S_excess_slop): Unused, remove. * include/bits/basic_string.tcc: Remove dead code. * include/bits/c++config: Remove comment. Co-Authored-By: Loren J. Rittle From-SVN: r47425 --- libstdc++-v3/ChangeLog | 9 +++++++++ libstdc++-v3/include/bits/basic_string.h | 16 ---------------- libstdc++-v3/include/bits/basic_string.tcc | 20 -------------------- libstdc++-v3/include/bits/c++config | 4 ---- 4 files changed, 9 insertions(+), 40 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 5f74c2d50bd..c381c9eaa28 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,12 @@ +2001-11-28 Paolo Carlini + Loren J. Rittle + + * include/bits/basic_string.h + (basic_string::_Rep::__default_excess, _S_excess_slop): + Unused, remove. + * include/bits/basic_string.tcc: Remove dead code. + * include/bits/c++config: Remove comment. + 2001-11-28 Benjamin Kosnik Jakub Jelinek diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h index 37a30af7ca4..8c5caff788a 100644 --- a/libstdc++-v3/include/bits/basic_string.h +++ b/libstdc++-v3/include/bits/basic_string.h @@ -196,22 +196,6 @@ namespace std _CharT* _M_clone(const _Alloc&, size_type __res = 0); - -#if _GLIBCPP_ALLOC_CONTROL - // These function pointers allow you to modify the allocation - // policy used by the string classes. By default they expand by - // powers of two, but this may be excessive for space-critical - // applications. - - // Returns true if ALLOCATED is too much larger than LENGTH - static bool (*_S_excess_slop) (size_t __length, size_t __allocated); - - inline static bool - __default_excess(size_t, size_t); -#else - inline static bool - _S_excess_slop(size_t, size_t); -#endif }; // Use empty-base optimization: http://www.cantrip.org/emptyopt.html diff --git a/libstdc++-v3/include/bits/basic_string.tcc b/libstdc++-v3/include/bits/basic_string.tcc index 7a57f7df160..eeaa20aadef 100644 --- a/libstdc++-v3/include/bits/basic_string.tcc +++ b/libstdc++-v3/include/bits/basic_string.tcc @@ -349,13 +349,6 @@ namespace std } } -#ifdef _GLIBCPP_ALLOC_CONTROL - template - bool (*basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_excess_slop) - (size_t, size_t) = - basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_default_excess; -#endif - template typename basic_string<_CharT, _Traits, _Alloc>::_Rep* basic_string<_CharT, _Traits, _Alloc>::_Rep:: @@ -452,19 +445,6 @@ namespace std return __r->_M_refdata(); } - template - inline bool -#ifdef _GLIBCPP_ALLOC_CONTROL - basic_string<_CharT, _Traits, _Alloc>::_Rep:: - _S_default_excess(size_t __s, size_t __r) -#else - basic_string<_CharT, _Traits, _Alloc>::_Rep:: - _S_excess_slop(size_t __s, size_t __r) -#endif - { - return 2 * (__s <= 16 ? 16 : __s) < __r; - } - template void basic_string<_CharT, _Traits, _Alloc>::resize(size_type __n, _CharT __c) diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config index 9a32ad0ddff..2ddcabcb954 100644 --- a/libstdc++-v3/include/bits/c++config +++ b/libstdc++-v3/include/bits/c++config @@ -55,10 +55,6 @@ // Use corrected code from the committee library group's issues list. #define _GLIBCPP_RESOLVE_LIB_DEFECTS 1 -// Define this to permit user-level control of the expansion of string -// buffers (via a fn pointer), see basic_string.* for more. -//#define _GLIBCPP_ALLOC_CONTROL - // Map gthr.h abstraction to that required for STL. Do not key off of // __GTHREADS at this point since we haven't seen the correct symbol // yet, instead setup so that include/bits/stl_threads.h will know to -- 2.30.2