Almost match CScriptMailbox

Former-commit-id: 99f27bda6e
This commit is contained in:
Henrique Gemignani Passos Lima
2022-11-03 16:21:47 +02:00
parent 43e6f98e65
commit 3d299fc132
6 changed files with 131 additions and 14 deletions

View File

@@ -70,7 +70,17 @@ public:
inline const T& back() const { return data()[x0_count - 1]; }
inline T& operator[](int idx) { return data()[idx]; }
inline const T& operator[](int idx) const { return data()[idx]; }
iterator erase(iterator it) {}
void erase(iterator it) {
if (it < begin()) {
return;
}
if (it < end()) {
for (iterator j = it; j < end() - 1; ++j) {
*j = *(j + 1);
}
--x0_count;
}
}
};
} // namespace rstl