From 660fbfd4c1002e5ebe6e75b242272492a228f9c8 Mon Sep 17 00:00:00 2001 From: Juliano Leal Goncalves Date: Sat, 10 Apr 2021 20:54:46 -0300 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Use=20'plr=5Fclass'=20enum?= =?UTF-8?q?=20as=20argument=20on=20'selhero=5FGenerateName'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This improves type-safety by using a stronger, more specific type. --- SourceX/DiabloUI/selhero.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SourceX/DiabloUI/selhero.cpp b/SourceX/DiabloUI/selhero.cpp index aedf227b1..1c0ab7328 100644 --- a/SourceX/DiabloUI/selhero.cpp +++ b/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] = { {