Fix initializer list order (avoiding compiler warning).

This patch fixes the compiler warning:

In file included from /opt/highfidelity/hifi/hifi/interface/src/Application.h:45:0,
                 from /opt/highfidelity/hifi/hifi/interface/src/Audio.cpp:42:
/opt/highfidelity/hifi/hifi/interface/src/Audio.h: In constructor ‘Audio::Audio(int16_t, QObject*)’:
/opt/highfidelity/hifi/hifi/interface/src/Audio.h:268:30: warning: ‘Audio::_interframeTimeGapStats’ will be initialized after [-Wreorder]
/opt/highfidelity/hifi/hifi/interface/src/Audio.h:259:9: warning:   ‘int Audio::_starveCount’ [-Wreorder]
/opt/highfidelity/hifi/hifi/interface/src/Audio.cpp:63:1: warning:   when initialized here [-Wreorder]

by fixing the initializer list of class Audio.

Note that I omitted _audioMixerAvatarStreamAudioStats() - which is a default constructor
that is called anyway (it's the default!) and therefore doesn't belong in the initializer list.
This commit is contained in:
Aleric Inglewood 2014-07-13 17:10:39 +02:00 committed by Carlo Wood
parent 27cdcd9ada
commit bd212c26d0

View file

@ -112,12 +112,11 @@ Audio::Audio(int16_t initialJitterBufferSamples, QObject* parent) :
_scopeInput(0),
_scopeOutputLeft(0),
_scopeOutputRight(0),
_audioMixerAvatarStreamAudioStats(),
_starveCount(0),
_consecutiveNotMixedCount(0),
_outgoingAvatarAudioSequenceNumber(0),
_incomingMixedAudioSequenceNumberStats(INCOMING_SEQ_STATS_HISTORY_LENGTH),
_interframeTimeGapStats(TIME_GAPS_STATS_INTERVAL_SAMPLES, TIME_GAP_STATS_WINDOW_INTERVALS),
_starveCount(0),
_consecutiveNotMixedCount(0)
_interframeTimeGapStats(TIME_GAPS_STATS_INTERVAL_SAMPLES, TIME_GAP_STATS_WINDOW_INTERVALS)
{
// clear the array of locally injected samples
memset(_localProceduralSamples, 0, NETWORK_BUFFER_LENGTH_BYTES_PER_CHANNEL);