Function resize

Summary

#include <include/EASTL/deque.h>

(1) void resize(size_type n, const value_type &value)

(2) void resize(size_type n)

Function overload

Synopsis

#include <include/EASTL/deque.h>

void resize(size_type n, const value_type &value)

Description

No description yet.

Source

Lines 1464-1473 in include/EASTL/deque.h. Line 418 in include/EASTL/deque.h.

template <typename T, typename Allocator, unsigned kDequeSubarraySize>
inline void deque<T, Allocator, kDequeSubarraySize>::resize(size_type n, const value_type& value)
{
    const size_type nSizeCurrent = size();
    if(n > nSizeCurrent) // We expect that more often than not, resizes will be upsizes.
        insert(mItEnd, n - nSizeCurrent, value);
    else
        erase(mItBegin + (difference_type)n, mItEnd);
}

Synopsis

#include <include/EASTL/deque.h>

void resize(size_type n)

Description

No description yet.

Source

Lines 1476-1480 in include/EASTL/deque.h. Line 419 in include/EASTL/deque.h.

template <typename T, typename Allocator, unsigned kDequeSubarraySize>
inline void deque<T, Allocator, kDequeSubarraySize>::resize(size_type n)
{
    resize(n, value_type());
}





Add Discussion as Guest

Log in