Merge pull request #1626 from janetournois/STL_Extension-fix_min_max-GF

STL_Extension : fix conflict with min and max macros of windows
This commit is contained in:
Laurent Rineau 2016-11-03 11:03:37 +01:00
commit 964a0ec6ca
1 changed files with 7 additions and 7 deletions

View File

@ -143,16 +143,16 @@ public:
std::vector<int> locked_cells_tmp;
// For each cell inside the square
for (int i = std::max(0, index_x-lock_radius) ;
i <= std::min(m_num_grid_cells_per_axis - 1, index_x+lock_radius) ;
for (int i = (std::max)(0, index_x-lock_radius) ;
i <= (std::min)(m_num_grid_cells_per_axis - 1, index_x+lock_radius) ;
++i)
{
for (int j = std::max(0, index_y-lock_radius) ;
j <= std::min(m_num_grid_cells_per_axis - 1, index_y+lock_radius) ;
for (int j = (std::max)(0, index_y-lock_radius) ;
j <= (std::min)(m_num_grid_cells_per_axis - 1, index_y+lock_radius) ;
++j)
{
for (int k = std::max(0, index_z-lock_radius) ;
k <= std::min(m_num_grid_cells_per_axis - 1, index_z+lock_radius) ;
for (int k = (std::max)(0, index_z-lock_radius) ;
k <= (std::min)(m_num_grid_cells_per_axis - 1, index_z+lock_radius) ;
++k)
{
int index_to_lock =
@ -598,7 +598,7 @@ private:
static tbb::atomic<unsigned int> last_id;
unsigned int id = ++last_id;
// Ensure it is > 0
return (1 + id%(std::numeric_limits<unsigned int>::max()));
return (1 + id%((std::numeric_limits<unsigned int>::max)()));
}
protected: