From 63d057dbc6e6308738f28b767a59c4a503810c2f Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sat, 3 Aug 2013 14:29:48 -0400 Subject: directly construct maps/structs via initializer list --- ponymix.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ponymix.cc b/ponymix.cc index 18ddd21..5da741e 100644 --- a/ponymix.cc +++ b/ponymix.cc @@ -88,7 +88,7 @@ static const char* type_to_string(enum DeviceType t) { } static enum DeviceType string_to_devtype_or_die(const char* str) { - static std::map typemap = { + static std::map typemap{ { "sink", DEVTYPE_SINK }, { "source", DEVTYPE_SOURCE }, { "sink-input", DEVTYPE_SINK_INPUT }, @@ -428,7 +428,7 @@ static int Kill(PulseClient& ponymix, int, char*[]) { static const std::pair& string_to_command( const char* str) { - static std::map actionmap = { + static std::map actionmap{ // command name function arg min arg max { "defaults", { ShowDefaults, { 0, 0 } } }, { "list", { List, { 0, 0 } } }, @@ -573,7 +573,7 @@ static int CommandDispatch(PulseClient& ponymix, int argc, char *argv[]) { } bool parse_options(int argc, char** argv) { - static const struct option opts[] = { + static const struct option opts[]{ { "card", required_argument, 0, 'c' }, { "device", required_argument, 0, 'd' }, { "help", no_argument, 0, 'h' }, -- cgit v1.2.3