[Commits] [wesnoth/wesnoth] 79ca2a: Deployed a few more cases of std::map::emplace

GitHub noreply at github.com
Sat May 6 11:20:37 UTC 2017


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 79ca2aaff4877413ffeb6496d14d8bf3f22ca2bc
      https://github.com/wesnoth/wesnoth/commit/79ca2aaff4877413ffeb6496d14d8bf3f22ca2bc
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-05-06 (Sat, 06 May 2017)

  Changed paths:
    M src/ai/composite/aspect.hpp
    M src/ai/composite/engine.hpp
    M src/ai/composite/goal.hpp
    M src/ai/composite/rca.hpp
    M src/ai/composite/stage.hpp
    M src/ai/contexts.cpp
    M src/ai/default/attack.cpp

  Log Message:
  -----------
  Deployed a few more cases of std::map::emplace

I missed these since somehow the make_pair calls were missing the std namespace specifier.


  Commit: 8f610ec2074b0396400703bea0e1e9d06f4ed2a3
      https://github.com/wesnoth/wesnoth/commit/8f610ec2074b0396400703bea0e1e9d06f4ed2a3
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-05-06 (Sat, 06 May 2017)

  Changed paths:
    M src/units/types.cpp
    M src/units/types.hpp

  Log Message:
  -----------
  Removed unnecessary unit_type_data::insert wrapper

Again, std::map::emplace can be used, though TBH insert could just as well have been used inline
so I have absolutely no idea why this function existed except to obfuscate things.


Compare: https://github.com/wesnoth/wesnoth/compare/7d68b4ffba8c...8f610ec2074b


More information about the Commits mailing list