Changeset 50416 in vbox for trunk/include/VBox/com
- Timestamp:
- Feb 11, 2014 6:00:45 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/com/array.h
r49765 r50416 4 4 5 5 /* 6 * Copyright (C) 2006-201 3Oracle Corporation6 * Copyright (C) 2006-2014 Oracle Corporation 7 7 * 8 8 * This file is part of VirtualBox Open Source Edition (OSE), as … … 642 642 SafeArray(ComSafeArrayIn(T, aArg)) 643 643 { 644 #ifdef VBOX_WITH_XPCOM 645 646 AssertReturnVoid(aArg != NULL); 647 648 m.size = aArgSize;649 m.arr = aArg;650 m.isWeak = true;644 if (aArg) 645 { 646 #ifdef VBOX_WITH_XPCOM 647 648 m.size = aArgSize; 649 m.arr = aArg; 650 m.isWeak = true; 651 651 652 652 #else /* !VBOX_WITH_XPCOM */ 653 653 654 AssertReturnVoid(aArg != NULL); 655 SAFEARRAY *arg = aArg; 656 657 if (arg) 658 { 654 SAFEARRAY *arg = aArg; 655 659 656 AssertReturnVoid(arg->cDims == 1); 660 657 … … 676 673 rc = SafeArrayAccessData(arg, (void HUGEP **)&m.raw); 677 674 AssertComRCReturnVoid(rc); 678 } 679 680 m.arr = arg; 681 m.isWeak = true; 675 676 m.arr = arg; 677 m.isWeak = true; 682 678 683 679 #endif /* !VBOX_WITH_XPCOM */ 680 } 684 681 } 685 682 … … 1017 1014 virtual SafeArray &detachTo(ComSafeArrayOut(T, aArg)) 1018 1015 { 1019 AssertReturn( m.isWeak == false, *this);1016 AssertReturn(!m.isWeak, *this); 1020 1017 1021 1018 #ifdef VBOX_WITH_XPCOM … … 1593 1590 SafeIfaceArray(ComSafeArrayIn(I *, aArg)) 1594 1591 { 1595 #ifdef VBOX_WITH_XPCOM 1596 1597 AssertReturnVoid(aArg != NULL); 1598 1599 Base::m.size = aArgSize;1600 Base::m.arr = aArg;1601 Base::m.isWeak = true;1592 if (aArg) 1593 { 1594 #ifdef VBOX_WITH_XPCOM 1595 1596 Base::m.size = aArgSize; 1597 Base::m.arr = aArg; 1598 Base::m.isWeak = true; 1602 1599 1603 1600 #else /* !VBOX_WITH_XPCOM */ 1604 1601 1605 AssertReturnVoid(aArg != NULL); 1606 SAFEARRAY *arg = aArg; 1607 1608 if (arg) 1609 { 1602 SAFEARRAY *arg = aArg; 1603 1610 1604 AssertReturnVoid(arg->cDims == 1); 1611 1605 … … 1625 1619 rc = SafeArrayAccessData(arg, (void HUGEP **)&m.raw); 1626 1620 AssertComRCReturnVoid(rc); 1627 } 1628 1629 m.arr = arg; 1630 m.isWeak = true; 1621 1622 m.arr = arg; 1623 m.isWeak = true; 1631 1624 1632 1625 #endif /* !VBOX_WITH_XPCOM */ 1626 } 1633 1627 } 1634 1628
Note:
See TracChangeset
for help on using the changeset viewer.