[wesnoth-commits] [wesnoth/wesnoth] eabf93: Fix Wdeprecated-copy in wfl::variant, and add move...

Steve Cotton noreply at github.com
Mon Jul 15 22:53:50 UTC 2019


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: eabf933c8e501a4ca1440ec55277c44d1a2eb14e
      https://github.com/wesnoth/wesnoth/commit/eabf933c8e501a4ca1440ec55277c44d1a2eb14e
  Author: Steve Cotton <steve at octalot.co.uk>
  Date:   2019-07-16 (Tue, 16 Jul 2019)

  Changed paths:
    M src/formula/variant.cpp
    M src/formula/variant.hpp

  Log Message:
  -----------
  Fix Wdeprecated-copy in wfl::variant, and add move operations

Fixes the majority of the warnings in issue #4166.

This class already shared copies of value_ between instances,
it seems to be the immutable design pattern so can share from
const to non-const instances safely.

Cherry-picking this to 1.14 needs a trivial conflict to be
resolved, the next line in the .cpp file has changed from
size_t in 1.14 to std::size_t in 1.15.





More information about the Commits mailing list