[opencv] 17/71: Fixing of AutoBuffer::allocate(nsz) method
Nobuhiro Iwamatsu
iwamatsu at moszumanska.debian.org
Mon Oct 17 20:16:23 UTC 2016
This is an automated email from the git hooks/post-receive script.
iwamatsu pushed a commit to annotated tag 2.4.13.1
in repository opencv.
commit c3dc7266d1937d09c89d5b11fcf0934fa02e1df0
Author: Vitaliy Lyudvichenko <ludv1x at yandex.ru>
Date: Wed Jun 29 19:50:51 2016 +0300
Fixing of AutoBuffer::allocate(nsz) method
AutoBuffer::allocate(nsz) didn't work properly when
(sz < nsz < fixed_size). In this case sz remained unchanged.
---
modules/core/include/opencv2/core/operations.hpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/core/include/opencv2/core/operations.hpp b/modules/core/include/opencv2/core/operations.hpp
index 0ae51c6..076a5e4 100644
--- a/modules/core/include/opencv2/core/operations.hpp
+++ b/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;
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opencv.git
More information about the debian-science-commits
mailing list