forked from boostorg/unordered
Merge some documentation changes and inspect fixes.
Merged revisions 55370,55729,56440,56570-56571,56603,56697-56699 via svnmerge from https://svn.boost.org/svn/boost/trunk ........ r55370 | danieljames | 2009-08-02 19:18:14 +0100 (Sun, 02 Aug 2009) | 1 line Pass through more elements in doxygen2boostbook. Refs #3309. ........ r55729 | danieljames | 2009-08-23 11:07:25 +0100 (Sun, 23 Aug 2009) | 3 lines Add depencies on doxygen documentation to standalone documentation targets. This seems to be needed for building pdfs. ........ r56440 | danieljames | 2009-09-27 20:11:39 +0100 (Sun, 27 Sep 2009) | 1 line Fix silly error in doxygen test file. ........ r56570 | danieljames | 2009-10-04 11:37:36 +0100 (Sun, 04 Oct 2009) | 1 line Clean up some unordered TODOs. ........ r56571 | danieljames | 2009-10-04 11:37:56 +0100 (Sun, 04 Oct 2009) | 1 line Detab. ........ r56603 | danieljames | 2009-10-05 22:29:39 +0100 (Mon, 05 Oct 2009) | 1 line Various inspect fixes. ........ r56697 | danieljames | 2009-10-10 14:00:28 +0100 (Sat, 10 Oct 2009) | 1 line Add forwarding html file for accumulators. ........ r56698 | danieljames | 2009-10-10 14:01:14 +0100 (Sat, 10 Oct 2009) | 1 line Missing newline. ........ r56699 | danieljames | 2009-10-10 14:01:30 +0100 (Sat, 10 Oct 2009) | 1 line Add copyright to boostbook reference xml. ........ [SVN r56702]
This commit is contained in:
1 parent
3529bc00dc
commit
06b0b1d31c
5 files changed
+55
-19
No files matched your search
@@ -193,7 +193,7 @@ namespace boost { namespace unordered_detail {
|
||||
BOOST_ASSERT(this->bucket_count_ != 0);
|
||||
return static_cast<float>(this->size_)
|
||||
/ static_cast<float>(this->bucket_count_);
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Constructors
|
||||
@@ -431,23 +431,20 @@ namespace boost { namespace unordered_detail {
|
||||
|
||||
// if hash function throws, basic exception safety
|
||||
// strong otherwise.
|
||||
// TODO: Should this always create buckets?
|
||||
|
||||
template <class H, class P, class A, class G, class K>
|
||||
inline void hash_table<H, P, A, G, K>::rehash(std::size_t min_buckets)
|
||||
{
|
||||
using namespace std;
|
||||
|
||||
if(!this->buckets_) {
|
||||
if(!this->size_) {
|
||||
if(this->buckets_) this->delete_buckets();
|
||||
this->bucket_count_ = next_prime(min_buckets);
|
||||
this->create_buckets();
|
||||
this->init_buckets();
|
||||
}
|
||||
else {
|
||||
// no throw:
|
||||
// TODO: Needlessly calling next_prime twice.
|
||||
min_buckets = (std::max)(
|
||||
next_prime(min_buckets),
|
||||
this->min_buckets_for_size(this->size_));
|
||||
min_buckets = next_prime((std::max)(min_buckets,
|
||||
double_to_size_t(floor(this->size_ / (double) mlf_)) + 1));
|
||||
if(min_buckets != this->bucket_count_) rehash_impl(min_buckets);
|
||||
}
|
||||
}
|
||||
@@ -619,7 +616,6 @@ namespace boost { namespace unordered_detail {
|
||||
template <class H, class P, class A, class G, class K>
|
||||
void hash_table<H, P, A, G, K>::clear()
|
||||
{
|
||||
// TODO: Is this check needed when called internally?
|
||||
if(!this->size_) return;
|
||||
|
||||
bucket_ptr end = this->get_bucket(this->bucket_count_);
|
||||
@@ -645,8 +641,7 @@ namespace boost { namespace unordered_detail {
|
||||
}
|
||||
|
||||
template <class H, class P, class A, class G, class K>
|
||||
std::size_t hash_table<H, P, A, G, K>
|
||||
::erase_key(key_type const& k)
|
||||
std::size_t hash_table<H, P, A, G, K>::erase_key(key_type const& k)
|
||||
{
|
||||
if(!this->size_) return 0;
|
||||
|
||||
|
||||
Reference in new issue
Block a user