mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
protect calls to min and max with parentheses to make Eigen compatible with default windows.h
(transplanted from 49b6e9143e
)
This commit is contained in:
@@ -97,7 +97,7 @@ class AmbiVector
|
||||
void reallocateSparse()
|
||||
{
|
||||
Index copyElements = m_allocatedElements;
|
||||
m_allocatedElements = std::min(Index(m_allocatedElements*1.5),m_size);
|
||||
m_allocatedElements = (std::min)(Index(m_allocatedElements*1.5),m_size);
|
||||
Index allocSize = m_allocatedElements * sizeof(ListEl);
|
||||
allocSize = allocSize/sizeof(Scalar) + (allocSize%sizeof(Scalar)>0?1:0);
|
||||
Scalar* newBuffer = new Scalar[allocSize];
|
||||
|
||||
Reference in New Issue
Block a user