From 98b30a4fc683d91458ccaefeaafbc8f4b783d17e Mon Sep 17 00:00:00 2001 From: ttsou Date: Thu, 10 Sep 2009 15:08:16 -0400 Subject: [PATCH] Use default arguments instead of overloaded virtual constructors for cleaner interface --- usrp/host/lib/fusb.h | 4 +--- usrp/host/lib/fusb_sysconfig_libusb1.cc | 6 ------ usrp/host/lib/fusb_sysconfig_linux.cc | 6 ------ 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/usrp/host/lib/fusb.h b/usrp/host/lib/fusb.h index dbfda5a6..00bdffcc 100644 --- a/usrp/host/lib/fusb.h +++ b/usrp/host/lib/fusb.h @@ -127,9 +127,7 @@ public: * \brief returns fusb_devhandle or throws if trouble */ static fusb_devhandle *make_devhandle (libusb_device_handle *udh, - libusb_context *ctx); - - static fusb_devhandle *make_devhandle (libusb_device_handle *udh); + libusb_context *ctx = 0); /*! * \brief Returns max block size in bytes (hard limit). diff --git a/usrp/host/lib/fusb_sysconfig_libusb1.cc b/usrp/host/lib/fusb_sysconfig_libusb1.cc index 4cbb7413..f71e34fa 100644 --- a/usrp/host/lib/fusb_sysconfig_libusb1.cc +++ b/usrp/host/lib/fusb_sysconfig_libusb1.cc @@ -29,12 +29,6 @@ static const int FUSB_BUFFER_SIZE = 1 * (1L << 20); // 1 MB struct libusb_context; -fusb_devhandle * -fusb_sysconfig::make_devhandle (libusb_device_handle *udh) -{ - make_devhandle (udh, NULL); -} - fusb_devhandle * fusb_sysconfig::make_devhandle (libusb_device_handle *udh, libusb_context *ctx) diff --git a/usrp/host/lib/fusb_sysconfig_linux.cc b/usrp/host/lib/fusb_sysconfig_linux.cc index d4bbfea7..5b9bfb24 100644 --- a/usrp/host/lib/fusb_sysconfig_linux.cc +++ b/usrp/host/lib/fusb_sysconfig_linux.cc @@ -27,12 +27,6 @@ static const int MAX_BLOCK_SIZE = 16 * 1024; // hard limit static const int DEFAULT_BLOCK_SIZE = 4 * 1024; // fewer kernel memory problems static const int FUSB_BUFFER_SIZE = 1 * (1L << 20); // 1MB -fusb_devhandle * -fusb_sysconfig::make_devhandle (usb_dev_handle *udh) -{ - return new fusb_devhandle_linux (udh); -} - fusb_devhandle * fusb_sysconfig::make_devhandle (usb_dev_handle *udh, libusb_context *ctx) { -- 2.47.2