Upgrade the project default to C++26

This commit is contained in:
notmatthewbeshay
2026-03-16 18:18:52 +11:00
parent 9748827f72
commit 591dd48cf6
17 changed files with 55 additions and 51 deletions
+2 -2
View File
@@ -124,9 +124,9 @@ const ItemInstance* ArmorDyeRecipe::getResultItem() { return NULL; }
const int ArmorDyeRecipe::getGroup() { return ShapedRecipy::eGroupType_Armour; }
// 4J-PB
bool ArmorDyeRecipe::requires(int iRecipe) { return false; }
bool ArmorDyeRecipe::requiresRecipe(int iRecipe) { return false; }
void ArmorDyeRecipe::requires(INGREDIENTS_REQUIRED* pIngReq) {
void ArmorDyeRecipe::collectRequirements(INGREDIENTS_REQUIRED* pIngReq) {
// int iCount=0;
// bool bFound;
// int j;
+3 -3
View File
@@ -20,7 +20,7 @@ public:
// 4J-PB
virtual bool
requires(int iRecipe);
requiresRecipe(int iRecipe);
virtual void
requires(INGREDIENTS_REQUIRED* pIngReq);
};
collectRequirements(INGREDIENTS_REQUIRED* pIngReq);
};
+1 -1
View File
@@ -1092,7 +1092,7 @@ void Recipes::buildRecipeIngredientsArray(void) {
Recipy* recipe = *it;
// wprintf(L"RECIPE - [%d] is
// %w\n",iCount,recipe->getResultItem()->getItem()->getName());
recipe->requires(&m_pRecipeIngredientsRequired[iCount++]);
recipe->collectRequirements(&m_pRecipeIngredientsRequired[iCount++]);
}
// printf("Total recipes in buildRecipeIngredientsArray - %d",iCount);
+2 -2
View File
@@ -52,9 +52,9 @@ public:
// 4J-PB
virtual bool
requires(int iRecipe)
requiresRecipe(int iRecipe)
= 0;
virtual void
requires(INGREDIENTS_REQUIRED* pIngReq)
collectRequirements(INGREDIENTS_REQUIRED* pIngReq)
= 0;
};
+2 -2
View File
@@ -92,7 +92,7 @@ std::shared_ptr<ItemInstance> ShapedRecipy::assemble(
int ShapedRecipy::size() { return width * height; }
// 4J-PB
bool ShapedRecipy::requires(int iRecipe) {
bool ShapedRecipy::requiresRecipe(int iRecipe) {
app.DebugPrintf("ShapedRecipy %d\n", iRecipe);
int iCount = 0;
for (int x = 0; x < 3; x++) {
@@ -109,7 +109,7 @@ bool ShapedRecipy::requires(int iRecipe) {
return false;
}
void ShapedRecipy::requires(INGREDIENTS_REQUIRED* pIngReq) {
void ShapedRecipy::collectRequirements(INGREDIENTS_REQUIRED* pIngReq) {
// printf("ShapedRecipy %d\n",iRecipe);
int iCount = 0;
+2 -2
View File
@@ -32,7 +32,7 @@ public:
// 4J-PB - to return the items required to make a recipe
virtual bool
requires(int iRecipe);
requiresRecipe(int iRecipe);
virtual void
requires(INGREDIENTS_REQUIRED* pIngReq);
collectRequirements(INGREDIENTS_REQUIRED* pIngReq);
};
+2 -2
View File
@@ -65,7 +65,7 @@ std::shared_ptr<ItemInstance> ShapelessRecipy::assemble(
int ShapelessRecipy::size() { return (int)ingredients->size(); }
// 4J-PB
bool ShapelessRecipy::requires(int iRecipe) {
bool ShapelessRecipy::requiresRecipe(int iRecipe) {
std::vector<ItemInstance*>* tempList = new std::vector<ItemInstance*>;
*tempList = *ingredients;
@@ -87,7 +87,7 @@ bool ShapelessRecipy::requires(int iRecipe) {
return false;
}
void ShapelessRecipy::requires(INGREDIENTS_REQUIRED* pIngReq) {
void ShapelessRecipy::collectRequirements(INGREDIENTS_REQUIRED* pIngReq) {
int iCount = 0;
bool bFound;
int j;
+2 -2
View File
@@ -21,7 +21,7 @@ public:
// 4J-PB - to return the items required to make a recipe
virtual bool
requires(int iRecipe);
requiresRecipe(int iRecipe);
virtual void
requires(INGREDIENTS_REQUIRED* pIngReq);
collectRequirements(INGREDIENTS_REQUIRED* pIngReq);
};