mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-25 14:22:54 -06:00
New Core fixes
git-svn-id: svn://ultimatepp.org/upp/trunk@9787 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
dd50cda34b
commit
a57dc5abb7
4 changed files with 13 additions and 13 deletions
|
|
@ -84,11 +84,11 @@ public:
|
|||
T& Insert(int i) { return *Insert0(i, NULL); }
|
||||
T& Insert(int i, const T& x) { return *Insert0(i, &x); }
|
||||
template <class Range>
|
||||
void Insert(int i, const Range& r) { Insert_(i, r, false); }
|
||||
void InsertRange(int i, const Range& r) { Insert_(i, r, false); }
|
||||
void InsertN(int i, int count) { Insert_(i, ConstRange<T>(count), true); }
|
||||
void Remove(int i, int count = 1);
|
||||
template <class Range>
|
||||
void Append(const Range& r) { Insert(GetCount(), r); }
|
||||
void AppendRange(const Range& r) { Insert(GetCount(), r); }
|
||||
|
||||
const T& operator[](int i) const;
|
||||
T& operator[](int i);
|
||||
|
|
@ -304,11 +304,11 @@ public:
|
|||
|
||||
void InsertN(int i, int count);
|
||||
template <class Range>
|
||||
void Insert(int i, const Range& r);
|
||||
void InsertRange(int i, const Range& r);
|
||||
void Remove(int i, int count = 1);
|
||||
|
||||
template <class Range>
|
||||
void Append(const Range& r) { Insert(GetCount(), r); }
|
||||
void AppendRange(const Range& r) { Insert(GetCount(), r); }
|
||||
|
||||
const T& operator[](int i) const { return Get(i); }
|
||||
T& operator[](int i) { return Get(i); }
|
||||
|
|
|
|||
|
|
@ -784,7 +784,7 @@ void InArray<T>::InsertN(int i, int count)
|
|||
|
||||
template <class T>
|
||||
template <class Range>
|
||||
void InArray<T>::Insert(int i, const Range& r)
|
||||
void InArray<T>::InsertRange(int i, const Range& r)
|
||||
{
|
||||
int count = r.GetCount();
|
||||
iv.InsertN(i, count);
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ public:
|
|||
void Set(int i, const T& x, int count);
|
||||
T& Set(int i, const T& x) { Set(i, x, 1); return Get(i); }
|
||||
template <class Range>
|
||||
void Set(int i, const Range& r);
|
||||
void SetRange(int i, const Range& r);
|
||||
|
||||
void Remove(int i, int count = 1);
|
||||
void Remove(const int *sorted_list, int n);
|
||||
|
|
@ -133,12 +133,12 @@ public:
|
|||
void Insert(int i, const Vector& x, int offset, int count);
|
||||
void Insert(int i, Vector&& x);
|
||||
template <class Range>
|
||||
void Insert(int i, const Range& r);
|
||||
void InsertRange(int i, const Range& r);
|
||||
void Append(const Vector& x) { Insert(GetCount(), x); }
|
||||
void Append(const Vector& x, int o, int c) { Insert(GetCount(), x, o, c); }
|
||||
void Append(Vector&& x) { Insert(GetCount(), pick(x)); }
|
||||
template <class Range>
|
||||
void Append(const Range& r) { Insert(GetCount(), r); }
|
||||
void AppendRange(const Range& r) { Insert(GetCount(), r); }
|
||||
|
||||
void InsertSplit(int i, Vector<T>& v, int from);
|
||||
|
||||
|
|
@ -271,13 +271,13 @@ public:
|
|||
void Insert(int i, const Array& x);
|
||||
void Insert(int i, const Array& x, int offset, int count);
|
||||
template <class Range>
|
||||
void Insert(int i, const Range& r);
|
||||
void InsertRange(int i, const Range& r);
|
||||
void Insert(int i, Array&& x) { vector.InsertPick(i, pick(x.vector)); }
|
||||
void Append(const Array& x) { Insert(GetCount(), x); }
|
||||
void Append(const Array& x, int o, int c) { Insert(GetCount(), x, o, c); }
|
||||
void Append(Array&& x) { InsertPick(GetCount(), pick(x)); }
|
||||
template <class Range>
|
||||
void Append(const Range& r) { Insert(GetCount(), r); }
|
||||
void AppendRange(const Range& r) { Insert(GetCount(), r); }
|
||||
|
||||
void Swap(int i1, int i2) { UPP::Swap(vector[i1], vector[i2]); }
|
||||
void Move(int i1, int i2);
|
||||
|
|
|
|||
|
|
@ -307,7 +307,7 @@ void Vector<T>::Insert(int i, std::initializer_list<T> init)
|
|||
|
||||
template <class T>
|
||||
template <class Range>
|
||||
void Vector<T>::Insert(int i, const Range& r)
|
||||
void Vector<T>::InsertRange(int i, const Range& r)
|
||||
{
|
||||
RawInsert(i, r.GetCount());
|
||||
T *t = vector + i;
|
||||
|
|
@ -361,7 +361,7 @@ void Vector<T>::Set(int i, const T& x, int count) {
|
|||
|
||||
template <class T>
|
||||
template <class Range>
|
||||
void Vector<T>::Set(int i, const Range& r)
|
||||
void Vector<T>::SetRange(int i, const Range& r)
|
||||
{
|
||||
int count = r.GetCount();
|
||||
ASSERT(i >= 0 && count >= 0);
|
||||
|
|
@ -532,7 +532,7 @@ void Array<T>::Insert(int i, const T& x, int count) {
|
|||
|
||||
template <class T>
|
||||
template <class Range>
|
||||
void Array<T>::Insert(int i, const Range& r)
|
||||
void Array<T>::InsertRange(int i, const Range& r)
|
||||
{
|
||||
vector.InsertN(i, r.GetCount());
|
||||
T **t = GetPtr(i);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue