[Commits] [wesnoth/wesnoth] 722f31: Make hotkeys copyable again

GitHub noreply at github.com
Wed Nov 22 06:42:56 UTC 2017


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 722f319c50fe513bd09a402480ff50ab6bed0c99
      https://github.com/wesnoth/wesnoth/commit/722f319c50fe513bd09a402480ff50ab6bed0c99
  Author: Jyrki Vesterinen <sandgtx at gmail.com>
  Date:   2017-11-22 (Wed, 22 Nov 2017)

  Changed paths:
    M src/hotkey/hotkey_command.hpp

  Log Message:
  -----------
  Make hotkeys copyable again

There is barely any point in moving hotkeys because the command is the only
member variable that's both 1) movable and 2) faster to move than copy. In
2cc3f99651c9de13eb36ab0c490996a8dd47e50e, @Vultraz talked about "avoiding hundreds of copies", but
moving isn't necessarily any faster than copying. Seriously, making hotkeys
noncopyable was just a premature and obviously unprofiled optimization.

Besides, this also fixes build on Visual Studio 2013.





More information about the Commits mailing list