From 930964671a0550f292f076f501cade9d59fcb6e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Mon, 1 Feb 2021 12:58:07 -0300 Subject: [PATCH] QGCCameraControl: Add missing const in member functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- src/Camera/QGCCameraControl.cc | 2 +- src/Camera/QGCCameraControl.h | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Camera/QGCCameraControl.cc b/src/Camera/QGCCameraControl.cc index f4e5c22..dd2125a 100644 --- a/src/Camera/QGCCameraControl.cc +++ b/src/Camera/QGCCameraControl.cc @@ -2156,7 +2156,7 @@ QGCVideoStreamInfo::QGCVideoStreamInfo(QObject* parent, const mavlink_video_stre //----------------------------------------------------------------------------- qreal -QGCVideoStreamInfo::aspectRatio() +QGCVideoStreamInfo::aspectRatio() const { qreal ar = 1.0; if(_streamInfo.resolution_h && _streamInfo.resolution_v) { diff --git a/src/Camera/QGCCameraControl.h b/src/Camera/QGCCameraControl.h index 7bf2f4c..b5a25bb 100644 --- a/src/Camera/QGCCameraControl.h +++ b/src/Camera/QGCCameraControl.h @@ -40,11 +40,11 @@ public: QString uri () { return QString(_streamInfo.uri); } QString name () { return QString(_streamInfo.name); } - qreal aspectRatio (); - qreal hfov () { return _streamInfo.hfov; } - int type () { return _streamInfo.type; } - int streamID () { return _streamInfo.stream_id; } - bool isThermal () { return _streamInfo.flags & VIDEO_STREAM_STATUS_FLAGS_THERMAL; } + qreal aspectRatio () const; + qreal hfov () const{ return _streamInfo.hfov; } + int type () const{ return _streamInfo.type; } + int streamID () const{ return _streamInfo.stream_id; } + bool isThermal () const{ return _streamInfo.flags & VIDEO_STREAM_STATUS_FLAGS_THERMAL; } bool update (const mavlink_video_stream_status_t* vs);