[Commits] [wesnoth/wesnoth] cdaa58: Refactor variable_info implementation

GitHub noreply at github.com
Mon May 15 06:33:44 UTC 2017


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

  Changed paths:
    M src/variable_info.cpp
    M src/variable_info.hpp
    M src/variable_info_detail.hpp
    A src/variable_info_private.hpp

  Log Message:
  -----------
  Refactor variable_info implementation

First off, this doesn't touch the actual functionality of variable_info. Instead, it refactors how its all
put together:

* Comments have been cleaned up and improved.
* Formatting has been fixed.
* Class/type names have been improved.
* All info visitor and range helpers have been moved to a separate file.
* apply_visitor now takes a parameter pack and owns its own visitor object.
* as_range_visitor_base now takes a parameter pack and owns its own handler object
* The variable_info policy types have been split into their own helper classes and their respective functionality
  implemented with static functions. This makes it clearer exactly how each policy works.
* Simplified the use of type traits. The weird enable_if_non_const metastruct has been removed and a static_assert
  added to ensure variable_info_mutable is specialized correctly.


  Commit: 08cd81401f2a3a2a153fccfba60dc52d9122cf66
      https://github.com/wesnoth/wesnoth/commit/08cd81401f2a3a2a153fccfba60dc52d9122cf66
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-05-15 (Mon, 15 May 2017)

  Changed paths:
    M src/variable_info_private.hpp

  Log Message:
  -----------
  Variable Info: convert uses of C-style cast


Compare: https://github.com/wesnoth/wesnoth/compare/4f888e20730f...08cd81401f2a


More information about the Commits mailing list