Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // FROM
- //
- struct modevents_entry_for
- {
- // This typedef is used by boost.
- typedef modevents_entry result_type;
- modevents_entry_for(const std::string& type)
- : type_(type)
- {
- }
- modevents_entry operator()(const std::string& id) const
- {
- return modevents_entry(type_, id);
- }
- private:
- std::string type_;
- };
- boost::copy(mp_settings_.active_mods | boost::adaptors::transformed(modevents_entry_for("modification")),
- std::back_inserter(mods));
- //
- // TO
- //
- std::transform(mp_settings_.active_mods.begin(), mp_settings_.active_mods.end(), std::back_inserter(mods),
- [](const std::string& id) { return modevents_entry("modification", id); }
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement