| 72 | } |
| 73 | |
| 74 | std::vector<Macro> MacroRegistry::ListMacros() const { |
| 75 | std::vector<Macro> macros; |
| 76 | macros.reserve(macros_.size()); |
| 77 | for (auto it = macros_.begin(); it != macros_.end(); ++it) { |
| 78 | macros.push_back(it->second); |
| 79 | } |
| 80 | return macros; |
| 81 | } |
| 82 | |
| 83 | bool MacroRegistry::RegisterMacroImpl(const Macro& macro) { |
| 84 | return macros_.insert(std::pair{macro.key(), macro}).second; |