diff options
author | Max Kellermann <max@duempel.org> | 2013-12-03 10:51:50 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-12-03 10:51:50 +0100 |
commit | 12b6c6ccf7311e09e7cfdc8c5c9c4e244f18b8ff (patch) | |
tree | 4e0bc17872dfea4d714bf62a99767493e9eed225 | |
parent | eeeef3eab5aec6362094239138843476f31a2b53 (diff) | |
download | mpd-12b6c6ccf7311e09e7cfdc8c5c9c4e244f18b8ff.tar.gz mpd-12b6c6ccf7311e09e7cfdc8c5c9c4e244f18b8ff.tar.xz mpd-12b6c6ccf7311e09e7cfdc8c5c9c4e244f18b8ff.zip |
OutputAll: use new[]/delete[] instead of g_new()/g_free()
-rw-r--r-- | src/OutputAll.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/OutputAll.cxx b/src/OutputAll.cxx index d167a80cd..8cbfb6e23 100644 --- a/src/OutputAll.cxx +++ b/src/OutputAll.cxx @@ -33,8 +33,6 @@ #include "ConfigOption.hxx" #include "notify.hxx" -#include <glib.h> - #include <assert.h> #include <string.h> @@ -110,7 +108,7 @@ audio_output_all_init(PlayerControl &pc) Error error; 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; @@ -160,7 +158,7 @@ audio_output_all_finish(void) audio_output_finish(audio_outputs[i]); } - g_free(audio_outputs); + delete[] audio_outputs; audio_outputs = nullptr; num_audio_outputs = 0; } |