Skip to content

Commit

Permalink
Merge pull request #19 from MacroModel/trcrsired-master
Browse files Browse the repository at this point in the history
upd
  • Loading branch information
MacroModel authored Nov 9, 2024
2 parents d18706a + c7eb537 commit 462ab25
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 22 deletions.
14 changes: 7 additions & 7 deletions include/fast_io_core_impl/allocation/wincrt_malloc_dbg.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class wincrt_malloc_dbg_allocator
{
n = 1;
}
void *p = ::fast_io::noexcept_call(_malloc_dbg, n, _NORMAL_BLOCK, __FILE__, __LINE__);
void *p = ::fast_io::noexcept_call(_malloc_dbg, n, 1, __FILE__, __LINE__);
if (p == nullptr)
{
::fast_io::fast_terminate();
Expand All @@ -33,7 +33,7 @@ class wincrt_malloc_dbg_allocator
{
n = 1;
}
p = ::fast_io::noexcept_call(_realloc_dbg, p, n, _NORMAL_BLOCK, __FILE__, __LINE__);
p = ::fast_io::noexcept_call(_realloc_dbg, p, n, 1, __FILE__, __LINE__);
if (p == nullptr)
{
::fast_io::fast_terminate();
Expand All @@ -49,7 +49,7 @@ class wincrt_malloc_dbg_allocator
{
n = 1;
}
void *p = ::fast_io::noexcept_call(_calloc_dbg, 1, n, _NORMAL_BLOCK, __FILE__, __LINE__);
void *p = ::fast_io::noexcept_call(_calloc_dbg, 1, n, 1, __FILE__, __LINE__);
if (p == nullptr)
{
::fast_io::fast_terminate();
Expand All @@ -62,24 +62,24 @@ class wincrt_malloc_dbg_allocator
{
return;
}
::fast_io::noexcept_call(_free_dbg, p, _NORMAL_BLOCK);
::fast_io::noexcept_call(_free_dbg, p, 1);
}

#if 0
static inline allocation_least_result allocate_at_least(::std::size_t n) noexcept
{
auto p{::fast_io::wincrt_malloc_dbg_allocator::allocate(n)};
return {p, ::fast_io::noexcept_call(_msize_dbg, p, _NORMAL_BLOCK)};
return {p, ::fast_io::noexcept_call(_msize_dbg, p, 1)};
}
static inline allocation_least_result allocate_zero_at_least(::std::size_t n) noexcept
{
auto p{::fast_io::wincrt_malloc_dbg_allocator::allocate_zero(n)};
return {p, ::fast_io::noexcept_call(_msize_dbg, p, _NORMAL_BLOCK)};
return {p, ::fast_io::noexcept_call(_msize_dbg, p, 1)};
}
static inline allocation_least_result reallocate_at_least(void *oldp, ::std::size_t n) noexcept
{
auto p{::fast_io::wincrt_malloc_dbg_allocator::reallocate(oldp, n)};
return {p, ::fast_io::noexcept_call(_msize_dbg, p, _NORMAL_BLOCK)};
return {p, ::fast_io::noexcept_call(_msize_dbg, p, 1)};
}
#endif
};
Expand Down
15 changes: 0 additions & 15 deletions include/fast_io_dsal/impl/vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -1027,14 +1027,6 @@ class vector
this->erase_common(beginptr + idx);
}

constexpr void erase_index_unchecked(size_type idx) noexcept
{
auto beginptr{imp.begin_ptr};
auto currptr{imp.curr_ptr};
size_type sz{static_cast<size_type>(currptr - beginptr)};
this->erase_common(beginptr + idx);
}

constexpr iterator erase(const_iterator first, const_iterator last) noexcept
{
#ifdef __cpp_if_consteval
Expand Down Expand Up @@ -1063,13 +1055,6 @@ class vector
this->erase_iters_common(beginptr + firstidx, beginptr + lastidx);
}

constexpr void erase_index_unchecked(size_type firstidx, size_type lastidx) noexcept
{
auto beginptr{imp.begin_ptr};
auto currptr{imp.curr_ptr};
size_type sz{static_cast<size_type>(currptr - beginptr)};
this->erase_iters_common(beginptr + firstidx, beginptr + lastidx);
}
};

template <typename T, typename allocator1, typename allocator2>
Expand Down

0 comments on commit 462ab25

Please sign in to comment.