mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 21:06:59 -04:00
Clean up pointer use:
* Use unique_ptr for Actions instead of manual memory management * Use unique_ptr in KeywordDatabase * Use unique_ptr instead of shared_ptr for file formats * Don't pass shared_ptr to Reader/Writer, use references instead Also * Switch to C++17 so we can use map::try_emplace
This commit is contained in:
@@ -238,7 +238,7 @@ void StatDimensionList::drawItem(DC& dc, int x, int y, size_t item) {
|
||||
StatsDimension& dim = *dimensions.at(item - show_empty);
|
||||
// draw icon
|
||||
if (!dim.icon_filename.empty() && !dim.icon.Ok()) {
|
||||
InputStreamP file = game->openIn(dim.icon_filename);
|
||||
auto file = game->openIn(dim.icon_filename);
|
||||
Image img(*file);
|
||||
if (img.HasMask()) img.InitAlpha(); // we can't handle masks
|
||||
Image resampled(21, 21);
|
||||
|
||||
Reference in New Issue
Block a user