bladeRF: minor fixups to keep clang happy

master
Robert Ghilduta 4 years ago committed by Eric Wild
parent 95b1025b01
commit 038a26501c
  1. 8
      lib/bladerf/bladerf_common.cc
  2. 2
      lib/bladerf/bladerf_common.h

@ -49,7 +49,7 @@ static size_t const STREAM_TIMEOUT_MS = 3000;
using namespace boost::assign;
std::mutex bladerf_common::_devs_mutex;
std::list<std::weak_ptr<struct bladerf>> bladerf_common::_devs;
std::list<std::weak_ptr<struct bladerf> > bladerf_common::_devs;
/* name for system-wide gain (which is not its own libbladeRF gain stage) */
static const char *SYSTEM_GAIN_NAME = "system";
@ -133,7 +133,7 @@ size_t num_streams(bladerf_channel_layout layout)
* Public methods
******************************************************************************/
bladerf_common::bladerf_common() :
_dev(NULL),
_dev(boost::shared_ptr<struct bladerf>()),
_pfx("[bladeRF common] "),
_failures(0),
_num_buffers(NUM_BUFFERS),
@ -1107,7 +1107,7 @@ bladerf_sptr bladerf_common::open(std::string const &device_name)
/* Add the device handle to our cache */
bladerf_sptr dev = bladerf_sptr(raw_dev, bladerf_common::close);
_devs.push_back(static_cast<std::weak_ptr<struct bladerf>>(dev));
_devs.push_back(static_cast<std::weak_ptr<struct bladerf> >(dev));
return dev;
}
@ -1115,7 +1115,7 @@ bladerf_sptr bladerf_common::open(std::string const &device_name)
void bladerf_common::close(void *dev)
{
std::lock_guard<std::mutex> lock(_devs_mutex);
std::list<std::weak_ptr<struct bladerf>>::iterator it(_devs.begin());
std::list<std::weak_ptr<struct bladerf> >::iterator it(_devs.begin());
/* Prune expired entries from device cache */
while (it != _devs.end()) {

@ -287,7 +287,7 @@ private:
* Private members
****************************************************************************/
static std::mutex _devs_mutex; /**< mutex for access to _devs */
static std::list<std::weak_ptr<struct bladerf>> _devs; /**< dev cache */
static std::list<std::weak_ptr<struct bladerf> > _devs; /**< dev cache */
};
#endif

Loading…
Cancel
Save