From 08f22f1cf0e0d133b7ea763dc3886cf462c6fcb2 Mon Sep 17 00:00:00 2001 From: "Wilson E. Alvarez" Date: Sat, 8 Dec 2018 15:07:33 -0500 Subject: Moved member variables to initializer list --- drivers/pulseaudio/audio_driver_pulseaudio.cpp | 47 +++++++++++--------------- 1 file changed, 20 insertions(+), 27 deletions(-) (limited to 'drivers/pulseaudio') diff --git a/drivers/pulseaudio/audio_driver_pulseaudio.cpp b/drivers/pulseaudio/audio_driver_pulseaudio.cpp index 720824d451..4988557dcb 100644 --- a/drivers/pulseaudio/audio_driver_pulseaudio.cpp +++ b/drivers/pulseaudio/audio_driver_pulseaudio.cpp @@ -743,35 +743,28 @@ String AudioDriverPulseAudio::capture_get_device() { return name; } -AudioDriverPulseAudio::AudioDriverPulseAudio() { - - pa_ml = NULL; - pa_ctx = NULL; - pa_str = NULL; - pa_rec_str = NULL; - - mutex = NULL; - thread = NULL; - - device_name = "Default"; - new_device = "Default"; - default_device = ""; - +AudioDriverPulseAudio::AudioDriverPulseAudio() : + thread(NULL), + mutex(NULL), + pa_ml(NULL), + pa_ctx(NULL), + pa_str(NULL), + pa_rec_str(NULL), + device_name("Default"), + new_device("Default"), + default_device(""), + mix_rate(0), + buffer_frames(0), + pa_buffer_size(0), + channels(0), + pa_ready(0), + pa_status(0), + active(false), + thread_exited(false), + exit_thread(false), + latency(0) { samples_in.clear(); samples_out.clear(); - - mix_rate = 0; - buffer_frames = 0; - pa_buffer_size = 0; - channels = 0; - pa_ready = 0; - pa_status = 0; - - active = false; - thread_exited = false; - exit_thread = false; - - latency = 0; } AudioDriverPulseAudio::~AudioDriverPulseAudio() { -- cgit v1.2.3