Skip to content

Commit

Permalink
Merge pull request #76220 from andrei8l/overmap-no-default-adapter
Browse files Browse the repository at this point in the history
overmap: don't initialize redundant ui_adaptor by default
  • Loading branch information
akrieger authored Sep 6, 2024
2 parents 1a13be3 + 68f6d1d commit faa10bf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions src/overmap_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1195,10 +1195,8 @@ tiles_redraw_info redraw_info;

static void draw( overmap_draw_data_t &data )
{
cata_assert( static_cast<bool>( data.ui ) );
ui_adaptor *ui = data.ui.get();
if( ui == nullptr ) {
return;
}
draw_om_sidebar( *ui, g->w_omlegend, data.ictxt, data );
#if defined( TILES )
if( use_tiles && use_tiles_overmap ) {
Expand Down
1 change: 0 additions & 1 deletion src/overmap_ui.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ struct overmap_draw_data_t {
input_context ictxt;

overmap_draw_data_t() {
ui = std::make_shared<ui_adaptor>();
ictxt = input_context( "OVERMAP" );
}
};
Expand Down

0 comments on commit faa10bf

Please sign in to comment.