From 41cfcfdc0fc270b1eab1b9cc400ae88498c099a2 Mon Sep 17 00:00:00 2001 From: Benjamin Winger Date: Mon, 17 May 2021 18:33:02 -0400 Subject: [PATCH] Display Race record height/weight as a float --- components/esm/loadrace.cpp | 4 ++-- components/esm/loadrace.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/esm/loadrace.cpp b/components/esm/loadrace.cpp index 88ce08c913..fbdf22fb6d 100644 --- a/components/esm/loadrace.cpp +++ b/components/esm/loadrace.cpp @@ -13,9 +13,9 @@ namespace ESM return male ? mMale : mFemale; } - int Race::MaleFemaleF::getValue (bool male) const + float Race::MaleFemaleF::getValue (bool male) const { - return static_cast(male ? mMale : mFemale); + return male ? mMale : mFemale; } void Race::load(ESMReader &esm, bool &isDeleted) diff --git a/components/esm/loadrace.hpp b/components/esm/loadrace.hpp index bf0573075c..d014744472 100644 --- a/components/esm/loadrace.hpp +++ b/components/esm/loadrace.hpp @@ -38,7 +38,7 @@ struct Race { float mMale, mFemale; - int getValue (bool male) const; + float getValue (bool male) const; }; enum Flags