[Commits] [wesnoth/wesnoth] 0af91c: Avoid unnecessary copying when fetching variant va...

GitHub noreply at github.com
Sun Apr 2 17:39:35 UTC 2017


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 0af91c4990e5b839d85b2899c3e9e03dfc28d9a9
      https://github.com/wesnoth/wesnoth/commit/0af91c4990e5b839d85b2899c3e9e03dfc28d9a9
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-04-03 (Mon, 03 Apr 2017)

  Changed paths:
    M src/formula/variant_value.hpp

  Log Message:
  -----------
  Avoid unnecessary copying when fetching variant value type

With a simple enum it would be acceptable to create a new copy every time this is called. However, given that VARIANT_TYPE
is a more complex struct generated yb MAKE_ENUM, it makes sense to keep the creation/copying to a minimum.





More information about the Commits mailing list