common: fix gamedef_hl_t::get_default_palette()

This commit is contained in:
Eric Wasylishen 2022-01-15 23:32:30 -07:00
parent e6e232d43e
commit 4d1901534f
2 changed files with 3 additions and 3 deletions

View File

@ -407,7 +407,7 @@ struct gamedef_hl_t : public gamedef_q1_like_t<GAME_HALF_LIFE>
const std::vector<qvec3b> &get_default_palette() const
{
static constexpr std::initializer_list<qvec3b> palette{};
static const std::vector<qvec3b> palette;
return palette;
}
};

View File

@ -85,7 +85,7 @@ namespace img
LogPrint("INFO: Falling back to built-in palette.\n");
}
auto pal = game->get_default_palette();
auto &pal = game->get_default_palette();
std::copy(pal.begin(), pal.end(), std::back_inserter(palette));
}
@ -461,4 +461,4 @@ breakOut:;
LogPrint("WARNING: failed to load or convert textures.\n");
}
}
}
}