summaryrefslogtreecommitdiff
path: root/cppu/source/uno
diff options
context:
space:
mode:
Diffstat (limited to 'cppu/source/uno')
-rw-r--r--cppu/source/uno/copy.hxx33
1 files changed, 11 insertions, 22 deletions
diff --git a/cppu/source/uno/copy.hxx b/cppu/source/uno/copy.hxx
index ce46492bfce4..fb9adb3c2452 100644
--- a/cppu/source/uno/copy.hxx
+++ b/cppu/source/uno/copy.hxx
@@ -660,32 +660,21 @@ inline uno_Sequence * icopyConstructSequence(
{
char * pElements = pDest->elements;
void ** pSourceElements = (void **)pSource->elements;
- if (mapping)
- {
- typelib_TypeDescription * pElementTypeDescr = 0;
- TYPELIB_DANGER_GET( &pElementTypeDescr, pElementType );
- for ( sal_Int32 nPos = nElements; nPos--; )
- {
- ((void **)pElements)[nPos] = 0;
- if (((void **)pSourceElements)[nPos])
- {
- (*mapping->mapInterface)(
- mapping, (void **)pElements + nPos,
- pSourceElements[nPos],
- (typelib_InterfaceTypeDescription *)
- pElementTypeDescr );
- }
- }
- TYPELIB_DANGER_RELEASE( pElementTypeDescr );
- }
- else
+ typelib_TypeDescription * pElementTypeDescr = 0;
+ TYPELIB_DANGER_GET( &pElementTypeDescr, pElementType );
+ for ( sal_Int32 nPos = nElements; nPos--; )
{
- for ( sal_Int32 nPos = nElements; nPos--; )
+ ((void **)pElements)[nPos] = 0;
+ if (((void **)pSourceElements)[nPos])
{
- ((void **)pElements)[nPos] = pSourceElements[nPos];
- _acquire( ((void **)pElements)[nPos], acquire );
+ (*mapping->mapInterface)(
+ mapping, (void **)pElements + nPos,
+ pSourceElements[nPos],
+ (typelib_InterfaceTypeDescription *)
+ pElementTypeDescr );
}
}
+ TYPELIB_DANGER_RELEASE( pElementTypeDescr );
}
break;
}