mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-22 16:08:39 -05:00
Code warnings in Eclipse cleanup
This commit is contained in:
parent
a4de2be023
commit
cf267b1254
@ -1,9 +1,9 @@
|
|||||||
#include "../../channelrx/chanalyzer/chanalyzerplugin.h"
|
#include "chanalyzerplugin.h"
|
||||||
|
|
||||||
#include <QtPlugin>
|
#include <QtPlugin>
|
||||||
#include "plugin/pluginapi.h"
|
#include "plugin/pluginapi.h"
|
||||||
|
|
||||||
#include "../../channelrx/chanalyzer/chanalyzergui.h"
|
#include "chanalyzergui.h"
|
||||||
|
|
||||||
const PluginDescriptor ChannelAnalyzerPlugin::m_pluginDescriptor = {
|
const PluginDescriptor ChannelAnalyzerPlugin::m_pluginDescriptor = {
|
||||||
QString("Channel Analyzer"),
|
QString("Channel Analyzer"),
|
||||||
@ -15,7 +15,8 @@ const PluginDescriptor ChannelAnalyzerPlugin::m_pluginDescriptor = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
ChannelAnalyzerPlugin::ChannelAnalyzerPlugin(QObject* parent) :
|
ChannelAnalyzerPlugin::ChannelAnalyzerPlugin(QObject* parent) :
|
||||||
QObject(parent)
|
QObject(parent),
|
||||||
|
m_pluginAPI(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +30,8 @@ const PluginDescriptor ChannelAnalyzerNGPlugin::m_pluginDescriptor = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
ChannelAnalyzerNGPlugin::ChannelAnalyzerNGPlugin(QObject* parent) :
|
ChannelAnalyzerNGPlugin::ChannelAnalyzerNGPlugin(QObject* parent) :
|
||||||
QObject(parent)
|
QObject(parent),
|
||||||
|
m_pluginAPI(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,8 @@ const PluginDescriptor AMDemodPlugin::m_pluginDescriptor = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
AMDemodPlugin::AMDemodPlugin(QObject* parent) :
|
AMDemodPlugin::AMDemodPlugin(QObject* parent) :
|
||||||
QObject(parent)
|
QObject(parent),
|
||||||
|
m_pluginAPI(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -194,6 +194,8 @@ bool ATVScreen::selectRow(int intLine)
|
|||||||
{
|
{
|
||||||
return m_objGLShaderArray.SelectRow(intLine);
|
return m_objGLShaderArray.SelectRow(intLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ATVScreen::setDataColor(int intCol, int intRed, int intGreen, int intBlue)
|
bool ATVScreen::setDataColor(int intCol, int intRed, int intGreen, int intBlue)
|
||||||
@ -203,4 +205,6 @@ bool ATVScreen::setDataColor(int intCol, int intRed, int intGreen, int intBlue)
|
|||||||
return m_objGLShaderArray.SetDataColor(intCol,
|
return m_objGLShaderArray.SetDataColor(intCol,
|
||||||
qRgb(intRed, intGreen, intBlue));
|
qRgb(intRed, intGreen, intBlue));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,8 @@ const PluginDescriptor BFMPlugin::m_pluginDescriptor = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
BFMPlugin::BFMPlugin(QObject* parent) :
|
BFMPlugin::BFMPlugin(QObject* parent) :
|
||||||
QObject(parent)
|
QObject(parent),
|
||||||
|
m_pluginAPI(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ RDSDecoder::RDSDecoder()
|
|||||||
m_groupGoodBlocksCounter = 0;
|
m_groupGoodBlocksCounter = 0;
|
||||||
m_wrongBlocksCounter = 0;
|
m_wrongBlocksCounter = 0;
|
||||||
m_goodBlock = false;
|
m_goodBlock = false;
|
||||||
|
m_qua = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
RDSDecoder::~RDSDecoder()
|
RDSDecoder::~RDSDecoder()
|
||||||
|
@ -45,6 +45,7 @@ RDSDemod::RDSDemod()
|
|||||||
m_parms.counter = 0;
|
m_parms.counter = 0;
|
||||||
m_parms.reading_frame = 0;
|
m_parms.reading_frame = 0;
|
||||||
m_parms.dbit = 0;
|
m_parms.dbit = 0;
|
||||||
|
m_prev = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
RDSDemod::~RDSDemod()
|
RDSDemod::~RDSDemod()
|
||||||
|
@ -27,8 +27,6 @@
|
|||||||
#include "dsp/dspengine.h"
|
#include "dsp/dspengine.h"
|
||||||
#include "../../channelrx/demoddsd/dsddemodgui.h"
|
#include "../../channelrx/demoddsd/dsddemodgui.h"
|
||||||
|
|
||||||
static const Real afSqTones[2] = {1200.0, 6400.0}; // {1200.0, 8000.0};
|
|
||||||
|
|
||||||
MESSAGE_CLASS_DEFINITION(DSDDemod::MsgConfigureDSDDemod, Message)
|
MESSAGE_CLASS_DEFINITION(DSDDemod::MsgConfigureDSDDemod, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(DSDDemod::MsgConfigureMyPosition, Message)
|
MESSAGE_CLASS_DEFINITION(DSDDemod::MsgConfigureMyPosition, Message)
|
||||||
|
|
||||||
|
@ -32,7 +32,8 @@ const PluginDescriptor DSDDemodPlugin::m_pluginDescriptor = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
DSDDemodPlugin::DSDDemodPlugin(QObject* parent) :
|
DSDDemodPlugin::DSDDemodPlugin(QObject* parent) :
|
||||||
QObject(parent)
|
QObject(parent),
|
||||||
|
m_pluginAPI(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,8 @@ const PluginDescriptor LoRaPlugin::m_pluginDescriptor = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
LoRaPlugin::LoRaPlugin(QObject* parent) :
|
LoRaPlugin::LoRaPlugin(QObject* parent) :
|
||||||
QObject(parent)
|
QObject(parent),
|
||||||
|
m_pluginAPI(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,8 @@ const PluginDescriptor NFMPlugin::m_pluginDescriptor = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
NFMPlugin::NFMPlugin(QObject* parent) :
|
NFMPlugin::NFMPlugin(QObject* parent) :
|
||||||
QObject(parent)
|
QObject(parent),
|
||||||
|
m_pluginAPI(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +32,9 @@ SSBDemod::SSBDemod(BasebandSampleSink* sampleSink) :
|
|||||||
m_audioFifo(4, 24000),
|
m_audioFifo(4, 24000),
|
||||||
m_settingsMutex(QMutex::Recursive),
|
m_settingsMutex(QMutex::Recursive),
|
||||||
m_audioBinaual(false),
|
m_audioBinaual(false),
|
||||||
m_audioFlipChannels(false)
|
m_audioFlipChannels(false),
|
||||||
|
m_audioMute(false),
|
||||||
|
m_dsb(false)
|
||||||
{
|
{
|
||||||
setObjectName("SSBDemod");
|
setObjectName("SSBDemod");
|
||||||
|
|
||||||
|
@ -15,7 +15,8 @@ const PluginDescriptor SSBPlugin::m_pluginDescriptor = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
SSBPlugin::SSBPlugin(QObject* parent) :
|
SSBPlugin::SSBPlugin(QObject* parent) :
|
||||||
QObject(parent)
|
QObject(parent),
|
||||||
|
m_pluginAPI(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,8 @@ const PluginDescriptor WFMPlugin::m_pluginDescriptor = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
WFMPlugin::WFMPlugin(QObject* parent) :
|
WFMPlugin::WFMPlugin(QObject* parent) :
|
||||||
QObject(parent)
|
QObject(parent),
|
||||||
|
m_pluginAPI(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@ TCPSrc::TCPSrc(MessageQueue* uiMessageQueue, TCPSrcGUI* tcpSrcGUI, BasebandSampl
|
|||||||
m_sampleFormat = FormatSSB;
|
m_sampleFormat = FormatSSB;
|
||||||
m_outputSampleRate = 48000;
|
m_outputSampleRate = 48000;
|
||||||
m_rfBandwidth = 32000;
|
m_rfBandwidth = 32000;
|
||||||
|
m_tcpServer = 0;
|
||||||
m_tcpPort = 9999;
|
m_tcpPort = 9999;
|
||||||
m_nco.setFreq(0, m_inputSampleRate);
|
m_nco.setFreq(0, m_inputSampleRate);
|
||||||
m_interpolator.create(16, m_inputSampleRate, m_rfBandwidth / 2.0);
|
m_interpolator.create(16, m_inputSampleRate, m_rfBandwidth / 2.0);
|
||||||
@ -145,7 +146,7 @@ void TCPSrc::feed(const SampleVector::const_iterator& begin, const SampleVector:
|
|||||||
- m_last.imag() * (m_this.real() - sideband[i+1].real());
|
- m_last.imag() * (m_this.real() - sideband[i+1].real());
|
||||||
m_this = sideband[i+1];
|
m_this = sideband[i+1];
|
||||||
m_sampleBufferSSB.push_back(Sample(l * m_scale, r * m_scale));
|
m_sampleBufferSSB.push_back(Sample(l * m_scale, r * m_scale));
|
||||||
sum += m_this.real() * m_this.real() + m_this.imag() * m_this.imag();
|
sum += m_this.real() * m_this.real() + m_this.imag() * m_this.imag();
|
||||||
}
|
}
|
||||||
// TODO: correct levels
|
// TODO: correct levels
|
||||||
m_scale = 24000 * tcpFftLen / sum;
|
m_scale = 24000 * tcpFftLen / sum;
|
||||||
|
@ -15,7 +15,8 @@ const PluginDescriptor TCPSrcPlugin::m_pluginDescriptor = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
TCPSrcPlugin::TCPSrcPlugin(QObject* parent) :
|
TCPSrcPlugin::TCPSrcPlugin(QObject* parent) :
|
||||||
QObject(parent)
|
QObject(parent),
|
||||||
|
m_pluginAPI(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +32,8 @@ const PluginDescriptor UDPSrcPlugin::m_pluginDescriptor = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
UDPSrcPlugin::UDPSrcPlugin(QObject* parent) :
|
UDPSrcPlugin::UDPSrcPlugin(QObject* parent) :
|
||||||
QObject(parent)
|
QObject(parent),
|
||||||
|
m_pluginAPI(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,8 @@ const PluginDescriptor AMModPlugin::m_pluginDescriptor = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
AMModPlugin::AMModPlugin(QObject* parent) :
|
AMModPlugin::AMModPlugin(QObject* parent) :
|
||||||
QObject(parent)
|
QObject(parent),
|
||||||
|
m_pluginAPI(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,8 @@ const PluginDescriptor ATVModPlugin::m_pluginDescriptor = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
ATVModPlugin::ATVModPlugin(QObject* parent) :
|
ATVModPlugin::ATVModPlugin(QObject* parent) :
|
||||||
QObject(parent)
|
QObject(parent),
|
||||||
|
m_pluginAPI(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,8 @@ const PluginDescriptor NFMModPlugin::m_pluginDescriptor = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
NFMModPlugin::NFMModPlugin(QObject* parent) :
|
NFMModPlugin::NFMModPlugin(QObject* parent) :
|
||||||
QObject(parent)
|
QObject(parent),
|
||||||
|
m_pluginAPI(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,8 @@ const PluginDescriptor SSBModPlugin::m_pluginDescriptor = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
SSBModPlugin::SSBModPlugin(QObject* parent) :
|
SSBModPlugin::SSBModPlugin(QObject* parent) :
|
||||||
QObject(parent)
|
QObject(parent),
|
||||||
|
m_pluginAPI(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,8 @@ const PluginDescriptor WFMModPlugin::m_pluginDescriptor = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
WFMModPlugin::WFMModPlugin(QObject* parent) :
|
WFMModPlugin::WFMModPlugin(QObject* parent) :
|
||||||
QObject(parent)
|
QObject(parent),
|
||||||
|
m_pluginAPI(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +35,8 @@ FileSinkThread::FileSinkThread(std::ofstream *samplesStream, SampleSourceFifo* s
|
|||||||
m_log2Interpolation(0),
|
m_log2Interpolation(0),
|
||||||
m_throttlems(FILESINK_THROTTLE_MS),
|
m_throttlems(FILESINK_THROTTLE_MS),
|
||||||
m_throttleToggle(false),
|
m_throttleToggle(false),
|
||||||
m_buf(0)
|
m_buf(0),
|
||||||
|
m_maxThrottlems(50)
|
||||||
{
|
{
|
||||||
assert(m_ofstream != 0);
|
assert(m_ofstream != 0);
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,10 @@ MESSAGE_CLASS_DEFINITION(FCDProPlusInput::MsgConfigureFCD, Message)
|
|||||||
FCDProPlusInput::FCDProPlusInput() :
|
FCDProPlusInput::FCDProPlusInput() :
|
||||||
m_dev(0),
|
m_dev(0),
|
||||||
m_settings(),
|
m_settings(),
|
||||||
m_deviceDescription(fcd_traits<ProPlus>::displayedName)
|
m_deviceDescription(fcd_traits<ProPlus>::displayedName),
|
||||||
|
m_FCDThread(0),
|
||||||
|
m_running(false),
|
||||||
|
m_deviceAPI(0)
|
||||||
{
|
{
|
||||||
m_FCDReader = new FCDProPlusReader(&m_sampleFifo);
|
m_FCDReader = new FCDProPlusReader(&m_sampleFifo);
|
||||||
}
|
}
|
||||||
@ -161,7 +164,7 @@ void FCDProPlusInput::applySettings(const FCDProPlusSettings& settings, bool for
|
|||||||
set_bias_t(settings.m_biasT);
|
set_bias_t(settings.m_biasT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((m_settings.m_mixGain != settings.m_mixGain) || force)
|
if ((m_settings.m_mixGain != settings.m_mixGain) || force)
|
||||||
{
|
{
|
||||||
m_settings.m_mixGain = settings.m_mixGain;
|
m_settings.m_mixGain = settings.m_mixGain;
|
||||||
|
@ -45,7 +45,8 @@ SDRdaemonFECBuffer::SDRdaemonFECBuffer(uint32_t throttlems) :
|
|||||||
m_nbReads(0),
|
m_nbReads(0),
|
||||||
m_nbWrites(0),
|
m_nbWrites(0),
|
||||||
m_balCorrection(0),
|
m_balCorrection(0),
|
||||||
m_balCorrLimit(0)
|
m_balCorrLimit(0),
|
||||||
|
m_curOriginalBlocks(0)
|
||||||
{
|
{
|
||||||
m_currentMeta.init();
|
m_currentMeta.init();
|
||||||
m_framesNbBytes = nbDecoderSlots * sizeof(BufferFrame);
|
m_framesNbBytes = nbDecoderSlots * sizeof(BufferFrame);
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
template <class Type> class Bandpass {
|
template <class Type> class Bandpass {
|
||||||
public:
|
public:
|
||||||
Bandpass() { }
|
Bandpass() : m_ptr(0) { }
|
||||||
|
|
||||||
void create(int nTaps, double sampleRate, double lowCutoff, double highCutoff)
|
void create(int nTaps, double sampleRate, double lowCutoff, double highCutoff)
|
||||||
{
|
{
|
||||||
|
@ -32,7 +32,7 @@ typedef qint16 FixReal;
|
|||||||
#pragma pack(push, 1)
|
#pragma pack(push, 1)
|
||||||
struct Sample
|
struct Sample
|
||||||
{
|
{
|
||||||
Sample() {}
|
Sample() : m_real(0), m_imag(0) {}
|
||||||
Sample(FixReal real) : m_real(real), m_imag(0) {}
|
Sample(FixReal real) : m_real(real), m_imag(0) {}
|
||||||
Sample(FixReal real, FixReal imag) : m_real(real), m_imag(imag) {}
|
Sample(FixReal real, FixReal imag) : m_real(real), m_imag(imag) {}
|
||||||
Sample(const Sample& other) : m_real(other.m_real), m_imag(other.m_imag) {}
|
Sample(const Sample& other) : m_real(other.m_real), m_imag(other.m_imag) {}
|
||||||
|
@ -56,8 +56,13 @@ void Interpolator::createPolyphaseLowPass(
|
|||||||
}
|
}
|
||||||
|
|
||||||
Interpolator::Interpolator() :
|
Interpolator::Interpolator() :
|
||||||
m_taps(NULL),
|
m_taps(0),
|
||||||
m_alignedTaps(NULL)
|
m_alignedTaps(0),
|
||||||
|
m_nTaps(1),
|
||||||
|
m_ptr(0),
|
||||||
|
m_taps2(0),
|
||||||
|
m_alignedTaps2(0),
|
||||||
|
m_phaseSteps(1)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
template <class Type> class Lowpass {
|
template <class Type> class Lowpass {
|
||||||
public:
|
public:
|
||||||
Lowpass() { }
|
Lowpass() : m_ptr(0) { }
|
||||||
|
|
||||||
void create(int nTaps, double sampleRate, double cutoff)
|
void create(int nTaps, double sampleRate, double cutoff)
|
||||||
{
|
{
|
||||||
|
@ -84,6 +84,10 @@ bool CWKeyerGUI::deserialize(const QByteArray& data)
|
|||||||
applySettings();
|
applySettings();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// === SLOTS ==================================================================
|
// === SLOTS ==================================================================
|
||||||
|
@ -65,7 +65,10 @@ GLScope::GLScope(QWidget* parent) :
|
|||||||
m_prevArg(0),
|
m_prevArg(0),
|
||||||
m_displayGridIntensity(5),
|
m_displayGridIntensity(5),
|
||||||
m_displayTraceIntensity(50),
|
m_displayTraceIntensity(50),
|
||||||
m_powerOverlayFont(font())
|
m_powerOverlayFont(font()),
|
||||||
|
m_maxPow(0.0f),
|
||||||
|
m_sumPow(0.0f),
|
||||||
|
m_nbPow(1)
|
||||||
{
|
{
|
||||||
setAttribute(Qt::WA_OpaquePaintEvent);
|
setAttribute(Qt::WA_OpaquePaintEvent);
|
||||||
connect(&m_timer, SIGNAL(timeout()), this, SLOT(tick()));
|
connect(&m_timer, SIGNAL(timeout()), this, SLOT(tick()));
|
||||||
|
@ -25,7 +25,9 @@
|
|||||||
#include "gui/glshadersimple.h"
|
#include "gui/glshadersimple.h"
|
||||||
|
|
||||||
GLShaderSimple::GLShaderSimple() :
|
GLShaderSimple::GLShaderSimple() :
|
||||||
m_program(0)
|
m_program(0),
|
||||||
|
m_colorLoc(0),
|
||||||
|
m_matrixLoc(0)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
GLShaderSimple::~GLShaderSimple()
|
GLShaderSimple::~GLShaderSimple()
|
||||||
|
@ -27,7 +27,9 @@
|
|||||||
|
|
||||||
GLShaderTextured::GLShaderTextured() :
|
GLShaderTextured::GLShaderTextured() :
|
||||||
m_program(0),
|
m_program(0),
|
||||||
m_texture(0)
|
m_texture(0),
|
||||||
|
m_matrixLoc(0),
|
||||||
|
m_textureLoc(0)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
GLShaderTextured::~GLShaderTextured()
|
GLShaderTextured::~GLShaderTextured()
|
||||||
|
@ -53,7 +53,12 @@ GLSpectrum::GLSpectrum(QWidget* parent) :
|
|||||||
m_histogram(NULL),
|
m_histogram(NULL),
|
||||||
m_histogramHoldoff(NULL),
|
m_histogramHoldoff(NULL),
|
||||||
m_displayHistogram(true),
|
m_displayHistogram(true),
|
||||||
m_displayChanged(false)
|
m_displayChanged(false),
|
||||||
|
m_colorLoc(0),
|
||||||
|
m_waterfallBufferPos(0),
|
||||||
|
m_cursorChannel(0),
|
||||||
|
m_waterfallTexturePos(0),
|
||||||
|
m_matrixLoc(0)
|
||||||
{
|
{
|
||||||
setAutoFillBackground(false);
|
setAutoFillBackground(false);
|
||||||
setAttribute(Qt::WA_OpaquePaintEvent, true);
|
setAttribute(Qt::WA_OpaquePaintEvent, true);
|
||||||
|
@ -269,7 +269,7 @@ double ScaleEngine::calcMajorTickUnits(double distance, int* retDecimalPlaces)
|
|||||||
}/*
|
}/*
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
if(retDecimalPlaces != NULL) {
|
if(retDecimalPlaces != 0) {
|
||||||
if(decimalPlaces < 0)
|
if(decimalPlaces < 0)
|
||||||
decimalPlaces = 0;
|
decimalPlaces = 0;
|
||||||
*retDecimalPlaces = decimalPlaces;
|
*retDecimalPlaces = decimalPlaces;
|
||||||
@ -489,7 +489,14 @@ ScaleEngine::ScaleEngine() :
|
|||||||
m_physicalUnit(Unit::None),
|
m_physicalUnit(Unit::None),
|
||||||
m_rangeMin(-1.0),
|
m_rangeMin(-1.0),
|
||||||
m_rangeMax(1.0),
|
m_rangeMax(1.0),
|
||||||
m_recalc(true)
|
m_recalc(true),
|
||||||
|
m_charSize(8),
|
||||||
|
m_numMinorTicks(1),
|
||||||
|
m_decimalPlaces(1),
|
||||||
|
m_size(1.0f),
|
||||||
|
m_firstMajorTickValue(1.0),
|
||||||
|
m_majorTickValueDistance(1.0),
|
||||||
|
m_scale(1.0f)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,32 +21,32 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
template <unsigned int size>
|
template <unsigned int size>
|
||||||
struct BitfieldIndex
|
struct BitfieldIndex
|
||||||
{
|
{
|
||||||
uint32_t v : size;
|
uint32_t v : size;
|
||||||
|
|
||||||
BitfieldIndex() {}
|
BitfieldIndex() : v(0) {}
|
||||||
BitfieldIndex(int i) { v = i; }
|
BitfieldIndex(int i) { v = i; }
|
||||||
|
|
||||||
BitfieldIndex& operator=(const BitfieldIndex& rhs) { v = rhs.v; return *this; }
|
BitfieldIndex& operator=(const BitfieldIndex& rhs) { v = rhs.v; return *this; }
|
||||||
BitfieldIndex& operator=(const int& rhi) { v = rhi; return *this; }
|
BitfieldIndex& operator=(const int& rhi) { v = rhi; return *this; }
|
||||||
BitfieldIndex& operator++() { v++; return *this; }
|
BitfieldIndex& operator++() { v++; return *this; }
|
||||||
BitfieldIndex operator++(int) { BitfieldIndex x(*this); ++(*this); return x; }
|
BitfieldIndex operator++(int) { BitfieldIndex x(*this); ++(*this); return x; }
|
||||||
BitfieldIndex& operator+=(const BitfieldIndex& b) { v += b.v; return *this; }
|
BitfieldIndex& operator+=(const BitfieldIndex& b) { v += b.v; return *this; }
|
||||||
BitfieldIndex& operator-=(const BitfieldIndex& b) { v -= b.v; return *this; }
|
BitfieldIndex& operator-=(const BitfieldIndex& b) { v -= b.v; return *this; }
|
||||||
BitfieldIndex& operator+=(int i) { v += i; return *this; }
|
BitfieldIndex& operator+=(int i) { v += i; return *this; }
|
||||||
BitfieldIndex& operator-=(int i) { v -= i; return *this; }
|
BitfieldIndex& operator-=(int i) { v -= i; return *this; }
|
||||||
BitfieldIndex operator+(const BitfieldIndex& b) const { BitfieldIndex x(*this); x.v += b.v; return x; }
|
BitfieldIndex operator+(const BitfieldIndex& b) const { BitfieldIndex x(*this); x.v += b.v; return x; }
|
||||||
BitfieldIndex operator-(const BitfieldIndex& b) const { BitfieldIndex x(*this); x.v -= b.v; return x; }
|
BitfieldIndex operator-(const BitfieldIndex& b) const { BitfieldIndex x(*this); x.v -= b.v; return x; }
|
||||||
BitfieldIndex operator+(int i) const { BitfieldIndex x(*this); x.v += i; return x; }
|
BitfieldIndex operator+(int i) const { BitfieldIndex x(*this); x.v += i; return x; }
|
||||||
BitfieldIndex operator-(int i) const { BitfieldIndex x(*this); x.v -= i; return x; }
|
BitfieldIndex operator-(int i) const { BitfieldIndex x(*this); x.v -= i; return x; }
|
||||||
|
|
||||||
operator int() const { return v; }
|
operator int() const { return v; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <unsigned int size>
|
template <unsigned int size>
|
||||||
BitfieldIndex<size> operator+(const BitfieldIndex<size> &a, const BitfieldIndex<size> &b) { BitfieldIndex<size> x; x.v = x.a + x.b; return x; }
|
BitfieldIndex<size> operator+(const BitfieldIndex<size> &a, const BitfieldIndex<size> &b) { BitfieldIndex<size> x; x.v = x.a + x.b; return x; }
|
||||||
|
|
||||||
template <unsigned int size>
|
template <unsigned int size>
|
||||||
BitfieldIndex<size> operator-(const BitfieldIndex<size> &a, const BitfieldIndex<size> &b) { BitfieldIndex<size> x; x.v = x.a - x.b; return x; }
|
BitfieldIndex<size> operator-(const BitfieldIndex<size> &a, const BitfieldIndex<size> &b) { BitfieldIndex<size> x; x.v = x.a - x.b; return x; }
|
||||||
|
|
||||||
|
@ -20,7 +20,8 @@
|
|||||||
|
|
||||||
SyncMessenger::SyncMessenger() :
|
SyncMessenger::SyncMessenger() :
|
||||||
m_complete(0),
|
m_complete(0),
|
||||||
m_result(0)
|
m_result(0),
|
||||||
|
m_message(0)
|
||||||
{
|
{
|
||||||
qRegisterMetaType<Message>("Message");
|
qRegisterMetaType<Message>("Message");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user