From 74904b9cf2fe163c0ae1d53fb73b19826b256812 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 21 Oct 2013 22:02:19 +0200 Subject: DecoderList: reimplement _for_each() with function object --- src/CommandLine.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/CommandLine.cxx') 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:"); -- cgit v1.2.3