2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 11:07:44 +00:00

Numerous uninitialized memory fixes

This commit is contained in:
Jack Andersen
2019-04-06 19:14:48 -10:00
parent b72cc490e8
commit 3a0d2930fa
48 changed files with 112 additions and 79 deletions

View File

@@ -477,8 +477,20 @@ public:
const_reverse_iterator crbegin() const noexcept { return rbegin(); }
const_reverse_iterator crend() const noexcept { return rend(); }
T& operator[](size_t idx) { return _value(idx); }
const T& operator[](size_t idx) const { return _value(idx); }
T& operator[](size_t idx) {
#ifndef NDEBUG
if (idx >= x0_size)
Log.report(logvisor::Fatal, "out of bounds access on reserved_vector.");
#endif
return _value(idx);
}
const T& operator[](size_t idx) const {
#ifndef NDEBUG
if (idx >= x0_size)
Log.report(logvisor::Fatal, "out of bounds access on reserved_vector.");
#endif
return _value(idx);
}
};
/**