diff options
author | Shauren <shauren.trinity@gmail.com> | 2021-12-22 12:28:49 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-12-22 12:28:49 +0100 |
commit | 38bca4eeb69ff59b76863cedce08914e555d0649 (patch) | |
tree | 2ea22f5a5dd174803fd7ab8bf5fca6f2092cf614 /dep | |
parent | a5b4d0c53976119d561924143a465c9ab38ca8a8 (diff) |
Dep/G3D: Add more of our modifications as separate patches
Diffstat (limited to 'dep')
-rw-r--r-- | dep/g3dlite/G3D-v9.0 hotfix10.diff | 20 | ||||
-rw-r--r-- | dep/g3dlite/G3D-v9.0 hotfix11.diff | 13 |
2 files changed, 33 insertions, 0 deletions
diff --git a/dep/g3dlite/G3D-v9.0 hotfix10.diff b/dep/g3dlite/G3D-v9.0 hotfix10.diff new file mode 100644 index 00000000000..e2bd6c91a35 --- /dev/null +++ b/dep/g3dlite/G3D-v9.0 hotfix10.diff @@ -0,0 +1,20 @@ +diff --git a/dep/g3dlite/include/G3D/Array.h b/dep/g3dlite/include/G3D/Array.h +index c562f5c920f7..c86b20fd7e97 100644 +--- a/dep/g3dlite/include/G3D/Array.h ++++ b/dep/g3dlite/include/G3D/Array.h +@@ -346,6 +346,7 @@ class Array { + + /** Resizes this to match the size of \a other and then copies the data from other using memcpy. This is only safe for POD types */ + void copyPOD(const Array<T>& other) { ++ static_assert(std::is_pod<T>::value, "copyPOD called on non-POD type"); + if (numAllocated < other.num) { + m_memoryManager->free(data); + data = NULL; +@@ -364,6 +365,7 @@ class Array { + /** Resizes this to just barely match the size of \a other + itself and then copies the data to the end of the array from other using memcpy. + This is only safe for POD types */ + void appendPOD(const Array<T>& other) { ++ static_assert(std::is_pod<T>::value, "appendPOD called on non-POD type"); + const size_t oldSize = num; + num += other.num; + if (numAllocated < num) { diff --git a/dep/g3dlite/G3D-v9.0 hotfix11.diff b/dep/g3dlite/G3D-v9.0 hotfix11.diff new file mode 100644 index 00000000000..5c94416d649 --- /dev/null +++ b/dep/g3dlite/G3D-v9.0 hotfix11.diff @@ -0,0 +1,13 @@ +diff --git a/dep/g3dlite/source/fileutils.cpp b/dep/g3dlite/source/fileutils.cpp +index 2788adad3bcd..f5310084cec7 100644 +--- a/dep/g3dlite/source/fileutils.cpp ++++ b/dep/g3dlite/source/fileutils.cpp +@@ -490,7 +490,7 @@ void parseFilename( + + } + +- } else if ((f.size() >= 2) & isSlash(f[0]) && isSlash(f[1])) { ++ } else if ((f.size() >= 2) && isSlash(f[0]) && isSlash(f[1])) { + + // e.g. //foo + root = f.substr(0, 2); |