Fixing of AutoBuffer::allocate(nsz) method

AutoBuffer::allocate(nsz) didn't work properly when
(sz < nsz < fixed_size). In this case sz remained unchanged.
pull/6752/head
Vitaliy Lyudvichenko 9 years ago committed by Alexander Alekhin
parent 54f190cba3
commit c3dc7266d1
  1. 2
      modules/core/include/opencv2/core/operations.hpp

@ -2558,10 +2558,10 @@ template<typename _Tp, size_t fixed_size> inline void AutoBuffer<_Tp, fixed_size
if(_size <= size)
return;
deallocate();
size = _size;
if(_size > fixed_size)
{
ptr = cv::allocate<_Tp>(_size);
size = _size;
}
}

Loading…
Cancel
Save