mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 10:05:46 -05:00
removed asserts
This commit is contained in:
parent
379096cbdd
commit
19ecf12c22
@ -17,7 +17,6 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
#include <algorithm>
|
||||
#include <QDebug>
|
||||
|
||||
@ -39,7 +38,6 @@ FileOutputWorker::FileOutputWorker(std::ofstream *samplesStream, SampleSourceFif
|
||||
m_throttleToggle(false),
|
||||
m_buf(nullptr)
|
||||
{
|
||||
assert(m_ofstream != nullptr);
|
||||
}
|
||||
|
||||
FileOutputWorker::~FileOutputWorker()
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include <stdint.h>
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
#include <cassert>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QMessageBox>
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
#include <algorithm>
|
||||
#include <QDebug>
|
||||
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
#include <algorithm>
|
||||
#include <QDebug>
|
||||
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
#include <QDebug>
|
||||
|
||||
#include "dsp/filerecord.h"
|
||||
@ -49,7 +48,6 @@ FileInputWorker::FileInputWorker(std::ifstream *samplesStream,
|
||||
m_throttlems(FILESOURCE_THROTTLE_MS),
|
||||
m_throttleToggle(false)
|
||||
{
|
||||
assert(m_ifstream != nullptr);
|
||||
}
|
||||
|
||||
FileInputWorker::~FileInputWorker()
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include <stdint.h>
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
#include <cassert>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QMessageBox>
|
||||
|
@ -16,7 +16,6 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <QDebug>
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
#include <cmath>
|
||||
#include <algorithm>
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include <stdint.h>
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
#include <cassert>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QMessageBox>
|
||||
|
@ -26,7 +26,6 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
template <typename Type, uint32_t Order> class IIRFilter
|
||||
{
|
||||
@ -61,8 +60,6 @@ private:
|
||||
template <typename Type, uint32_t Order>
|
||||
IIRFilter<Type, Order>::IIRFilter(const Type *a, const Type *b)
|
||||
{
|
||||
assert(Order > 1);
|
||||
|
||||
m_a = new Type[Order+1];
|
||||
m_b = new Type[Order+1];
|
||||
m_x = new Type[Order];
|
||||
|
@ -16,7 +16,6 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <algorithm>
|
||||
#include <assert.h>
|
||||
#include "samplesourcefifodb.h"
|
||||
|
||||
SampleSourceFifoDB::SampleSourceFifoDB(uint32_t size, QObject* parent) :
|
||||
@ -60,7 +59,7 @@ void SampleSourceFifoDB::init()
|
||||
void SampleSourceFifoDB::readAdvance(SampleVector::iterator& readUntil, unsigned int nbSamples)
|
||||
{
|
||||
// QMutexLocker mutexLocker(&m_mutex);
|
||||
assert(nbSamples <= m_size/2);
|
||||
nbSamples = nbSamples > m_size/2 ? m_size/2 : nbSamples;
|
||||
emit dataWrite(nbSamples);
|
||||
|
||||
m_ir = (m_ir + nbSamples) % m_size;
|
||||
@ -71,7 +70,7 @@ void SampleSourceFifoDB::readAdvance(SampleVector::iterator& readUntil, unsigned
|
||||
void SampleSourceFifoDB::readAdvance(SampleVector::const_iterator& readUntil, unsigned int nbSamples)
|
||||
{
|
||||
// QMutexLocker mutexLocker(&m_mutex);
|
||||
assert(nbSamples <= m_size/2);
|
||||
nbSamples = nbSamples > m_size/2 ? m_size/2 : nbSamples;
|
||||
emit dataWrite(nbSamples);
|
||||
|
||||
m_ir = (m_ir + nbSamples) % m_size;
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include <QObject>
|
||||
#include <QMutex>
|
||||
#include <stdint.h>
|
||||
#include <assert.h>
|
||||
#include "export.h"
|
||||
#include "dsp/dsptypes.h"
|
||||
|
||||
|
@ -17,18 +17,16 @@
|
||||
|
||||
#include "util/db.h"
|
||||
#include <cmath>
|
||||
#include <cassert>
|
||||
|
||||
double CalcDb::dbPower(double magsq, double floor)
|
||||
{
|
||||
assert(floor > 0.0);
|
||||
|
||||
if (magsq > floor)
|
||||
{
|
||||
return 10.0 * log10(magsq);
|
||||
if (floor <= 0.0) {
|
||||
return -100.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (magsq > floor) {
|
||||
return 10.0 * log10(magsq);
|
||||
} else {
|
||||
return 10.0 * log10(floor);
|
||||
}
|
||||
}
|
||||
|
@ -24,8 +24,6 @@
|
||||
#include <QUdpSocket>
|
||||
#include <QHostAddress>
|
||||
|
||||
#include <cassert>
|
||||
|
||||
template<typename T>
|
||||
class UDPSinkUtil
|
||||
{
|
||||
@ -37,7 +35,6 @@ public:
|
||||
m_port(9999),
|
||||
m_sampleBufferIndex(0)
|
||||
{
|
||||
assert(m_udpSamples > 0);
|
||||
m_sampleBuffer = new T[m_udpSamples];
|
||||
m_socket = new QUdpSocket(parent);
|
||||
}
|
||||
@ -49,7 +46,6 @@ public:
|
||||
m_port(port),
|
||||
m_sampleBufferIndex(0)
|
||||
{
|
||||
assert(m_udpSamples > 0);
|
||||
m_sampleBuffer = new T[m_udpSamples];
|
||||
m_socket = new QUdpSocket(parent);
|
||||
}
|
||||
@ -61,7 +57,6 @@ public:
|
||||
m_port(port),
|
||||
m_sampleBufferIndex(0)
|
||||
{
|
||||
assert(m_udpSamples > 0);
|
||||
m_sampleBuffer = new T[m_udpSamples];
|
||||
m_socket = new QUdpSocket(parent);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user