changed kernel.set to support unsuccssful set

This commit is contained in:
mlyashko
2014-03-07 11:15:54 +04:00
parent 66ed6a8a50
commit eb2e8a11fa
4 changed files with 6 additions and 130 deletions

View File

@@ -2796,7 +2796,8 @@ int Kernel::set(int i, const void* value, size_t sz)
{
if (!p || !p->handle)
return -1;
CV_Assert(i >= 0);
if (i < 0)
return i;
if( i == 0 )
p->cleanupUMats();
@@ -2822,7 +2823,8 @@ int Kernel::set(int i, const KernelArg& arg)
{
if( !p || !p->handle )
return -1;
CV_Assert( i >= 0 );
if (i < 0)
return i;
if( i == 0 )
p->cleanupUMats();
if( arg.m )