dxx-rebirth/similar/main
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
..
ai.cpp Use enum class for sound_sample_rate 2023-01-07 22:17:31 +00:00
aipath.cpp Pass robot_info to move_towards_segment_center 2022-12-02 04:09:20 +00:00
automap.cpp Fix various Win32 build failures due to ambiguous operator[]() 2022-10-23 23:00:24 +00:00
bm.cpp Use enum class for properties_init result 2023-01-07 22:17:31 +00:00
bmread.cpp Harden bm_read_alias against bad input 2023-01-07 22:17:31 +00:00
cntrlcen.cpp Pass ranges::subrange to reactor_read_n 2022-12-31 16:21:47 +00:00
collide.cpp Use enum class for bitmap_index 2022-12-31 16:21:47 +00:00
config.cpp Rework convert_integer to return result in some cases 2023-01-14 19:05:37 +00:00
console.cpp Fix OS X clang build 2022-10-31 00:51:32 +00:00
controls.cpp optimize include files (include what you use) 2021-02-06 21:38:50 +01:00
credits.cpp Use std::span for CREDITS_FILE 2022-09-24 17:47:52 +00:00
digiobj.cpp Use enum class for sound_channel 2022-12-17 13:16:28 +00:00
dumpmine.cpp Remove macro wrapper around nm_messagebox 2023-01-14 19:05:37 +00:00
effects.cpp Use sidenum_t in more places 2022-02-19 14:52:17 +00:00
endlevel.cpp Use enum class for polygon_model_index 2022-12-18 18:32:14 +00:00
fireball.cpp Use enum class for polygon_model_index 2022-12-18 18:32:14 +00:00
fuelcen.cpp Inline object_create_explosion into callers 2022-11-07 01:59:34 +00:00
fvi.cpp Use enum class for bitmap_index 2022-12-31 16:21:47 +00:00
game.cpp Use enum class for sound_sample_rate 2023-01-07 22:17:31 +00:00
gamecntl.cpp Fix OS X clang build 2022-10-31 00:51:32 +00:00
gamefont.cpp Move various static functions into anonymous namespace 2022-07-09 13:39:29 +00:00
gamemine.cpp Use enum for segnum_t 2022-07-02 18:10:45 +00:00
gamerend.cpp Use enum class for bitmap_index 2022-12-31 16:21:47 +00:00
gamesave.cpp Remove macro wrapper around nm_messagebox 2023-01-14 19:05:37 +00:00
gameseg.cpp Use enum class for delta_light_index 2022-11-07 01:59:34 +00:00
gameseq.cpp Pass ranges::subrange to glitz_menu 2022-12-31 16:21:47 +00:00
gauges.cpp Use enum class for bitmap_index 2022-12-31 16:21:47 +00:00
generate-kconfig-udlr.py Fix generate-kconfig-udlr.py for Python3 2022-11-13 21:17:23 +00:00
hostage.cpp optimize include files (include what you use) 2021-02-06 21:38:50 +01:00
hud.cpp Fix various Win32 build failures due to ambiguous operator[]() 2022-10-23 23:00:24 +00:00
iff.cpp Inline PHYSFSX_fseek(..., SEEK_SET) 2022-12-18 23:10:39 +00:00
inferno.cpp Simplify SDL_QUIT handling 2023-01-14 19:05:37 +00:00
kconfig.cpp Merge commit 'refs/pull/657/head' into master 2022-08-23 02:13:01 +00:00
kconfig.ui-table.cpp Rename pitch -> pitch_ud for consistency 2022-02-27 14:23:53 +00:00
kmatrix.cpp Use alias template per_player_array for arrays that are MAX_PLAYERS long 2022-09-24 17:47:53 +00:00
laser.cpp Inline object_create_muzzle_flash into callers 2022-11-13 21:17:23 +00:00
lighting.cpp Factor out computing object light from color 2022-12-31 16:21:47 +00:00
menu.cpp Fix off-by-strlen(sep) in buffer capacity check 2023-01-14 19:05:37 +00:00
mglobal.cpp Use std::span for poison helper functions 2022-09-24 17:47:51 +00:00
mission.cpp Remove macro wrapper around nm_messagebox 2023-01-14 19:05:37 +00:00
morph.cpp Switch do_morph_frame to enumerate(zip()) 2023-01-07 22:17:31 +00:00
multi.cpp Add compile-time sanity check on multi_send_data_direct length 2023-01-14 19:05:37 +00:00
multibot.cpp Inline object_create_explosion into callers 2022-11-07 01:59:34 +00:00
net_udp.cpp Remove macro wrapper around nm_messagebox 2023-01-14 19:05:37 +00:00
newdemo.cpp Remove macro wrapper around nm_messagebox 2023-01-14 19:05:37 +00:00
newmenu.cpp Move window existence flag to a mixin, and track using std::shared_ptr 2023-01-14 19:05:37 +00:00
object.cpp Use enum class for bitmap_index 2022-12-31 16:21:47 +00:00
paging.cpp Move vclip id validation down into paging_touch_vclip 2023-01-14 19:05:37 +00:00
physics.cpp Pass LevelSharedRobotInfoState to various functions that need it 2022-07-09 13:39:29 +00:00
piggy.cpp Harden D2 loading of D1 texture numbers 2023-01-07 22:17:31 +00:00
player.cpp Use enum class for polygon_model_index 2022-12-18 18:32:14 +00:00
playsave.cpp Rework convert_integer to return result in some cases 2023-01-14 19:05:37 +00:00
polyobj.cpp Use if constexpr to guard calls to align_polygon_model_data 2022-12-31 16:21:47 +00:00
powerup.cpp Detect escort goal even for silent powerups 2023-01-07 22:17:31 +00:00
render.cpp Use enum class for bitmap_index 2022-12-31 16:21:47 +00:00
robot.cpp Return ranges::subrange from robot_get_anim_state 2022-12-31 16:21:47 +00:00
scores.cpp Remove macro wrapper around nm_messagebox 2023-01-14 19:05:37 +00:00
segment.cpp Use enum class for delta_light_index 2022-11-07 01:59:34 +00:00
slew.cpp optimize include files (include what you use) 2021-02-06 21:38:50 +01:00
songs.cpp Fix various Win32 build failures due to ambiguous operator[]() 2022-10-23 23:00:24 +00:00
state.cpp Remove macro wrapper around nm_messagebox 2023-01-14 19:05:37 +00:00
switch.cpp Use enum class for player connected status 2022-07-16 15:26:12 +00:00
terrain.cpp Move various static functions into anonymous namespace 2022-07-09 13:39:29 +00:00
texmerge.cpp Use enum class for bitmap_index 2022-12-31 16:21:47 +00:00
text.cpp Move various static functions into anonymous namespace 2022-07-09 13:39:29 +00:00
titles.cpp Use enum class for bitmap_index 2022-12-31 16:21:47 +00:00
vclip.cpp Pass GameBitmaps to draw_object_blob 2022-06-05 17:44:52 +00:00
vers_id.cpp Fix buffer overread at startup 2022-10-19 01:17:33 +00:00
wall.cpp Make enumerate inherit ranges::subrange directly 2022-12-31 16:21:47 +00:00
weapon.cpp Use enum class for bitmap_index 2022-12-31 16:21:47 +00:00