array/parray: use size/data constructor ordering
This corresponds with the typical ordering in the STL.
This commit is contained in:
parent
a33938e735
commit
82b0bb2245
@ -18,9 +18,9 @@ using cruft::parray;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
template <typename DataT, typename SizeT>
|
||||
parray<DataT,SizeT>::parray (DataT *_data, SizeT _size)
|
||||
: m_data (_data)
|
||||
, m_size (_size)
|
||||
parray<DataT,SizeT>::parray (SizeT _size, DataT *_data)
|
||||
: m_size (_size)
|
||||
, m_data (_data)
|
||||
{ ; }
|
||||
|
||||
|
||||
|
@ -31,12 +31,12 @@ namespace cruft {
|
||||
using const_iterator = DataT const*;
|
||||
using difference_type = std::ptrdiff_t;
|
||||
|
||||
parray (DataT *data, SizeT size);
|
||||
parray (SizeT size, DataT *data);
|
||||
|
||||
template <SizeT SizeV>
|
||||
explicit
|
||||
parray (DataT (&data)[SizeV]):
|
||||
parray (data+0, SizeV)
|
||||
parray (SizeV, data+0)
|
||||
{ ; }
|
||||
|
||||
parray (parray const&) noexcept = default;
|
||||
@ -63,8 +63,8 @@ namespace cruft {
|
||||
SizeT size (void) const;
|
||||
|
||||
private:
|
||||
DataT *m_data;
|
||||
SizeT m_size;
|
||||
DataT *m_data;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user