diff options
author | Max Kellermann <max@duempel.org> | 2013-10-21 22:02:19 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-21 22:02:19 +0200 |
commit | 74904b9cf2fe163c0ae1d53fb73b19826b256812 (patch) | |
tree | 5c7ee7cc1358b897d5734c14bba2f8c704e1c861 /src/CommandLine.cxx | |
parent | 82059645f18e4a8aa734e0a376d10bb52fc1cc7d (diff) | |
download | mpd-74904b9cf2fe163c0ae1d53fb73b19826b256812.tar.gz mpd-74904b9cf2fe163c0ae1d53fb73b19826b256812.tar.xz mpd-74904b9cf2fe163c0ae1d53fb73b19826b256812.zip |
DecoderList: reimplement _for_each() with function object
Diffstat (limited to '')
-rw-r--r-- | src/CommandLine.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/CommandLine.cxx b/src/CommandLine.cxx index 84fb2f5f3..b0dd283a3 100644 --- a/src/CommandLine.cxx +++ b/src/CommandLine.cxx @@ -75,16 +75,16 @@ static void version(void) "\n" "Decoders plugins:"); - decoder_plugins_for_each(plugin) { - printf(" [%s]", plugin->name); + decoder_plugins_for_each([](const DecoderPlugin &plugin){ + printf(" [%s]", plugin.name); - const char *const*suffixes = plugin->suffixes; - if (suffixes != nullptr) - for (; *suffixes != nullptr; ++suffixes) - printf(" %s", *suffixes); + const char *const*suffixes = plugin.suffixes; + if (suffixes != nullptr) + for (; *suffixes != nullptr; ++suffixes) + printf(" %s", *suffixes); - puts(""); - } + puts(""); + }); puts("\n" "Output plugins:"); |