Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
DoubangoTelecom committed Nov 30, 2023
1 parent b1d871a commit aef2299
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/compv_buffer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ CompVBuffer::CompVBuffer(const void* pcPtr COMPV_DEFAULT(nullptr), size_t size C
, m_bOweMem(true)
{
if (size > 0) { // NULL pcPtr means create a buffer with random data
COMPV_ASSERT(COMPV_ERROR_CODE_IS_OK(copyData(pcPtr, size)));
COMPV_CHECK_CODE_NOP(copyData(pcPtr, size));
}
}

Expand All @@ -41,10 +41,10 @@ COMPV_ERROR_CODE CompVBuffer::copyData(const void* pcPtr, size_t size)
COMPV_CHECK_EXP_RETURN(!(m_pPtr = CompVMem::malloc(size + sizeof(double))), COMPV_ERROR_CODE_E_OUT_OF_MEMORY);
m_bOweMem = true;
}
m_nSize = size;
if (pcPtr) {
COMPV_CHECK_CODE_RETURN(CompVMem::copy(m_pPtr, pcPtr, size));
}
m_nSize = size;
return COMPV_ERROR_CODE_S_OK;
}

Expand Down

0 comments on commit aef2299

Please sign in to comment.