From ec42967996ccab21e5390e218703f6c9480f9ebf Mon Sep 17 00:00:00 2001 From: lethosor Date: Fri, 22 Apr 2016 19:43:05 -0400 Subject: [PATCH] Use std::make_pair instead of initializer lists --- plugins/zone.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/plugins/zone.cpp b/plugins/zone.cpp index 59e833c43..05da93fa2 100644 --- a/plugins/zone.cpp +++ b/plugins/zone.cpp @@ -77,10 +77,12 @@ #include "df/viewscreen_dwarfmodest.h" #include "modules/Translation.h" -using std::vector; +using std::make_pair; +using std::string; using std::unordered_map; using std::unordered_set; -using std::string; +using std::vector; + using namespace DFHack; using namespace DFHack::Units; using namespace DFHack::Buildings; @@ -1464,10 +1466,10 @@ pair> createMaxAgeFilter(vector &filte unordered_map>(vector&)>>> zone_param_filters; static struct zone_param_filters_init { zone_param_filters_init() { - zone_param_filters["race"] = { 1, createRaceFilter }; - zone_param_filters["age"] = { 1, createAgeFilter }; - zone_param_filters["minage"] = { 1, createMinAgeFilter }; - zone_param_filters["maxage"] = { 1, createMaxAgeFilter }; + zone_param_filters["race"] = make_pair(1, createRaceFilter); + zone_param_filters["age"] = make_pair(1, createAgeFilter); + zone_param_filters["minage"] = make_pair(1, createMinAgeFilter); + zone_param_filters["maxage"] = make_pair(1, createMaxAgeFilter); }} zone_param_filters_init_; command_result df_zone (color_ostream &out, vector & parameters)