Fixing of AutoBuffer::allocate(nsz) method
AutoBuffer::allocate(nsz) didn't work properly when (sz < nsz < fixed_size). In this case sz remained unchanged.
This commit is contained in:
parent
54f190cba3
commit
c3dc7266d1
@ -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…
x
Reference in New Issue
Block a user