VirtualBox

Changeset 37530 in vbox for trunk/include/VBox/com


Ignore:
Timestamp:
Jun 17, 2011 12:03:46 PM (14 years ago)
Author:
vboxsync
Message:

com: helper for converting safe arrays to RTCLists

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/com/list.h

    r37068 r37530  
    196196};
    197197
     198template <typename T> RTCList<T> SafeArrayToRTCList(ComSafeArrayIn(T, other))
     199{
     200    com::SafeArray<T> sfaOther(ComSafeArrayInArg(other));
     201    RTCList<T> list(sfaOther.size());
     202    for (size_t i = 0; i < sfaOther.size(); ++i)
     203        list.append(sfaOther[i]);
     204    return list;
     205}
     206
    198207#endif /* !___VBox_com_list_h */
    199208
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette