diff options
author | Dave Reisner <dreisner@archlinux.org> | 2013-08-03 14:29:48 -0400 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2013-08-03 14:29:59 -0400 |
commit | 63d057dbc6e6308738f28b767a59c4a503810c2f (patch) | |
tree | 0e341c8b9d8308c99621efb07dc10bbb342b4dca | |
parent | b24c6ad25c7ed0a08b13b8ee0648b5c6976eda18 (diff) | |
download | mirror-ponymix-63d057dbc6e6308738f28b767a59c4a503810c2f.tar.gz mirror-ponymix-63d057dbc6e6308738f28b767a59c4a503810c2f.tar.bz2 mirror-ponymix-63d057dbc6e6308738f28b767a59c4a503810c2f.zip |
directly construct maps/structs via initializer list
-rw-r--r-- | ponymix.cc | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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<string, enum DeviceType> typemap = { + static std::map<string, enum DeviceType> 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<const string, const Command>& string_to_command( const char* str) { - static std::map<string, const Command> actionmap = { + static std::map<string, const Command> 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' }, |