dxx-rebirth/common/include
Kp 407ab585a8 Move window existence flag to a mixin, and track using std::shared_ptr
gcc-12 does enough escape analysis to notice that
newmenu::process_until_closed stores the address of a stack local into a
heap-allocated structure, but not enough analysis to notice that the
stack variable always outlives the escaped address.  The compiler then
warns about the address escaping the local scope.  Reworking the calling
code not to do this is somewhat invasive, and gcc seems unlikely to
change behavior.  Switch to a less efficient implementation that does
not provoke a compiler warning:

- Store a shared_ptr<bool> in the object
- In the object's destructor, write through the pointer to clear the
  shared boolean
- In the caller, store a copy of the shared_ptr<bool> as a local, and
  use that copy to monitor the shared boolean

This is similar to a change proposed by JoeNotCharles
<10a2b2d337>,
but differs in its details.  Among other things, this version takes the
opportunity to move the variable out to a mixin, so that only windows
which expect to be tracked can be tracked.  Previously, all windows were
capable of this, even though most never needed it.
2023-01-14 19:05:37 +00:00
..
editor Enable gcc attribute suggestion warnings 2022-10-16 23:20:34 +00:00
3d.h Simplify DXX_ALWAYS_ERROR_FUNCTION 2022-12-10 18:09:54 +00:00
adlmidi_dynamic.h
args.h Move SysNoHogDir to CGameArg 2023-01-07 22:17:31 +00:00
byteutil.h Combine DXX_HAVE_BUILTIN_BSWAP, DXX_HAVE_BUILTIN_BSWAP16 2022-04-17 22:27:19 +00:00
compiler-cf_assert.h
compiler-poison.h Use std::span for poison helper functions 2022-09-24 17:47:51 +00:00
compiler-range_for.h
compiler-static_assert.h
console.h Simplify DXX_ALWAYS_ERROR_FUNCTION 2022-12-10 18:09:54 +00:00
countarray.h
cpp-valptridx.h
d_gl.h
d_underlying_value.h Change underlying_value to use a deleted function for the bad case 2022-06-11 15:00:02 +00:00
digi_audio.h Use enum class for sound_channel 2022-12-17 13:16:28 +00:00
digi_mixer.h Use enum class for sound_channel 2022-12-17 13:16:28 +00:00
digi_mixer_music.h
dsx-ns.h
dxxerror.h Pass std::span to msgbox_warning 2022-09-24 17:47:53 +00:00
event.h Move joystick interpretation to happen after the event loop 2022-02-27 14:23:53 +00:00
fmtcheck.h Simplify DXX_ALWAYS_ERROR_FUNCTION 2022-12-10 18:09:54 +00:00
func.h
fwd-event.h Move joystick interpretation to happen after the event loop 2022-02-27 14:23:53 +00:00
fwd-gr.h Use enum class for polygon_model_index 2022-12-18 18:32:14 +00:00
fwd-partial_range.h
fwd-valptridx.h Use #if for DXX_HAVE_CXX_BUILTIN_FILE_LINE 2022-11-10 02:04:09 +00:00
fwd-vecmat.h Use enum class for vm_magnitude_squared 2022-05-24 02:32:58 +00:00
fwd-window.h Make window_send_event a method of window 2022-12-18 23:10:39 +00:00
gr.h Use RAII_SDL_Surface to track SDL-only main canvas surface 2022-11-06 18:18:57 +00:00
grdef.h
hash.h
hmp.h Store Windows HMP MIDIHDR inline in hmp_file 2022-08-22 01:24:49 +00:00
iff.h
ignorecase.h
internal.h
interp.h Remove inline stub for swap_polygon_model_data 2023-01-07 22:17:31 +00:00
joy.h
jukebox.h
key.h
loadgl.h
makesig.h
maths.h Remove quadint members low, high 2022-05-24 02:32:58 +00:00
messagebox.h Pass std::span to msgbox_warning 2022-09-24 17:47:53 +00:00
mouse.h Use enum class for MBTN_* constants 2022-02-27 14:23:53 +00:00
ntstring.h Simplify DXX_ALWAYS_ERROR_FUNCTION 2022-12-10 18:09:54 +00:00
null_sentinel_iterator.h Remove unnecessary explicit definition of null_sentinel_iterator::operator!= 2022-10-09 23:15:19 +00:00
ogl_extensions.h
ogl_init.h Simplify DXX_ALWAYS_ERROR_FUNCTION 2022-12-10 18:09:54 +00:00
ogl_sync.h
pack.h Remove unnecessary definition of exact_type<T>::operator!= 2022-11-13 21:17:23 +00:00
palette.h Use explicitly defaulted rgb_t::operator== 2022-10-09 23:15:19 +00:00
partial_range.h Make partial_range_t inherit from ranges::subrange 2023-01-14 19:05:37 +00:00
pcx.h
physfs-serial.h
physfs_list.h Fix OS X clang build 2022-10-31 00:51:32 +00:00
physfsx.h Replace PHYSFSX_read* macros with a template function object 2022-12-17 13:16:28 +00:00
pstypes.h
rbaudio.h
rle.h Use std::span for poison helper functions 2022-09-24 17:47:51 +00:00
serial.h Use compiler std::endian instead of union-based punning 2022-09-24 17:47:52 +00:00
strutil.h Test whether change_filename_extension succeeded before using its output 2022-10-09 23:15:20 +00:00
texmap.h Pass std::span to draw_tmap, draw_tmap_flat 2022-09-24 17:47:52 +00:00
timer.h
u_mem.h Restrict RAIIdmem to use on integral types 2022-07-02 18:10:45 +00:00
ui.h Return std::unique_ptr from d_strdup 2022-10-09 23:15:20 +00:00
valptridx.h Remove unnecessary explicit definition of valptridx<T>::ptr::operator!= 2022-12-10 18:09:54 +00:00
varutil.h Define cstring_tie::end() 2022-10-09 23:15:20 +00:00
vecmat.h Simplify DXX_ALWAYS_ERROR_FUNCTION 2022-12-10 18:09:54 +00:00
window.h Move window existence flag to a mixin, and track using std::shared_ptr 2023-01-14 19:05:37 +00:00