array/parray: use size/data constructor ordering

This corresponds with the typical ordering in the STL.
This commit is contained in:
Danny Robson 2019-01-02 13:45:47 +11:00
parent a33938e735
commit 82b0bb2245
2 changed files with 6 additions and 6 deletions

View File

@ -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)
{ ; }

View File

@ -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;
};