diff --git a/library/include/modules/Units.h b/library/include/modules/Units.h index c719a60a9..e2d34254d 100644 --- a/library/include/modules/Units.h +++ b/library/include/modules/Units.h @@ -181,9 +181,9 @@ DFHACK_EXPORT std::string getCasteProfessionName(int race, int caste, df::profes DFHACK_EXPORT int8_t getProfessionColor(df::unit *unit, bool ignore_noble = false); DFHACK_EXPORT int8_t getCasteProfessionColor(int race, int caste, df::profession pid); -DFHACK_EXPORT df::goal_type getGoalType(df::unit *unit, int goalIndex = 0); -DFHACK_EXPORT std::string getGoalName(df::unit *unit, int goalIndex = 0); -DFHACK_EXPORT bool isGoalAchieved(df::unit *unit, int goalIndex = 0); +DFHACK_EXPORT df::goal_type getGoalType(df::unit *unit, size_t goalIndex = 0); +DFHACK_EXPORT std::string getGoalName(df::unit *unit, size_t goalIndex = 0); +DFHACK_EXPORT bool isGoalAchieved(df::unit *unit, size_t goalIndex = 0); DFHACK_EXPORT std::string getSquadName(df::unit *unit); diff --git a/library/modules/Units.cpp b/library/modules/Units.cpp index d5c871f5b..a8f96b29f 100644 --- a/library/modules/Units.cpp +++ b/library/modules/Units.cpp @@ -1439,7 +1439,7 @@ int8_t Units::getCasteProfessionColor(int race, int casteid, df::profession pid) return 3; } -df::goal_type Units::getGoalType(df::unit *unit, int goalIndex) +df::goal_type Units::getGoalType(df::unit *unit, size_t goalIndex) { CHECK_NULL_POINTER(unit); @@ -1452,7 +1452,7 @@ df::goal_type Units::getGoalType(df::unit *unit, int goalIndex) return goal; } -std::string Units::getGoalName(df::unit *unit, int goalIndex) +std::string Units::getGoalName(df::unit *unit, size_t goalIndex) { CHECK_NULL_POINTER(unit); @@ -1471,7 +1471,7 @@ std::string Units::getGoalName(df::unit *unit, int goalIndex) return goal_name; } -bool Units::isGoalAchieved(df::unit *unit, int goalIndex) +bool Units::isGoalAchieved(df::unit *unit, size_t goalIndex) { CHECK_NULL_POINTER(unit);