Skip to content

Commit

Permalink
[libc++][NFC] Make size of allocation more self-documenting
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@358588 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
ldionne committed Apr 17, 2019
1 parent 6049636 commit fdf271a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ __libcpp_db::__insert_c(void* __c, __libcpp_db::_InsertConstruct *__fn)
if (__csz_ + 1 > static_cast<size_t>(__cend_ - __cbeg_))
{
size_t nc = __next_prime(2*static_cast<size_t>(__cend_ - __cbeg_) + 1);
__c_node** cbeg = static_cast<__c_node**>(calloc(nc, sizeof(void*)));
__c_node** cbeg = static_cast<__c_node**>(calloc(nc, sizeof(__c_node*)));
if (cbeg == nullptr)
__throw_bad_alloc();

Expand Down Expand Up @@ -508,7 +508,7 @@ __libcpp_db::__insert_iterator(void* __i)
if (__isz_ + 1 > static_cast<size_t>(__iend_ - __ibeg_))
{
size_t nc = __next_prime(2*static_cast<size_t>(__iend_ - __ibeg_) + 1);
__i_node** ibeg = static_cast<__i_node**>(calloc(nc, sizeof(void*)));
__i_node** ibeg = static_cast<__i_node**>(calloc(nc, sizeof(__i_node*)));
if (ibeg == nullptr)
__throw_bad_alloc();

Expand Down

0 comments on commit fdf271a

Please sign in to comment.