Merge branch 'master' into stephengold/issue/5641

pull/5467/head
Stephen Gold 2024-03-12 17:41:36 -07:00 committed by GitHub
commit 79e7f3f2bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View File

@ -52,7 +52,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <cstdlib>
#include <memory>
#include <utility>
#include <string_view>
namespace Assimp {

View File

@ -41,6 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "StackAllocator.h"
#include <assimp/ai_assert.h>
#include <algorithm>
using namespace Assimp;
@ -56,7 +57,7 @@ inline void *StackAllocator::Allocate(size_t byteSize) {
{
// double block size every time, up to maximum of g_maxBytesPerBlock.
// Block size must be at least as large as byteSize, but we want to use this for small allocations anyway.
m_blockAllocationSize = std::max(std::min(m_blockAllocationSize * 2, g_maxBytesPerBlock), byteSize);
m_blockAllocationSize = std::max<std::size_t>(std::min<std::size_t>(m_blockAllocationSize * 2, g_maxBytesPerBlock), byteSize);
uint8_t *data = new uint8_t[m_blockAllocationSize];
m_storageBlocks.emplace_back(data);
m_subIndex = byteSize;

View File

@ -177,8 +177,8 @@ unsigned int GetMeshVFormatUnique(const aiMesh *pcMesh) {
if (pcMesh->HasTangentsAndBitangents()) iRet |= 0x4;
static_assert(8 >= AI_MAX_NUMBER_OF_COLOR_SETS);
static_assert(8 >= AI_MAX_NUMBER_OF_TEXTURECOORDS);
static_assert(8 >= AI_MAX_NUMBER_OF_COLOR_SETS, "static_assert(8 >= AI_MAX_NUMBER_OF_COLOR_SETS)");
static_assert(8 >= AI_MAX_NUMBER_OF_TEXTURECOORDS, "static_assert(8 >= AI_MAX_NUMBER_OF_TEXTURECOORDS)");
// texture coordinates
unsigned int p = 0;