From 0869d3d8fdc9e9de2f1df51c377ddba71a1ce523 Mon Sep 17 00:00:00 2001 From: Pavel Karelin Date: Sat, 16 Dec 2017 22:11:18 +0300 Subject: [PATCH] fix: elimination of warning '-Wreorder' --- src/audio/backend/openal.cpp | 12 ------------ src/audio/backend/openal.h | 18 +++++++++--------- src/model/group.cpp | 4 ++-- src/widget/form/chatform.cpp | 2 +- 4 files changed, 12 insertions(+), 24 deletions(-) diff --git a/src/audio/backend/openal.cpp b/src/audio/backend/openal.cpp index f9eaaa815..5a4ec67b1 100644 --- a/src/audio/backend/openal.cpp +++ b/src/audio/backend/openal.cpp @@ -48,18 +48,6 @@ static const uint32_t AUDIO_CHANNELS = 2; OpenAL::OpenAL() : audioThread{new QThread} - , alInDev{nullptr} - , inSubscriptions{0} - , alOutDev{nullptr} - , alOutContext{nullptr} - , alMainSource{0} - , alMainBuffer{0} - , outputInitialized{false} - , minInGain{-30} - , maxInGain{30} - , minInThreshold{0.0f} - , maxInThreshold{0.4f} - , isActive{false} { // initialize OpenAL error stack alGetError(); diff --git a/src/audio/backend/openal.h b/src/audio/backend/openal.h index 3603b073c..6d3e18d5d 100644 --- a/src/audio/backend/openal.h +++ b/src/audio/backend/openal.h @@ -116,19 +116,19 @@ protected: QThread* audioThread; mutable QMutex audioLock; - ALCdevice* alInDev; - quint32 inSubscriptions; + ALCdevice* alInDev = nullptr; + quint32 inSubscriptions = 0; QTimer captureTimer, playMono16Timer; - ALCdevice* alOutDev; - ALCcontext* alOutContext; - ALuint alMainSource; - ALuint alMainBuffer; - bool outputInitialized; + ALCdevice* alOutDev = nullptr; + ALCcontext* alOutContext = nullptr; + ALuint alMainSource = 0; + ALuint alMainBuffer = 0; + bool outputInitialized = false; QList peerSources; - qreal gain; - qreal gainFactor; + qreal gain = 0; + qreal gainFactor = 1; qreal minInGain = -30; qreal maxInGain = 30; qreal inputThreshold; diff --git a/src/model/group.cpp b/src/model/group.cpp index 662a1bc17..4102f01a0 100644 --- a/src/model/group.cpp +++ b/src/model/group.cpp @@ -31,8 +31,8 @@ static const int MAX_GROUP_TITLE_LENGTH = 128; Group::Group(int groupId, const QString& name, bool isAvGroupchat, const QString& selfName) - : title{name} - , selfName{selfName} + : selfName{selfName} + , title{name} , groupId(groupId) , nPeers{0} , avGroupchat{isAvGroupchat} diff --git a/src/widget/form/chatform.cpp b/src/widget/form/chatform.cpp index 5c08075cb..5c4e9663c 100644 --- a/src/widget/form/chatform.cpp +++ b/src/widget/form/chatform.cpp @@ -111,8 +111,8 @@ QString secondsToDHMS(quint32 duration) ChatForm::ChatForm(Friend* chatFriend, History* history) : f(chatFriend) , callDuration(new QLabel(this)) - , isTyping(false) , history{history} + , isTyping{false} , lastCallIsVideo{false} { setName(f->getDisplayedName());