Changeset 37553 in vbox
- Timestamp:
- Jun 20, 2011 12:48:28 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/com/array.h
r36186 r37553 168 168 #include "VBox/com/ptr.h" 169 169 #include "VBox/com/assert.h" 170 #include "iprt/cpp/list.h" 170 171 171 172 #ifdef VBOX_WITH_XPCOM … … 1008 1009 return *this; 1009 1010 } 1011 1012 /** 1013 * Returns a copy of this SafeArray as RTCList<T>. 1014 */ 1015 RTCList<T> toList() 1016 { 1017 RTCList<T> list(size()); 1018 for (size_t i = 0; i < size(); ++i) 1019 #ifdef VBOX_WITH_XPCOM 1020 list.append(m.arr[i]); 1021 #else 1022 list.append(m.raw[i]); 1023 #endif 1024 return list; 1025 } 1010 1026 1011 1027 inline void initFrom(const com::SafeArray<T> & aRef); -
trunk/include/VBox/com/list.h
r37547 r37553 196 196 }; 197 197 198 //template <typename T> RTCList<T> SafeArrayToRTCList(ComSafeArrayIn(T, other), T* = 0)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 207 198 #endif /* !___VBox_com_list_h */ 208 199 -
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r37547 r37553 6083 6083 /* Convert the options. */ 6084 6084 RTCList<CloneOptions_T> optList; 6085 if (options != NULL) 6086 { 6087 com::SafeArray<CloneOptions_T> sfaOpts(ComSafeArrayInArg(options)); 6088 for (size_t i = 0; i < sfaOpts.size(); ++i) 6089 optList.append(sfaOpts[i]); 6090 // optList = SafeArrayToRTCList<CloneOptions_T>(ComSafeArrayInArg(options)); 6091 } 6085 if (options != NULL) 6086 optList = com::SafeArray<CloneOptions_T>(ComSafeArrayInArg(options)).toList(); 6087 6092 6088 AssertReturn(!optList.contains(CloneOptions_Link), E_NOTIMPL); 6093 6089 AssertReturn(!(optList.contains(CloneOptions_KeepAllMACs) && optList.contains(CloneOptions_KeepNATMACs)), E_FAIL);
Note:
See TracChangeset
for help on using the changeset viewer.