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.

Co-Authored-By: Loren J. Rittle <ljrittle@acm.org>

From-SVN: r47425
This commit is contained in:
Paolo Carlini 2001-11-28 19:58:19 +01:00 committed by Benjamin Kosnik
parent 391f61d928
commit 6dafbab7e5
4 changed files with 9 additions and 40 deletions

View 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>

View 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

View 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)

View File

@ -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