1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Renamed UNUSED -> MAYBE_UNUSED macro to match c++17 attribute name

This commit is contained in:
Ivan Savenko
2022-12-07 18:06:47 +02:00
parent 3219e322ae
commit fb6b3c31e8
8 changed files with 19 additions and 17 deletions

View File

@@ -731,7 +731,7 @@ DLL_LINKAGE void NewObject::applyGs(CGameState *gs)
const int3 previousXAxisTile = int3(pos.x - 1, pos.y, pos.z);
assert(gs->isInTheMap(previousXAxisTile) && (testObject.visitablePos() == previousXAxisTile));
UNUSED(previousXAxisTile);
MAYBE_UNUSED(previousXAxisTile);
}
else
{
@@ -957,7 +957,7 @@ DLL_LINKAGE void RebalanceStacks::applyGs(CGameState * gs)
if(const CCreature *c = dst.army->getCreature(dst.slot)) //stack at dest -> merge
{
assert(c == srcType);
UNUSED(c);
MAYBE_UNUSED(c);
auto alHere = ArtifactLocation (src.getStack(), ArtifactPosition::CREATURE_SLOT);
auto alDest = ArtifactLocation (dst.getStack(), ArtifactPosition::CREATURE_SLOT);
auto artHere = alHere.getArt();
@@ -1008,7 +1008,7 @@ DLL_LINKAGE void RebalanceStacks::applyGs(CGameState * gs)
if(const CCreature *c = dst.army->getCreature(dst.slot)) //stack at dest -> rebalance
{
assert(c == srcType);
UNUSED(c);
MAYBE_UNUSED(c);
if (stackExp)
{
ui64 totalExp = srcCount * src.army->getStackExperience(src.slot) + dst.army->getStackCount(dst.slot) * dst.army->getStackExperience(dst.slot);
@@ -1177,7 +1177,7 @@ DLL_LINKAGE void AssembledArtifact::applyGs(CGameState *gs)
assert(transformedArt);
bool combineEquipped = !ArtifactUtils::isSlotBackpack(al.slot);
assert(vstd::contains(transformedArt->assemblyPossibilities(artSet, combineEquipped), builtArt));
UNUSED(transformedArt);
MAYBE_UNUSED(transformedArt);
auto combinedArt = new CCombinedArtifactInstance(builtArt);
gs->map->addNewArtifactInstance(combinedArt);