summaryrefslogtreecommitdiff
path: root/src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp
diff options
context:
space:
mode:
authorvboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f>2009-03-04 09:27:24 +0000
committervboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f>2009-03-04 09:27:24 +0000
commit187b9317b0b2bf3226cf1742783ea4192e5189e8 (patch)
treeda11ae3fd85135331886a8416dd8e7dc8a58f945 /src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp
parent68a27d89028180457ad54bffeeac56fedb7c2f13 (diff)
downloadVirtualBox-svn-187b9317b0b2bf3226cf1742783ea4192e5189e8.tar.gz
#3551: “Main: Replace remaining collections with safe arrays”
Converted USBFilterCollection. Tested with filters in the GUI. git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@17336 cfe28804-0f27-0410-a406-dd0f0b0b656f
Diffstat (limited to 'src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp')
-rw-r--r--src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp
index 5b14b6386a3..bf5064f9ac1 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp
+++ b/src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp
@@ -498,11 +498,10 @@ int handleUSBFilter (HandlerArg *a)
}
else
{
- ComPtr <IUSBDeviceFilterCollection> coll;
- CHECK_ERROR_BREAK (ctl, COMGETTER(DeviceFilters) (coll.asOutParam()));
+ SafeIfaceArray <IUSBDeviceFilter> coll;
+ CHECK_ERROR_BREAK (ctl, COMGETTER(DeviceFilters) (ComSafeArrayAsOutParam(coll)));
- ComPtr <IUSBDeviceFilter> flt;
- CHECK_ERROR_BREAK (coll, GetItemAt (cmd.mIndex, flt.asOutParam()));
+ ComPtr <IUSBDeviceFilter> flt = coll[cmd.mIndex];
if (!f.mName.isNull())
CHECK_ERROR_BREAK (flt, COMSETTER(Name) (f.mName.setNullIfEmpty()));