diff options
author | ttsou | 2009-09-10 15:08:16 -0400 |
---|---|---|
committer | ttsou | 2009-09-16 17:08:51 -0400 |
commit | 98b30a4fc683d91458ccaefeaafbc8f4b783d17e (patch) | |
tree | 0c991d39608c2f052cc2b4acfb74fe5bec5e2fe0 | |
parent | e67bd8ae9773731c00d2636833a9120ed3cc2ec1 (diff) | |
download | gnuradio-98b30a4fc683d91458ccaefeaafbc8f4b783d17e.tar.gz gnuradio-98b30a4fc683d91458ccaefeaafbc8f4b783d17e.tar.bz2 gnuradio-98b30a4fc683d91458ccaefeaafbc8f4b783d17e.zip |
Use default arguments instead of overloaded virtual constructors for cleaner interface
-rw-r--r-- | usrp/host/lib/fusb.h | 4 | ||||
-rw-r--r-- | usrp/host/lib/fusb_sysconfig_libusb1.cc | 6 | ||||
-rw-r--r-- | usrp/host/lib/fusb_sysconfig_linux.cc | 6 |
3 files changed, 1 insertions, 15 deletions
diff --git a/usrp/host/lib/fusb.h b/usrp/host/lib/fusb.h index dbfda5a61..00bdffcc0 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 4cbb74132..f71e34fa9 100644 --- a/usrp/host/lib/fusb_sysconfig_libusb1.cc +++ b/usrp/host/lib/fusb_sysconfig_libusb1.cc @@ -30,12 +30,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 d4bbfea76..5b9bfb24a 100644 --- a/usrp/host/lib/fusb_sysconfig_linux.cc +++ b/usrp/host/lib/fusb_sysconfig_linux.cc @@ -28,12 +28,6 @@ static const int DEFAULT_BLOCK_SIZE = 4 * 1024; // fewer kernel memory problem 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) { make_devhandle (udh); |