mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-12-16 17:37:02 +00:00
CPlayer header, more CScriptPlatform, renaming
Former-commit-id: 5d9f7afa3b
This commit is contained in:
@@ -20,24 +20,38 @@ public:
|
||||
const_pointer_iterator() : current(nullptr) {}
|
||||
const_pointer_iterator(const T* begin) : current(const_cast< T* >(begin)) {}
|
||||
const_pointer_iterator& operator++() {
|
||||
++current;
|
||||
++this->current;
|
||||
return *this;
|
||||
}
|
||||
const_pointer_iterator& operator--() {
|
||||
--current;
|
||||
--this->current;
|
||||
return *this;
|
||||
}
|
||||
const_pointer_iterator& operator+=(int v) {
|
||||
this->current += v;
|
||||
return *this;
|
||||
}
|
||||
const_pointer_iterator& operator-=(int v) {
|
||||
this->current -= v;
|
||||
return *this;
|
||||
}
|
||||
const_pointer_iterator operator+(int v) const {
|
||||
return const_pointer_iterator(this->current + v);
|
||||
}
|
||||
const_pointer_iterator operator-(int v) const {
|
||||
return const_pointer_iterator(this->current - v);
|
||||
}
|
||||
const T& operator*() const { return *current; }
|
||||
const T* operator->() const { return current; }
|
||||
bool operator==(const const_pointer_iterator& other) { return current == other.current; }
|
||||
bool operator!=(const const_pointer_iterator& other) { return current != other.current; }
|
||||
|
||||
friend const_pointer_iterator operator+(const const_pointer_iterator& x, int v) {
|
||||
return const_pointer_iterator(x.current + v);
|
||||
}
|
||||
friend const_pointer_iterator operator-(const const_pointer_iterator& x, int v) {
|
||||
return const_pointer_iterator(x.current - v);
|
||||
}
|
||||
// friend const_pointer_iterator operator+(const const_pointer_iterator& x, int v) {
|
||||
// return const_pointer_iterator(x.current + v);
|
||||
// }
|
||||
// friend const_pointer_iterator operator-(const const_pointer_iterator& x, int v) {
|
||||
// return const_pointer_iterator(x.current - v);
|
||||
// }
|
||||
|
||||
protected:
|
||||
T* current;
|
||||
@@ -64,12 +78,19 @@ public:
|
||||
--this->current;
|
||||
return *this;
|
||||
}
|
||||
|
||||
friend pointer_iterator operator+(const pointer_iterator& x, int v) {
|
||||
return pointer_iterator(x.current + v);
|
||||
pointer_iterator& operator+=(int v) {
|
||||
this->current += v;
|
||||
return *this;
|
||||
}
|
||||
friend pointer_iterator operator-(const pointer_iterator& x, int v) {
|
||||
return pointer_iterator(x.current - v);
|
||||
pointer_iterator& operator-=(int v) {
|
||||
this->current -= v;
|
||||
return *this;
|
||||
}
|
||||
pointer_iterator operator+(int v) const {
|
||||
return pointer_iterator(this->current + v);
|
||||
}
|
||||
pointer_iterator operator-(int v) const {
|
||||
return pointer_iterator(this->current - v);
|
||||
}
|
||||
};
|
||||
} // namespace rstl
|
||||
|
||||
@@ -46,11 +46,9 @@ public:
|
||||
~reserved_vector() { clear(); }
|
||||
|
||||
void push_back(const T& in) {
|
||||
if (x0_count < N) {
|
||||
iterator out = begin() + x0_count;
|
||||
out = in;
|
||||
++x0_count;
|
||||
}
|
||||
iterator out = begin() + x0_count;
|
||||
out = in;
|
||||
++x0_count;
|
||||
}
|
||||
|
||||
inline T* data() { return reinterpret_cast< T* >(x4_data); }
|
||||
|
||||
@@ -62,6 +62,7 @@ public:
|
||||
}
|
||||
|
||||
void reserve(int size);
|
||||
iterator erase(iterator it);
|
||||
|
||||
void push_back(const T& in) {
|
||||
if (x4_count >= x8_capacity) {
|
||||
|
||||
Reference in New Issue
Block a user