In gcc-7, expressions on the false path of `if constexpr` are deleted
before they are considered "used", so a variable that is only used on a
deleted path is reported as an unused variable. Add an alternate path
that casts the variable to void so that it is always used.
Prior to this, an xrange always started at the begin term and
incremented by 1 per step until it reached the end term. There was no
support for a step size other than 1. Add support for custom step size.
It is the caller's responsibility to pick a step size that will
eventually lead to (iter != end) evaluating to false.
Add RAII wrappers for unmounting PHYSFS paths. Use them in places that
previously handled unmounting explicitly. Also, use it for descent.hog
/ descent2.hog, which previously were left mounted indefinitely.
Some callers will need access to the computed path. Change the callers
to pass in a buffer for this path, and have PHYSFSX_addRelToSearchPath
fill that buffer directly.
gr_init_bitmap can be passed a pointer to uninitialized memory, and
will save that pointer into the bitmap for the underlying memory to be
initialized later. In gcc-11, this triggers a warning because the
`const` qualifier leads gcc to expect that the memory will only be read
(while uninitialized) and not written.
Reported-by: TheDemonicSurfer <https://github.com/dxx-rebirth/dxx-rebirth/issues/593>
OGL layer used for rendering surfaces, so using left/right viewports absent stereo quad buffers.
Using legacy Descent +/- eye offset method for left/right stereo perspective rendering passes.
These are not necessary for proper compilation, but are included so that
a mismatch between the forward declaration and the definition will be
diagnosed immediately.
PHYSFSX_isNewPath retrieves from PhysFS a list of all paths, then
searches them, and frees them at the end. PhysFS can search its own
list without needing the allocations, so delegate the work to it.
Previously, if the background failed to load, the kmatrix window was
immediately aborted. Change the logic so that a failure to load uses a
blank black background, but still shows the kmatrix window.
Once the loop has determined a vertex is used at least twice, there is
no need to count how many more times it is used. Return immediately
after detecting the second use.
- Make it static
- Remove the update of Num_vertices, since the caller reverses that
update.
- Remove the reversal, since it is no longer needed.
- Remove the test and update of Vertices.count, because the caller
always passes a vertex number that makes the test false.
Every user now uses inheritance and a virtual function override. Make
callback_handler pure virtual, delete its body, and then delete the
member variables that existed only for use in that body. Remove the
constructor parameters that initialized those variables, and update all
derived classes accordingly.