[Commits] [wesnoth/wesnoth] 447968: Convert uses of create_rect to aggregate initializ...

GitHub noreply at github.com
Wed May 17 11:41:54 UTC 2017


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

  Changed paths:
    M src/display.cpp
    M src/display.hpp
    M src/editor/action/mouse/mouse_action.cpp
    M src/editor/action/mouse/mouse_action_map_label.cpp
    M src/editor/action/mouse/mouse_action_village.cpp
    M src/editor/palette/tristate_button.cpp
    M src/floating_label.cpp
    M src/floating_textbox.cpp
    M src/font/sdl_ttf.cpp
    M src/gui/core/canvas.cpp
    M src/gui/dialogs/terrain_layers.cpp
    M src/gui/widgets/helper.cpp
    M src/halo.cpp
    M src/minimap.cpp
    M src/sdl/rect.cpp
    M src/sdl/utils.cpp
    M src/units/drawer.cpp
    M src/video.cpp
    M src/widgets/scrollbar.cpp
    M src/widgets/textbox.cpp
    M src/widgets/widget.cpp

  Log Message:
  -----------
  Convert uses of create_rect to aggregate initialization when possible

This only includes cases where this can be done without triggering warnings about narrowing conversion.
Also includes cleanups of sdl/rect.hpp includes.


  Commit: 5e6e8eab6f24723b4ecb6294db49080db0fbeec2
      https://github.com/wesnoth/wesnoth/commit/5e6e8eab6f24723b4ecb6294db49080db0fbeec2
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M src/display.cpp
    M src/display.hpp
    M src/game_display.cpp
    M src/units/drawer.cpp
    M src/units/drawer.hpp

  Log Message:
  -----------
  Made energy_bar_rects static in unit_drawer file (superior version of 1ff1b7fdd)

I reverted the aforementioned commit after being informed it would be inferior, performance-wise.
However, this should solve that as the map is no longer constantly recreated.

This also addresses some issues I had with the original commit where I had to make some member
functions non-const.


Compare: https://github.com/wesnoth/wesnoth/compare/9eae9eac3c30...5e6e8eab6f24


More information about the Commits mailing list