fixed a few warnings on Windows; fixed critical bugs in cvMixChannels and AutoBuffer<>.

This commit is contained in:
Vadim Pisarevsky
2011-05-17 15:44:01 +00:00
parent 306a11a7c5
commit 62569f6926
5 changed files with 22 additions and 15 deletions

View File

@@ -2311,13 +2311,13 @@ inline Point LineIterator::pos() const
template<typename _Tp, size_t fixed_size> inline AutoBuffer<_Tp, fixed_size>::AutoBuffer()
{
ptr = alignPtr(buf, 16);
ptr = buf;
size = fixed_size;
}
template<typename _Tp, size_t fixed_size> inline AutoBuffer<_Tp, fixed_size>::AutoBuffer(size_t _size)
{
ptr = alignPtr(buf, 16);
ptr = buf;
size = fixed_size;
allocate(_size);
}
@@ -2339,11 +2339,10 @@ template<typename _Tp, size_t fixed_size> inline void AutoBuffer<_Tp, fixed_size
template<typename _Tp, size_t fixed_size> inline void AutoBuffer<_Tp, fixed_size>::deallocate()
{
_Tp* buf0 = alignPtr(buf, 16);
if( ptr != buf0 )
if( ptr != buf )
{
cv::deallocate<_Tp>(ptr, size);
ptr = buf0;
ptr = buf;
size = fixed_size;
}
}