patch provided by jkohnert, see Ticket #63 Fix compiler warnings on Linux
This commit is contained in:
parent
53f50070a7
commit
ead042a301
5 changed files with 24 additions and 16 deletions
|
@ -106,6 +106,10 @@ win32 {
|
||||||
# we want to compile with C++11
|
# we want to compile with C++11
|
||||||
QMAKE_CXXFLAGS += -std=c++11
|
QMAKE_CXXFLAGS += -std=c++11
|
||||||
|
|
||||||
|
# we assume to have lrintf() one moderately modern linux distributions
|
||||||
|
# would be better to have that tested, though
|
||||||
|
DEFINES += HAVE_LRINTF
|
||||||
|
|
||||||
# we assume that stdint.h is always present in a Linux system
|
# we assume that stdint.h is always present in a Linux system
|
||||||
DEFINES += HAVE_STDINT_H
|
DEFINES += HAVE_STDINT_H
|
||||||
|
|
||||||
|
|
|
@ -75,17 +75,17 @@ static OPUS_INLINE float tansig_approx(float x)
|
||||||
return 1;
|
return 1;
|
||||||
if (!(x>-8))
|
if (!(x>-8))
|
||||||
return -1;
|
return -1;
|
||||||
if (x<0)
|
if (x<0)
|
||||||
{
|
{
|
||||||
x=-x;
|
x=-x;
|
||||||
sign=-1;
|
sign=-1;
|
||||||
}
|
}
|
||||||
i = (int)floor(.5f+25*x);
|
i = (int)floor(.5f+25*x);
|
||||||
x -= .04f*i;
|
x -= .04f*i;
|
||||||
y = tansig_table[i];
|
y = tansig_table[i];
|
||||||
dy = 1-y*y;
|
dy = 1-y*y;
|
||||||
y = y + x*dy*(1 - y*x);
|
y = y + x*dy*(1 - y*x);
|
||||||
return sign*y;
|
return sign*y;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -536,15 +536,15 @@ void CConnectDlg::SetPingTimeAndNumClientsResult ( CHostAddress&
|
||||||
switch ( ePingTimeLEDColor )
|
switch ( ePingTimeLEDColor )
|
||||||
{
|
{
|
||||||
case CMultiColorLED::RL_GREEN:
|
case CMultiColorLED::RL_GREEN:
|
||||||
pCurListViewItem->setTextColor ( 1, Qt::darkGreen );
|
pCurListViewItem->setForeground ( 1, Qt::darkGreen );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMultiColorLED::RL_YELLOW:
|
case CMultiColorLED::RL_YELLOW:
|
||||||
pCurListViewItem->setTextColor ( 1, Qt::darkYellow );
|
pCurListViewItem->setForeground ( 1, Qt::darkYellow );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default: // including "CMultiColorLED::RL_RED"
|
default: // including "CMultiColorLED::RL_RED"
|
||||||
pCurListViewItem->setTextColor ( 1, Qt::red );
|
pCurListViewItem->setForeground ( 1, Qt::red );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ private network.
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QLocale>
|
#include <QLocale>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QTimer>
|
#include <QElapsedTimer>
|
||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
@ -116,7 +116,7 @@ public:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// time on which the entry was registered
|
// time on which the entry was registered
|
||||||
QTime RegisterTime;
|
QElapsedTimer RegisterTime;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CServerListManager : public QObject
|
class CServerListManager : public QObject
|
||||||
|
|
|
@ -114,6 +114,8 @@ public:
|
||||||
CVector ( const int iNeSi,
|
CVector ( const int iNeSi,
|
||||||
const TData tInVa ) { Init ( iNeSi, tInVa ); }
|
const TData tInVa ) { Init ( iNeSi, tInVa ); }
|
||||||
|
|
||||||
|
CVector ( CVector const& ) = default;
|
||||||
|
|
||||||
void Init ( const int iNewSize );
|
void Init ( const int iNewSize );
|
||||||
|
|
||||||
// use this init to give all elements a defined value
|
// use this init to give all elements a defined value
|
||||||
|
@ -778,6 +780,8 @@ public:
|
||||||
( CompChanInfo.eSkillLevel != eSkillLevel ) );
|
( CompChanInfo.eSkillLevel != eSkillLevel ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CChannelCoreInfo& operator= ( const CChannelCoreInfo& ) = default;
|
||||||
|
|
||||||
// fader tag text (channel name)
|
// fader tag text (channel name)
|
||||||
QString strName;
|
QString strName;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue