From bd212c26d0960e9a29eaf9e628b693d22a62a6ac Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Sun, 13 Jul 2014 17:10:39 +0200 Subject: [PATCH] Fix initializer list order (avoiding compiler warning). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- interface/src/Audio.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/interface/src/Audio.cpp b/interface/src/Audio.cpp index 3689ff0143..6a26563e36 100644 --- a/interface/src/Audio.cpp +++ b/interface/src/Audio.cpp @@ -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);