[wesnoth-commits] [wesnoth/wesnoth] 365f10: Fix multi-line deprecation messages

Steve Cotton noreply at github.com
Sun Jan 5 08:35:36 UTC 2020


  Branch: refs/heads/1.14
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 365f101c8719e464b4ea30ae5ba209f8d7cbf554
      https://github.com/wesnoth/wesnoth/commit/365f101c8719e464b4ea30ae5ba209f8d7cbf554
  Author: Steve Cotton <steve at octalot.co.uk>
  Date:   2020-01-05 (Sun, 05 Jan 2020)

  Changed paths:
    M src/serialization/preprocessor.cpp

  Log Message:
  -----------
  Fix multi-line deprecation messages

Several of the deprecated macros have two or three lines of explanation, but
only the last one was printed. This change fixes a cppcheck warning that the
value of deprecation_detail was overwritten without being used.

For example:

    #define SOUND:POISON
        #deprecated 3 1.15 This was used to play a sound when poisoning a unit, it had to
        #deprecated 3 1.15 be placed inside an attack animation. Now this sound is played
        #deprecated 3 1.15 automatically, there is no other use for this macro.
    #enddef

Ended up printing:

    20191229 21:39:36 error deprecation: SOUND:POISON has been deprecated and will be removed in version 1.15.0.
      automatically, there is no other use for this macro.





More information about the Commits mailing list