Static analysis related fixes

This commit is contained in:
Charles J. Cliffe
2016-03-30 19:34:36 -04:00
parent e0df7cb41d
commit f22ef685f5
6 changed files with 36 additions and 22 deletions
+4 -2
View File
@@ -20,11 +20,13 @@ AudioThread::AudioThread() : IOThread(),
outputDevice.store(-1);
gain.store(1.0);
boundThreads.store(new std::vector<AudioThread *>);
vBoundThreads = new std::vector<AudioThread *>;
boundThreads.store(vBoundThreads);
}
AudioThread::~AudioThread() {
delete boundThreads.load();
boundThreads.store(nullptr);
delete vBoundThreads;
}
void AudioThread::bindThread(AudioThread *other) {
+1
View File
@@ -100,5 +100,6 @@ public:
static void deviceCleanup();
static void setDeviceSampleRate(int deviceId, int sampleRate);
std::atomic<std::vector<AudioThread *> *> boundThreads;
std::vector<AudioThread *> *vBoundThreads;
};