summaryrefslogtreecommitdiff
path: root/thirdparty/basis_universal/transcoder/basisu.h
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/basis_universal/transcoder/basisu.h')
-rw-r--r--thirdparty/basis_universal/transcoder/basisu.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/thirdparty/basis_universal/transcoder/basisu.h b/thirdparty/basis_universal/transcoder/basisu.h
index f33baf67c8..1230b59ec6 100644
--- a/thirdparty/basis_universal/transcoder/basisu.h
+++ b/thirdparty/basis_universal/transcoder/basisu.h
@@ -21,6 +21,11 @@
#pragma warning (disable : 4127) // warning C4127: conditional expression is constant
#pragma warning (disable : 4530) // C++ exception handler used, but unwind semantics are not enabled.
+ // Slamming this off always for v1.16 because we've gotten rid of most std containers.
+ #ifndef BASISU_NO_ITERATOR_DEBUG_LEVEL
+ #define BASISU_NO_ITERATOR_DEBUG_LEVEL (1)
+ #endif
+
#ifndef BASISU_NO_ITERATOR_DEBUG_LEVEL
//#define _HAS_ITERATOR_DEBUGGING 0
@@ -165,6 +170,10 @@ namespace basisu
{
if (n)
{
+ if (vec.size())
+ {
+ assert((pObjs + n) <= vec.begin() || (pObjs >= vec.end()));
+ }
const size_t cur_s = vec.size();
vec.resize(cur_s + n);
memcpy(&vec[cur_s], pObjs, sizeof(R) * n);
@@ -173,6 +182,7 @@ namespace basisu
template<typename T> inline void append_vector(T &vec, const T &other_vec)
{
+ assert(&vec != &other_vec);
if (other_vec.size())
append_vector(vec, &other_vec[0], other_vec.size());
}