[Commits] [wesnoth/wesnoth] 1816e1: Remove asserts.hpp

GitHub noreply at github.com
Sun Sep 18 19:58:12 UTC 2016


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 1816e1147f553c075b73c668117fb9833c5987c6
      https://github.com/wesnoth/wesnoth/commit/1816e1147f553c075b73c668117fb9833c5987c6
  Author: Celtic Minstrel <celtic.minstrel.ca at gmail.com>
  Date:   2016-09-18 (Sun, 18 Sep 2016)

  Changed paths:
    M projectfiles/CodeBlocks-SCons/wesnoth.cbp
    M projectfiles/CodeBlocks/wesnoth.cbp
    M projectfiles/VC12/wesnoth.vcxproj
    M projectfiles/VC12/wesnoth.vcxproj.filters
    M projectfiles/Xcode/Wesnoth.xcodeproj/project.pbxproj
    R src/asserts.hpp
    M src/editor/controller/editor_controller.cpp
    M src/global.hpp
    M src/gui/auxiliary/iterator/walker_grid.cpp
    M src/gui/auxiliary/iterator/walker_tree_node.cpp
    M src/gui/auxiliary/iterator/walker_widget.cpp
    M src/gui/core/placer.cpp
    M src/gui/core/window_builder.cpp
    M src/gui/widgets/generator_private.hpp
    M src/gui/widgets/settings.cpp
    M src/storyscreen/controller.cpp
    M src/storyscreen/part.cpp
    M src/storyscreen/render.cpp
    M src/wml_exception.hpp

  Log Message:
  -----------
  Remove asserts.hpp

This file seemed to be some sort of reimplementation of <cassert> except
with some "feature" of trying to force the debugger to hit a breakpoint.
However, any decent debugger already hits a breakpoint with a standard
assert(), and this file really only served to make it harder to see the
actual error when using a Windows console.

Some instances of these macros were replaced with assert(), others with
VALIDATE() which instead throws an exception (and possibly puts up a
dialog, if the exception is caught before main()).

A few other related changes that got mixed in:
- Several error conditions now have a better error message (or indeed
  any error message at all)
- Removed an unnecessary use of std::distance on a Boost iterator range.
- Removed a large chunk of code which did nothing but construct a widget
  builder and then crash; the code was unreachable since an earlier loop
  did the same thing (without crashing), and the comment seems to suggest
  that it was a (seemingly no longer necessary) workaround for some buggy
  compilers / linkers.
- noreturn added to the list of compatibilty C++11 features in global.hpp
  (Of supported compilers, only VC12 lacks the new [[attribute]] syntax.)
- Fix detection of GCC in global.hpp

# Conflicts:
#	src/gui/widgets/settings.cpp


  Commit: a63903cca047fe179adaa632422d98042377f912
      https://github.com/wesnoth/wesnoth/commit/a63903cca047fe179adaa632422d98042377f912
  Author: Celtic Minstrel <celtic.minstrel.ca at gmail.com>
  Date:   2016-09-18 (Sun, 18 Sep 2016)

  Changed paths:
    M src/gui/core/window_builder.cpp
    M src/gui/widgets/generator.cpp
    M src/gui/widgets/generator_private.hpp
    M src/gui/widgets/settings.cpp
    M src/gui/widgets/tree_view_node.cpp

  Log Message:
  -----------
  Use FAIL() instead of VALIDATE(false)


Compare: https://github.com/wesnoth/wesnoth/compare/376d45a292fd...a63903cca047


More information about the Commits mailing list