From f4f5918c25894bf9f6dbdb3e7bdf5c92133f67df Mon Sep 17 00:00:00 2001 From: Dimitri Stolnikov Date: Mon, 21 May 2012 00:46:46 +0200 Subject: [PATCH] osmosdr_device: change cast to make it compile with clang --- include/osmosdr/osmosdr_device.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/osmosdr/osmosdr_device.h b/include/osmosdr/osmosdr_device.h index 330d0df..ed9d01f 100644 --- a/include/osmosdr/osmosdr_device.h +++ b/include/osmosdr/osmosdr_device.h @@ -78,9 +78,9 @@ namespace osmosdr { template T cast(const std::string &key, const T &def) const { if (!this->count(key)) return def; - try { return boost::lexical_cast((*this)[key]); } + try { return boost::lexical_cast(this->at(key)); } catch(const boost::bad_lexical_cast &) { - throw std::runtime_error("cannot cast " + key + " = " + (*this)[key]); + throw std::runtime_error("cannot cast " + key + " = " + this->at(key)); } } };