Skip to content
Snippets Groups Projects
user avatar
Koen Kooi authored
qreal is a double on some platforms (x86) and a float on others (e.g. ARM), cast it to fix build errors like these:

src/ui/designer/QGCXYPlot.cc: In member function 'int
XYPlotCurve::appendData(const QPointF&)':
src/ui/designer/QGCXYPlot.cc:41:39: error: no matching function for call
to 'qMin(double&, qreal)'
             xmin = qMin(xmin, data.x());
                                       ^
src/ui/designer/QGCXYPlot.cc:41:39: note: candidate is:
In file included from
/build/v2013.12/build/tmp-angstrom_v2013_12-eglibc/sysroots/sama5d3_xplained/usr/include/qt4/QtCore/qnamespace.h:45:0,
                 from
/build/v2013.12/build/tmp-angstrom_v2013_12-eglibc/sysroots/sama5d3_xplained/usr/include/qt4/QtCore/qobjectdefs.h:45,
                 from
/build/v2013.12/build/tmp-angstrom_v2013_12-eglibc/sysroots/sama5d3_xplained/usr/include/qt4/QtGui/qwindowdefs.h:45,
                 from
/build/v2013.12/build/tmp-angstrom_v2013_12-eglibc/sysroots/sama5d3_xplained/usr/include/qt4/QtGui/qwidget.h:46,
                 from
/build/v2013.12/build/tmp-angstrom_v2013_12-eglibc/sysroots/sama5d3_xplained/usr/include/qt4/QtGui/qdockwidget.h:45,
                 from
/build/v2013.12/build/tmp-angstrom_v2013_12-eglibc/sysroots/sama5d3_xplained/usr/include/qt4/QtGui/QDockWidget:1,
                 from src/ui/designer/QGCXYPlot.cc:1:
/build/v2013.12/build/tmp-angstrom_v2013_12-eglibc/sysroots/sama5d3_xplained/usr/include/qt4/QtCore/qglobal.h:1213:34:
note: template<class T> const T& qMin(const T&, const T&)
 Q_DECL_CONSTEXPR inline const T &qMin(const T &a, const T &b) { return
(a < b) ? a : b; }
                                  ^

See http://www.qtcentre.org/archive/index.php/t-45475.html

 for some
background.

This fixes #625

Signed-off-by: default avatarKoen Kooi <koen@dominion.thruhere.net>
0c66e26a
History
Name Last commit Last update
..
qwt.h
qwt.pri
qwt_abstract_scale.cpp
qwt_abstract_scale.h
qwt_abstract_scale_draw.cpp
qwt_abstract_scale_draw.h
qwt_abstract_slider.cpp
qwt_abstract_slider.h
qwt_analog_clock.cpp
qwt_analog_clock.h
qwt_array.h
qwt_arrow_button.cpp
qwt_arrow_button.h
qwt_clipper.cpp
qwt_clipper.h
qwt_color_map.cpp
qwt_color_map.h
qwt_compass.cpp
qwt_compass.h
qwt_compass_rose.cpp
qwt_compass_rose.h
qwt_counter.cpp
qwt_counter.h
qwt_curve_fitter.cpp
qwt_curve_fitter.h
qwt_data.cpp
qwt_data.h
qwt_dial.cpp
qwt_dial.h
qwt_dial_needle.cpp
qwt_dial_needle.h
qwt_double_interval.cpp
qwt_double_interval.h
qwt_double_range.cpp
qwt_double_range.h
qwt_double_rect.cpp
qwt_double_rect.h
qwt_dyngrid_layout.cpp
qwt_dyngrid_layout.h
qwt_event_pattern.cpp
qwt_event_pattern.h
qwt_global.h
qwt_interval_data.cpp
qwt_interval_data.h
qwt_knob.cpp
qwt_knob.h
qwt_layout_metrics.cpp
qwt_layout_metrics.h
qwt_legend.cpp
qwt_legend.h
qwt_legend_item.cpp
qwt_legend_item.h
qwt_legend_itemmanager.h
qwt_magnifier.cpp
qwt_magnifier.h
qwt_math.cpp
qwt_math.h
qwt_paint_buffer.cpp
qwt_paint_buffer.h
qwt_painter.cpp
qwt_painter.h
qwt_panner.cpp
qwt_panner.h
qwt_picker.cpp
qwt_picker.h
qwt_picker_machine.cpp
qwt_picker_machine.h
qwt_plot.cpp
qwt_plot.h
qwt_plot_axis.cpp
qwt_plot_canvas.cpp
qwt_plot_canvas.h
qwt_plot_curve.cpp
qwt_plot_curve.h
qwt_plot_dict.cpp
qwt_plot_dict.h
qwt_plot_grid.cpp
qwt_plot_grid.h
qwt_plot_item.cpp
qwt_plot_item.h
qwt_plot_layout.cpp
qwt_plot_layout.h
qwt_plot_magnifier.cpp
qwt_plot_magnifier.h
qwt_plot_marker.cpp
qwt_plot_marker.h
qwt_plot_panner.cpp
qwt_plot_panner.h
qwt_plot_picker.cpp
qwt_plot_picker.h
qwt_plot_print.cpp
qwt_plot_printfilter.cpp
qwt_plot_printfilter.h
qwt_plot_rasteritem.cpp
qwt_plot_rasteritem.h
qwt_plot_scaleitem.cpp
qwt_plot_scaleitem.h
qwt_plot_spectrogram.cpp
qwt_plot_spectrogram.h
qwt_plot_svgitem.cpp