diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-04-18 19:25:22 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-04-18 19:25:22 +0200 |
commit | 30c2141182f4eed1d3549603a7aa92c57b35d129 (patch) | |
tree | 914f3e0ecd12072da94ce4b4865abb0c08ad1856 /src/parse.cpp | |
parent | 96d622144919a84508cf50eba1b1328ca44d1fed (diff) | |
download | solar-30c2141182f4eed1d3549603a7aa92c57b35d129.tar solar-30c2141182f4eed1d3549603a7aa92c57b35d129.zip |
Replace all make_pair calls with initializer lists
Diffstat (limited to 'src/parse.cpp')
-rw-r--r-- | src/parse.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/parse.cpp b/src/parse.cpp index 0d8d417..88245bf 100644 --- a/src/parse.cpp +++ b/src/parse.cpp @@ -48,15 +48,15 @@ void parse_free(parse_context_t *parser, void (*free_func)(void *)) { static inline void parse_reduce_3(std::string *nonterm, std::string *type, __attribute__((unused)) grammar_t *grammar) { - grammar->nonterm_types.insert(std::make_pair(*nonterm, *type)); + grammar->nonterm_types.insert({*nonterm, *type}); } static inline void parse_reduce_4(symbol_t *term, std::string *type, std::string *name, __attribute__((unused)) grammar_t *grammar) { - grammar->term_types.insert(std::make_pair(*term, std::make_pair(*type, *name))); + grammar->term_types.insert({*term, {*type, *name}}); } static inline void parse_reduce_5(symbol_t *sym, std::string *name, __attribute__((unused)) grammar_t *grammar) { - grammar->destructors.insert(std::make_pair(*sym, *name)); + grammar->destructors.insert({*sym, *name}); } static inline void parse_reduce_6(std::vector<std::string> *ns, __attribute__((unused)) grammar_t *grammar) { @@ -72,7 +72,7 @@ static inline void parse_reduce_8(std::string *block, __attribute__((unused)) gr } static inline void parse_reduce_9(std::string *type, std::string *name, __attribute__((unused)) grammar_t *grammar) { - grammar->extra_args.push_back(std::make_pair(*type, *name)); + grammar->extra_args.emplace_back(*type, *name); } static inline void parse_reduce_10(std::string *lhs, rhs_t *rhs, std::string *action, __attribute__((unused)) grammar_t *grammar) { |