diff --git a/modules/core/include/opencv2/core/private.hpp b/modules/core/include/opencv2/core/private.hpp index 503c7f3829..5f4ffceeef 100644 --- a/modules/core/include/opencv2/core/private.hpp +++ b/modules/core/include/opencv2/core/private.hpp @@ -472,7 +472,7 @@ class IppAutoBuffer { public: IppAutoBuffer() { m_size = 0; m_pBuffer = NULL; } - IppAutoBuffer(size_t size) { m_size = 0; m_pBuffer = NULL; allocate(size); } + explicit IppAutoBuffer(size_t size) { m_size = 0; m_pBuffer = NULL; allocate(size); } ~IppAutoBuffer() { deallocate(); } T* allocate(size_t size) { if(m_size < size) { deallocate(); m_pBuffer = (T*)CV_IPP_MALLOC(size); m_size = size; } return m_pBuffer; } void deallocate() { if(m_pBuffer) { ippFree(m_pBuffer); m_pBuffer = NULL; } m_size = 0; } diff --git a/modules/core/include/opencv2/core/utility.hpp b/modules/core/include/opencv2/core/utility.hpp index 0f60d1ac7f..00bb68cce3 100644 --- a/modules/core/include/opencv2/core/utility.hpp +++ b/modules/core/include/opencv2/core/utility.hpp @@ -124,7 +124,7 @@ public: //! the default constructor AutoBuffer(); //! constructor taking the real buffer size - AutoBuffer(size_t _size); + explicit AutoBuffer(size_t _size); //! the copy constructor AutoBuffer(const AutoBuffer<_Tp, fixed_size>& buf);