patch provided by jkohnert, see Ticket #63 Fix compiler warnings on Linux

This commit is contained in:
root 2020-03-29 12:12:13 +02:00
parent 53f50070a7
commit ead042a301
5 changed files with 24 additions and 16 deletions

View file

@ -106,6 +106,10 @@ win32 {
# we want to compile with 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
DEFINES += HAVE_STDINT_H

View file

@ -75,17 +75,17 @@ static OPUS_INLINE float tansig_approx(float x)
return 1;
if (!(x>-8))
return -1;
if (x<0)
{
x=-x;
sign=-1;
}
i = (int)floor(.5f+25*x);
x -= .04f*i;
y = tansig_table[i];
dy = 1-y*y;
y = y + x*dy*(1 - y*x);
return sign*y;
if (x<0)
{
x=-x;
sign=-1;
}
i = (int)floor(.5f+25*x);
x -= .04f*i;
y = tansig_table[i];
dy = 1-y*y;
y = y + x*dy*(1 - y*x);
return sign*y;
}
#endif

View file

@ -536,15 +536,15 @@ void CConnectDlg::SetPingTimeAndNumClientsResult ( CHostAddress&
switch ( ePingTimeLEDColor )
{
case CMultiColorLED::RL_GREEN:
pCurListViewItem->setTextColor ( 1, Qt::darkGreen );
pCurListViewItem->setForeground ( 1, Qt::darkGreen );
break;
case CMultiColorLED::RL_YELLOW:
pCurListViewItem->setTextColor ( 1, Qt::darkYellow );
pCurListViewItem->setForeground ( 1, Qt::darkYellow );
break;
default: // including "CMultiColorLED::RL_RED"
pCurListViewItem->setTextColor ( 1, Qt::red );
pCurListViewItem->setForeground ( 1, Qt::red );
break;
}

View file

@ -62,7 +62,7 @@ private network.
#include <QObject>
#include <QLocale>
#include <QList>
#include <QTimer>
#include <QElapsedTimer>
#include <QMutex>
#include "global.h"
#include "util.h"
@ -116,7 +116,7 @@ public:
public:
// time on which the entry was registered
QTime RegisterTime;
QElapsedTimer RegisterTime;
};
class CServerListManager : public QObject

View file

@ -114,6 +114,8 @@ public:
CVector ( const int iNeSi,
const TData tInVa ) { Init ( iNeSi, tInVa ); }
CVector ( CVector const& ) = default;
void Init ( const int iNewSize );
// use this init to give all elements a defined value
@ -778,6 +780,8 @@ public:
( CompChanInfo.eSkillLevel != eSkillLevel ) );
}
CChannelCoreInfo& operator= ( const CChannelCoreInfo& ) = default;
// fader tag text (channel name)
QString strName;