From 897dec0ba5c2d7ef3797298dc04027409d627035 Mon Sep 17 00:00:00 2001 From: Johan Lindqvist <johan.lindqvist@gmail.com> Date: Sun, 15 Mar 2020 17:25:53 +0900 Subject: [PATCH] Fixed compiler warnings. --- source/mrserver.cpp | 2 +- source/networkconnection.h | 7 +++++++ source/videoreceiver.cpp | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/source/mrserver.cpp b/source/mrserver.cpp index fb98ba9..337c76f 100644 --- a/source/mrserver.cpp +++ b/source/mrserver.cpp @@ -158,7 +158,7 @@ void MRServer::loadVoc(QString path, int poolSize) fDebug << "Place ORBvoc.txt in the executable's directory."; fDebug << "ORBvoc.txt can be found in /externals/ORB_SLAM2/Vocabulary/ORBvoc.txt.tar.gz"; } else { - fDebug << "Vocabulary object added loaded to the pool."; + fDebug << "Vocabulary object added to the pool."; } } } diff --git a/source/networkconnection.h b/source/networkconnection.h index 9337606..9ec63e1 100644 --- a/source/networkconnection.h +++ b/source/networkconnection.h @@ -46,6 +46,13 @@ public: File(const File &rhs) : id(rhs.id), type(rhs.type), data(rhs.data), metadata(rhs.metadata) {} + File& operator=(const File &rhs) { + data = rhs.data; + type = rhs.type; + id = rhs.id; + metadata = rhs.metadata; + return *this; + } quint32 id; qint16 type; QByteArrayPtr data; diff --git a/source/videoreceiver.cpp b/source/videoreceiver.cpp index 40f5d58..58609e4 100644 --- a/source/videoreceiver.cpp +++ b/source/videoreceiver.cpp @@ -181,7 +181,7 @@ GstFlowReturn frame_received_callback(GstAppSink *appsink, gpointer data) gst_buffer_map(buffer, &map, GST_MAP_READ); // Convert gstreamer data to OpenCV Mat auto currFrame = cvMatPtr(new cv::Mat(cv::Size(width, height), CV_8UC3)); - memcpy(currFrame->data, map.data, width * height * 3); + memcpy(currFrame->data, map.data, static_cast<size_t>(width * height * 3)); gst_buffer_unmap(buffer, &map); gst_sample_unref(sample); @@ -513,7 +513,7 @@ void GStreamerReceiver::stop() fDebug << "Stopping GStreamerReceiver"; mCtx->running = false; if (mCtx->mainLoop != nullptr) { - g_main_quit(mCtx->mainLoop); + g_main_loop_quit(mCtx->mainLoop); } mCtx->mainLoop = nullptr; } -- GitLab