fix compiler warnings
This commit is contained in:
parent
69290835b8
commit
3b4eb7f605
2 changed files with 22 additions and 18 deletions
|
@ -46,7 +46,7 @@ CHighPrecisionTimer::CHighPrecisionTimer() :
|
||||||
(uint64_t) timeBaseInfo.numer;
|
(uint64_t) timeBaseInfo.numer;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHighPrecisionTimer::start()
|
void CHighPrecisionTimer::Start()
|
||||||
{
|
{
|
||||||
// only start if not already running
|
// only start if not already running
|
||||||
if ( !bRun )
|
if ( !bRun )
|
||||||
|
@ -62,7 +62,7 @@ void CHighPrecisionTimer::start()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHighPrecisionTimer::stop()
|
void CHighPrecisionTimer::Stop()
|
||||||
{
|
{
|
||||||
// set flag so that thread can leave the main loop
|
// set flag so that thread can leave the main loop
|
||||||
bRun = false;
|
bRun = false;
|
||||||
|
@ -121,7 +121,7 @@ CHighPrecisionTimer::CHighPrecisionTimer()
|
||||||
this, SLOT ( OnTimer() ) );
|
this, SLOT ( OnTimer() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHighPrecisionTimer::start()
|
void CHighPrecisionTimer::Start()
|
||||||
{
|
{
|
||||||
// reset position pointer and counter
|
// reset position pointer and counter
|
||||||
iCurPosInVector = 0;
|
iCurPosInVector = 0;
|
||||||
|
@ -131,7 +131,7 @@ void CHighPrecisionTimer::start()
|
||||||
Timer.start ( 2 );
|
Timer.start ( 2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHighPrecisionTimer::stop()
|
void CHighPrecisionTimer::Stop()
|
||||||
{
|
{
|
||||||
// stop timer
|
// stop timer
|
||||||
Timer.stop();
|
Timer.stop();
|
||||||
|
@ -349,7 +349,7 @@ void CServer::Start()
|
||||||
if ( !IsRunning() )
|
if ( !IsRunning() )
|
||||||
{
|
{
|
||||||
// start timer
|
// start timer
|
||||||
HighPrecisionTimer.start();
|
HighPrecisionTimer.Start();
|
||||||
|
|
||||||
// init time for response time evaluation
|
// init time for response time evaluation
|
||||||
CycleTimeVariance.Reset();
|
CycleTimeVariance.Reset();
|
||||||
|
@ -359,7 +359,7 @@ void CServer::Start()
|
||||||
void CServer::Stop()
|
void CServer::Stop()
|
||||||
{
|
{
|
||||||
// stop timer
|
// stop timer
|
||||||
HighPrecisionTimer.stop();
|
HighPrecisionTimer.Stop();
|
||||||
|
|
||||||
// logging (add "server stopped" logging entry)
|
// logging (add "server stopped" logging entry)
|
||||||
Logging.AddServerStopped();
|
Logging.AddServerStopped();
|
||||||
|
@ -758,6 +758,11 @@ bool CServer::PutData ( const CVector<uint8_t>& vecbyRecBuf,
|
||||||
case PS_PROT_OK_MESS_NOT_EVALUATED:
|
case PS_PROT_OK_MESS_NOT_EVALUATED:
|
||||||
bIsNotEvaluatedProtocolMessage = true; // set flag
|
bIsNotEvaluatedProtocolMessage = true; // set flag
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case PS_GEN_ERROR:
|
||||||
|
case PS_PROT_OK:
|
||||||
|
// for these cases, do nothing
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
23
src/server.h
23
src/server.h
|
@ -55,8 +55,8 @@ class CHighPrecisionTimer : public QThread
|
||||||
public:
|
public:
|
||||||
CHighPrecisionTimer();
|
CHighPrecisionTimer();
|
||||||
|
|
||||||
void start();
|
void Start();
|
||||||
void stop();
|
void Stop();
|
||||||
bool isActive() { return bRun; }
|
bool isActive() { return bRun; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -78,8 +78,8 @@ class CHighPrecisionTimer : public QObject
|
||||||
public:
|
public:
|
||||||
CHighPrecisionTimer();
|
CHighPrecisionTimer();
|
||||||
|
|
||||||
void start();
|
void Start();
|
||||||
void stop();
|
void Stop();
|
||||||
bool isActive() const { return Timer.isActive(); }
|
bool isActive() const { return Timer.isActive(); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -157,6 +157,13 @@ protected:
|
||||||
|
|
||||||
CVector<QString> vstrChatColors;
|
CVector<QString> vstrChatColors;
|
||||||
|
|
||||||
|
// actual working objects
|
||||||
|
CSocket Socket;
|
||||||
|
CCycleTimeVariance CycleTimeVariance;
|
||||||
|
|
||||||
|
// logging
|
||||||
|
CServerLogging Logging;
|
||||||
|
|
||||||
// HTML file server status
|
// HTML file server status
|
||||||
bool bWriteStatusHTMLFile;
|
bool bWriteStatusHTMLFile;
|
||||||
QString strServerHTMLFileListName;
|
QString strServerHTMLFileListName;
|
||||||
|
@ -165,14 +172,6 @@ protected:
|
||||||
CHighPrecisionTimer HighPrecisionTimer;
|
CHighPrecisionTimer HighPrecisionTimer;
|
||||||
CVector<short> vecsSendData;
|
CVector<short> vecsSendData;
|
||||||
|
|
||||||
// actual working objects
|
|
||||||
CSocket Socket;
|
|
||||||
|
|
||||||
CCycleTimeVariance CycleTimeVariance;
|
|
||||||
|
|
||||||
// logging
|
|
||||||
CServerLogging Logging;
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void OnTimer();
|
void OnTimer();
|
||||||
void OnSendProtMessage ( int iChID, CVector<uint8_t> vecMessage );
|
void OnSendProtMessage ( int iChID, CVector<uint8_t> vecMessage );
|
||||||
|
|
Loading…
Add table
Reference in a new issue