2001-11-28 Paolo Carlini <pcarlini@unitus.it>
authorPaolo Carlini <pcarlini@unitus.it>
Wed, 28 Nov 2001 18:58:19 +0000 (19:58 +0100)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Wed, 28 Nov 2001 18:58:19 +0000 (18:58 +0000)
    Loren J. Rittle <ljrittle@acm.org>

* 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 <ljrittle@acm.org>
From-SVN: r47425

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/basic_string.h
libstdc++-v3/include/bits/basic_string.tcc
libstdc++-v3/include/bits/c++config

index 5f74c2d50bd41db92e76c58503beaf5eba46274a..c381c9eaa28d3ffa0d2158826b966e21ebc67a06 100644 (file)
@@ -1,3 +1,12 @@
+2001-11-28  Paolo Carlini <pcarlini@unitus.it>
+           Loren J. Rittle <ljrittle@acm.org>
+
+       * 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  <bkoz@redhat.com>
            Jakub Jelinek  <jakub@redhat.com>
 
index 37a30af7ca48f3aa0a133259b42cca30d8c8392b..8c5caff788a94e70b52d30db114642d664c29549 100644 (file)
@@ -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
index 7a57f7df16033cd920ae1f8276a7ae51c6f92ffe..eeaa20aadefdde9789b9cd4efad3cca5fe98d904 100644 (file)
@@ -349,13 +349,6 @@ namespace std
        }
     }
 
-#ifdef _GLIBCPP_ALLOC_CONTROL
-  template<typename _CharT, typename _Traits, typename _Alloc>
-    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 _CharT, typename _Traits, typename _Alloc>
     typename basic_string<_CharT, _Traits, _Alloc>::_Rep*
     basic_string<_CharT, _Traits, _Alloc>::_Rep::
@@ -452,19 +445,6 @@ namespace std
       return __r->_M_refdata();
     }
   
-  template<typename _CharT, typename _Traits, typename _Alloc>
-  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<typename _CharT, typename _Traits, typename _Alloc>
     void
     basic_string<_CharT, _Traits, _Alloc>::resize(size_type __n, _CharT __c)
index 9a32ad0ddff4cc4afe8fd54de9916c96dfd4079b..2ddcabcb954c03e0aee7c27fc873d386f9440469 100644 (file)
 // 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