From: Rene Hopf Date: Wed, 23 Oct 2013 06:59:44 +0000 (+0100) Subject: Fixes for clang build on OS X X-Git-Tag: pulseview-0.2.0~236 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=4d3c4e342104dcba47c252e734dee441faaf2a9e;p=pulseview.git Fixes for clang build on OS X --- diff --git a/pv/dialogs/decoder.cpp b/pv/dialogs/decoder.cpp index b7ddb521..88ccf760 100644 --- a/pv/dialogs/decoder.cpp +++ b/pv/dialogs/decoder.cpp @@ -42,9 +42,7 @@ namespace dialogs { Decoder::Decoder(QWidget *parent, const srd_decoder *decoder, const vector< shared_ptr > &sigs, GHashTable *options) : QDialog(parent), - _decoder(decoder), _sigs(sigs), - _options(options), _binding(decoder, options), _layout(this), _form(this), diff --git a/pv/dialogs/decoder.h b/pv/dialogs/decoder.h index 2277f987..56f02aa4 100644 --- a/pv/dialogs/decoder.h +++ b/pv/dialogs/decoder.h @@ -62,12 +62,10 @@ private: QWidget *parent, const char *name); private: - const srd_decoder *const _decoder; const std::vector< boost::shared_ptr > &_sigs; std::map _probe_selector_map; - GHashTable *const _options; pv::prop::binding::DecoderOptions _binding; QVBoxLayout _layout; diff --git a/pv/view/ruler.cpp b/pv/view/ruler.cpp index a9a8452d..bf1507a7 100644 --- a/pv/view/ruler.cpp +++ b/pv/view/ruler.cpp @@ -74,7 +74,7 @@ QString Ruler::format_time(double t, unsigned int prefix, unsigned int precision) { const double multiplier = pow(10.0, - - prefix * 3 - FirstSIPrefixPower); + (int)- prefix * 3 - FirstSIPrefixPower); QString s; QTextStream ts(&s); @@ -106,7 +106,7 @@ void Ruler::paintEvent(QPaintEvent*) const double min_period = _view.scale() * min_width; const int order = (int)floorf(log10f(min_period)); - const double order_decimal = pow(10, order); + const double order_decimal = pow(10.0, order); unsigned int unit = 0;