Commit 12b6c6cc authored by Max Kellermann's avatar Max Kellermann

OutputAll: use new[]/delete[] instead of g_new()/g_free()

parent eeeef3ea
...@@ -33,8 +33,6 @@ ...@@ -33,8 +33,6 @@
#include "ConfigOption.hxx" #include "ConfigOption.hxx"
#include "notify.hxx" #include "notify.hxx"
#include <glib.h>
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
...@@ -110,7 +108,7 @@ audio_output_all_init(PlayerControl &pc) ...@@ -110,7 +108,7 @@ audio_output_all_init(PlayerControl &pc)
Error error; Error error;
num_audio_outputs = audio_output_config_count(); num_audio_outputs = audio_output_config_count();
audio_outputs = g_new(struct audio_output *, num_audio_outputs); audio_outputs = new audio_output *[num_audio_outputs];
const config_param empty; const config_param empty;
...@@ -160,7 +158,7 @@ audio_output_all_finish(void) ...@@ -160,7 +158,7 @@ audio_output_all_finish(void)
audio_output_finish(audio_outputs[i]); audio_output_finish(audio_outputs[i]);
} }
g_free(audio_outputs); delete[] audio_outputs;
audio_outputs = nullptr; audio_outputs = nullptr;
num_audio_outputs = 0; num_audio_outputs = 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment