Browse Source

♻️ Use 'plr_class' enum as argument on 'selhero_GenerateName'

This improves type-safety by using a stronger, more specific type.
pull/1502/head
Juliano Leal Goncalves 5 years ago committed by Anders Jenbo
parent
commit
660fbfd4c1
  1. 4
      SourceX/DiabloUI/selhero.cpp

4
SourceX/DiabloUI/selhero.cpp

@ -20,7 +20,7 @@
namespace devilution {
static const char *selhero_GenerateName(uint8_t hero_class);
static const char *selhero_GenerateName(plr_class hero_class);
std::size_t selhero_SaveCount = 0;
_uiheroinfo selhero_heros[MAX_CHARACTERS];
@ -566,7 +566,7 @@ void UiSelHeroMultDialog(
UiSelHeroDialog(fninfo, fncreate, fnstats, fnremove, dlgresult, name);
}
static const char *selhero_GenerateName(uint8_t hero_class)
static const char *selhero_GenerateName(plr_class hero_class)
{
static const char *const kNames[6][10] = {
{

Loading…
Cancel
Save