Small fixes to make things more clean.

develop
Rose 2023-01-20 13:45:56 -08:00
parent f9ac987367
commit 8e6252fc2b
1 changed files with 5 additions and 5 deletions

@ -1025,7 +1025,7 @@ df::unit_misc_trait *Units::getMiscTrait(df::unit *unit, df::misc_trait_type typ
// get race name by id or unit pointer
string Units::getRaceNameById(int32_t id)
{
if (id >= 0 && id < world->raws.creatures.all.size())
if (id >= 0 && (size_t)id < world->raws.creatures.all.size())
{
df::creature_raw* raw = world->raws.creatures.all[id];
if (raw)
@ -1042,7 +1042,7 @@ string Units::getRaceName(df::unit* unit)
// get human-readable race name by id or unit pointer
string Units::getRaceReadableNameById(int32_t id)
{
if (id >= 0 && id < world->raws.creatures.all.size())
if (id >= 0 && (size_t)id < world->raws.creatures.all.size())
{
df::creature_raw* raw = world->raws.creatures.all[id];
if (raw)
@ -1078,7 +1078,7 @@ string Units::getPhysicalDescription(df::unit* unit)
// get plural of race name (used for display in autobutcher UI and for sorting the watchlist)
string Units::getRaceNamePluralById(int32_t id)
{
if (id >= 0 && id < world->raws.creatures.all.size())
if (id >= 0 && (size_t)id < world->raws.creatures.all.size())
{
df::creature_raw* raw = world->raws.creatures.all[id];
if (raw)
@ -1095,7 +1095,7 @@ string Units::getRaceNamePlural(df::unit* unit)
string Units::getRaceBabyNameById(int32_t id)
{
if (id >= 0 && id < world->raws.creatures.all.size())
if (id >= 0 && (size_t)id < world->raws.creatures.all.size())
{
df::creature_raw* raw = world->raws.creatures.all[id];
if (raw)
@ -1112,7 +1112,7 @@ string Units::getRaceBabyName(df::unit* unit)
string Units::getRaceChildNameById(int32_t id)
{
if (id >= 0 && id < world->raws.creatures.all.size())
if (id >= 0 && (size_t)id < world->raws.creatures.all.size())
{
df::creature_raw* raw = world->raws.creatures.all[id];
if (raw)