Previously:
constexpr vTYPEptr{};
constexpr vcTYPEptr{};
Now:
__attribute_unused static vTYPEptr{};
constexpr vcTYPEptr{}; // unchanged from above
This is necessary for future work. It should have no user observable
effects for now.
Use a compound statement to cache the success condition as a local
boolean, then reference the local in the macro expansions. This should
hint to the optimizer that this is always the same expression, which
should encourage it not to repeat the test in the generated code.
Actual results vary. x86_64-pc-linux-gnu-g++-5.4.0 generates code that
is bigger, but uses fewer instructions.
There are two callers for wall_close_door_num. The editor calls it in a
loop for all doors, so copying each active_door is wasteful since none
will survive the end of the loop. Move the copy loop into the caller
that removes elements selectively.
This makes no attempt to fix the bugs associated with changing
Num_open_doors while iterating with Num_open_doors as an upper bound.
Move DXX_VERSION_SEQ from DXXProgram to DXXCommon to make it visible to
DXXArchive.configure_environment(). If pch is enabled, define
DXX_VERSION_SEQ in dxxsconf.h and remove it from the command line. This
fixes a build failure where gcc ignored ownpch.cpp.gch because it was
built without DXX_VERSION_SEQ, but some files were built with
DXX_VERSION_SEQ.
Kreator reported an uninitialized value crash when robots fired homing
weapons. No path assigned a value for track_goal, so it had a default
value of 0 (non-poison builds) or 0xfdfd (poison builds). Assign it a
value of object_none when the created weapon is a homing weapon. Leave
it unassigned for non-homing weapons, since those should never examine
track_goal.
Reported-by: kreatordxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/274>