Changeset 13676 in vbox for trunk/src/VBox/Main/HardDiskFormatImpl.cpp
- Timestamp:
- Oct 30, 2008 1:34:41 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/HardDiskFormatImpl.cpp
r13673 r13676 84 84 while (pa->pszKey != NULL) 85 85 { 86 unconst (mData. configNames).push_back (*pa->pszKey);86 unconst (mData.propertyNames).push_back (*pa->pszKey); 87 87 ++ pa; 88 88 } … … 108 108 return; 109 109 110 unconst (mData. configNames).clear();110 unconst (mData.propertyNames).clear(); 111 111 unconst (mData.fileExtensions).clear(); 112 112 unconst (mData.capabilities) = 0; … … 181 181 182 182 STDMETHODIMP HardDiskFormat:: 183 COMGETTER( ConfigNames)(ComSafeArrayOut (BSTR, aConfigNames))184 { 185 if (ComSafeArrayOutIsNull (a ConfigNames))186 return E_POINTER; 187 188 AutoCaller autoCaller (this); 189 CheckComRCReturnRC (autoCaller.rc()); 190 191 /* this is const, no need to lock */ 192 com::SafeArray <BSTR> configNames (mData.configNames.size());183 COMGETTER(PropertyNames)(ComSafeArrayOut (BSTR, aPropertyNames)) 184 { 185 if (ComSafeArrayOutIsNull (aPropertyNames)) 186 return E_POINTER; 187 188 AutoCaller autoCaller (this); 189 CheckComRCReturnRC (autoCaller.rc()); 190 191 /* this is const, no need to lock */ 192 com::SafeArray <BSTR> propertyNames (mData.propertyNames.size()); 193 193 int i = 0; 194 for (BstrList::const_iterator it = mData. configNames.begin();195 it != mData. configNames.end(); ++ it, ++ i)196 (*it).cloneTo (& configNames [i]);197 configNames.detachTo (ComSafeArrayOutArg (aConfigNames));194 for (BstrList::const_iterator it = mData.propertyNames.begin(); 195 it != mData.propertyNames.end(); ++ it, ++ i) 196 (*it).cloneTo (&propertyNames [i]); 197 propertyNames.detachTo (ComSafeArrayOutArg (aPropertyNames)); 198 198 199 199 return S_OK;
Note:
See TracChangeset
for help on using the changeset viewer.