mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-04-07 12:09:01 -04:00
cmake: re-integrated -Woverloaded-virtual and fixed corresponding warnings
This commit is contained in:
parent
164b83a3ce
commit
82f98ab6c1
@ -309,7 +309,7 @@ endif()
|
||||
include(FindCompiler)
|
||||
|
||||
if (C_CLANG OR C_GCC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wvla -ffast-math -ftree-vectorize ${EXTRA_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wvla -Woverloaded-virtual -ffast-math -ftree-vectorize ${EXTRA_FLAGS}")
|
||||
elseif (C_MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w -MP ${EXTRA_FLAGS}")
|
||||
endif()
|
||||
|
@ -71,7 +71,8 @@ public:
|
||||
Real getPllDeltaPhase() const { return m_basebandSink->getPllDeltaPhase(); }
|
||||
Real getPllPhase() const { return m_basebandSink->getPllPhase(); }
|
||||
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool positiveOnly);
|
||||
using BasebandSampleSink::feed;
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
|
||||
virtual void start();
|
||||
virtual void stop();
|
||||
virtual bool handleMessage(const Message& cmd);
|
||||
|
@ -67,7 +67,8 @@ public:
|
||||
virtual ~ADSBDemod();
|
||||
virtual void destroy() { delete this; }
|
||||
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool positive);
|
||||
using BasebandSampleSink::feed;
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
|
||||
virtual void start();
|
||||
virtual void stop();
|
||||
virtual bool handleMessage(const Message& cmd);
|
||||
|
@ -65,7 +65,8 @@ public:
|
||||
virtual ~AMDemod();
|
||||
virtual void destroy() { delete this; }
|
||||
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
|
||||
using BasebandSampleSink::feed;
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
|
||||
virtual void start();
|
||||
virtual void stop();
|
||||
virtual bool handleMessage(const Message& cmd);
|
||||
|
@ -64,7 +64,8 @@ public:
|
||||
virtual ~ATVDemod();
|
||||
virtual void destroy() { delete this; }
|
||||
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
|
||||
using BasebandSampleSink::feed;
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
|
||||
virtual void start();
|
||||
virtual void stop();
|
||||
virtual bool handleMessage(const Message& cmd);
|
||||
|
@ -73,7 +73,8 @@ public:
|
||||
SpectrumVis *getSpectrumVis() { return &m_spectrumVis; }
|
||||
void setBasebandMessageQueueToGUI(MessageQueue *messageQueue) { m_basebandSink->setMessageQueueToGUI(messageQueue); }
|
||||
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
|
||||
using BasebandSampleSink::feed;
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
|
||||
virtual void start();
|
||||
virtual void stop();
|
||||
virtual bool handleMessage(const Message& cmd);
|
||||
|
@ -203,7 +203,8 @@ public:
|
||||
virtual void destroy() { delete this; }
|
||||
SpectrumVis *getSpectrumVis() { return &m_spectrumVis; }
|
||||
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool pO);
|
||||
using BasebandSampleSink::feed;
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
|
||||
virtual void start();
|
||||
virtual void stop();
|
||||
virtual bool handleMessage(const Message& cmd);
|
||||
|
@ -49,7 +49,8 @@ public:
|
||||
virtual QByteArray serialize() const { return QByteArray(); }
|
||||
virtual bool deserialize(const QByteArray& data) { (void) data; return false; }
|
||||
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
|
||||
using BasebandSampleSink::feed;
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
|
||||
virtual void start();
|
||||
virtual void stop();
|
||||
virtual bool handleMessage(const Message& cmd);
|
||||
|
@ -66,7 +66,8 @@ public:
|
||||
virtual ~DSDDemod();
|
||||
virtual void destroy() { delete this; }
|
||||
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
|
||||
using BasebandSampleSink::feed;
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
|
||||
virtual void start();
|
||||
virtual void stop();
|
||||
virtual bool handleMessage(const Message& cmd);
|
||||
|
@ -79,7 +79,8 @@ public:
|
||||
virtual void destroy() { delete this; }
|
||||
SpectrumVis *getSpectrumVis() { return &m_spectrumVis; }
|
||||
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool positiveOnly);
|
||||
using BasebandSampleSink::feed;
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
|
||||
virtual void start();
|
||||
virtual void stop();
|
||||
virtual bool handleMessage(const Message& cmd);
|
||||
|
@ -65,7 +65,8 @@ public:
|
||||
virtual ~NFMDemod();
|
||||
virtual void destroy() { delete this; }
|
||||
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool positive);
|
||||
using BasebandSampleSink::feed;
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
|
||||
virtual void start();
|
||||
virtual void stop();
|
||||
virtual bool handleMessage(const Message& cmd);
|
||||
|
@ -68,7 +68,8 @@ public:
|
||||
virtual void destroy() { delete this; }
|
||||
SpectrumVis *getSpectrumVis() { return &m_spectrumVis; }
|
||||
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool positiveOnly);
|
||||
using BasebandSampleSink::feed;
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
|
||||
virtual void start();
|
||||
virtual void stop();
|
||||
virtual bool handleMessage(const Message& cmd);
|
||||
|
@ -64,6 +64,7 @@ public:
|
||||
virtual ~WFMDemod();
|
||||
virtual void destroy() { delete this; }
|
||||
|
||||
using BasebandSampleSink::feed;
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
|
||||
virtual void start();
|
||||
virtual void stop();
|
||||
|
@ -66,6 +66,7 @@ public:
|
||||
virtual ~FileSink();
|
||||
virtual void destroy() { delete this; }
|
||||
|
||||
using BasebandSampleSink::feed;
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
|
||||
virtual void start();
|
||||
virtual void stop();
|
||||
|
@ -64,7 +64,8 @@ public:
|
||||
virtual ~FreqTracker();
|
||||
virtual void destroy() { delete this; }
|
||||
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
|
||||
using BasebandSampleSink::feed;
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
|
||||
virtual void start();
|
||||
virtual void stop();
|
||||
virtual bool handleMessage(const Message& cmd);
|
||||
|
@ -86,6 +86,7 @@ public:
|
||||
virtual ~LocalSink();
|
||||
virtual void destroy() { delete this; }
|
||||
|
||||
using BasebandSampleSink::feed;
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
|
||||
virtual void start();
|
||||
virtual void stop();
|
||||
|
@ -65,6 +65,7 @@ public:
|
||||
virtual ~RemoteSink();
|
||||
virtual void destroy() { delete this; }
|
||||
|
||||
using BasebandSampleSink::feed;
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
|
||||
virtual void start();
|
||||
virtual void stop();
|
||||
|
@ -66,6 +66,7 @@ public:
|
||||
virtual ~SigMFFileSink();
|
||||
virtual void destroy() { delete this; }
|
||||
|
||||
using BasebandSampleSink::feed;
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
|
||||
virtual void start();
|
||||
virtual void stop();
|
||||
|
@ -72,7 +72,8 @@ public:
|
||||
double getInMagSq() const { return m_basebandSink->getInMagSq(); }
|
||||
bool getSquelchOpen() const { return m_basebandSink->getSquelchOpen(); }
|
||||
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool positiveOnly);
|
||||
using BasebandSampleSink::feed;
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
|
||||
virtual void start();
|
||||
virtual void stop();
|
||||
virtual bool handleMessage(const Message& cmd);
|
||||
|
@ -21,9 +21,10 @@
|
||||
|
||||
#include "filerecordinterface.h"
|
||||
|
||||
FileRecordInterface::FileRecordInterface() :
|
||||
BasebandSampleSink()
|
||||
{}
|
||||
FileRecordInterface::FileRecordInterface()
|
||||
{
|
||||
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()));
|
||||
}
|
||||
|
||||
FileRecordInterface::~FileRecordInterface()
|
||||
{}
|
||||
@ -72,3 +73,16 @@ FileRecordInterface::RecordType FileRecordInterface::guessTypeFromFileName(const
|
||||
return RecordTypeUndefined;
|
||||
}
|
||||
}
|
||||
|
||||
void FileRecordInterface::handleInputMessages()
|
||||
{
|
||||
Message* message;
|
||||
|
||||
while ((message = m_inputMessageQueue.pop()) != 0)
|
||||
{
|
||||
if (handleMessage(*message))
|
||||
{
|
||||
delete message;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -21,11 +21,15 @@
|
||||
#define INCLUDE_FILERECORD_INTERFACE_H
|
||||
|
||||
#include <QString>
|
||||
#include <QObject>
|
||||
|
||||
#include "dsp/basebandsamplesink.h"
|
||||
#include "dsp/dsptypes.h"
|
||||
#include "util/message.h"
|
||||
#include "util/messagequeue.h"
|
||||
#include "export.h"
|
||||
|
||||
class SDRBASE_API FileRecordInterface : public BasebandSampleSink {
|
||||
class SDRBASE_API FileRecordInterface : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum RecordType
|
||||
{
|
||||
@ -42,6 +46,10 @@ public:
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool positiveOnly) = 0;
|
||||
virtual bool handleMessage(const Message& cmd) = 0; //!< Processing of a message. Returns true if message has actually been processed
|
||||
|
||||
MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; } //!< Get the queue for asynchronous inbound communication
|
||||
virtual void setMessageQueueToGUI(MessageQueue *queue) { m_guiMessageQueue = queue; }
|
||||
MessageQueue *getMessageQueueToGUI() { return m_guiMessageQueue; }
|
||||
|
||||
virtual void setFileName(const QString &filename) = 0;
|
||||
virtual void startRecording() = 0;
|
||||
virtual void stopRecording() = 0;
|
||||
@ -49,7 +57,15 @@ public:
|
||||
|
||||
static QString genUniqueFileName(unsigned int deviceUID, int istream = -1);
|
||||
static RecordType guessTypeFromFileName(const QString& fileName, QString& fileBase);
|
||||
|
||||
protected:
|
||||
MessageQueue m_inputMessageQueue; //!< Queue for asynchronous inbound communication
|
||||
MessageQueue *m_guiMessageQueue; //!< Input message queue to the GUI
|
||||
|
||||
protected slots:
|
||||
void handleInputMessages();
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // INCLUDE_FILERECORD_INTERFACE_H
|
||||
#endif // INCLUDE_FILERECORD_INTERFACE_H
|
||||
|
@ -239,6 +239,7 @@ public:
|
||||
const std::vector<TraceData>& getTracesData() const { return m_traces.m_tracesData; }
|
||||
uint32_t getNbTriggers() const { return m_triggerConditions.size(); }
|
||||
|
||||
using BasebandSampleSink::feed;
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool positiveOnly);
|
||||
virtual void start();
|
||||
virtual void stop();
|
||||
|
@ -34,6 +34,7 @@ public:
|
||||
ScopeVisXY(TVScreen *tvScreen);
|
||||
virtual ~ScopeVisXY();
|
||||
|
||||
using BasebandSampleSink::feed;
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool positiveOnly);
|
||||
virtual void start();
|
||||
virtual void stop();
|
||||
|
@ -14,6 +14,7 @@ public:
|
||||
SpectrumScopeComboVis(SpectrumVis* spectrumVis, ScopeVis* scopeVis);
|
||||
virtual ~SpectrumScopeComboVis();
|
||||
|
||||
using BasebandSampleSink::feed;
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool positiveOnly);
|
||||
virtual void start();
|
||||
virtual void stop();
|
||||
|
Loading…
Reference in New Issue
Block a user