Skip to content

Commit 779567f

Browse files
committed
fix warnings
1 parent 4a7fd33 commit 779567f

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

CvGameCoreDLL_Expansion2/CvCity.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31763,7 +31763,7 @@ void CvCity::doUnitCompletionYields(CvUnit* pUnit, UnitCreationReason eReason)
3176331763
if (iYieldQuantityOnCompletion > 0)
3176431764
{
3176531765
// Look up instant yield type based on unit creation reason
31766-
InstantYieldType eIYieldType = INSTANT_YIELD_TYPE_INSTANT;
31766+
InstantYieldType eIYieldType;
3176731767
switch (eReason) {
3176831768
case REASON_TRAIN:
3176931769
eIYieldType = INSTANT_YIELD_TYPE_U_PROD;
@@ -31774,6 +31774,8 @@ void CvCity::doUnitCompletionYields(CvUnit* pUnit, UnitCreationReason eReason)
3177431774
case REASON_FAITH_BUY:
3177531775
eIYieldType = INSTANT_YIELD_TYPE_FAITH_PURCHASE;
3177631776
break;
31777+
default:
31778+
eIYieldType = INSTANT_YIELD_TYPE_INSTANT;
3177731779
}
3177831780

3177931781
GET_PLAYER(getOwner()).doInstantYield(eIYieldType, false, NO_GREATPERSON, NO_BUILDING, iYieldQuantityOnCompletion,

CvGameCoreDLL_Expansion2/CvUnit.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23963,7 +23963,8 @@ void CvUnit::DoConvertEnemyUnitToBarbarian(const CvPlot* pPlot)
2396323963
}
2396423964
}
2396523965
}
23966-
}/*
23966+
}
23967+
#if 0
2396723968
// Is this unit running into a unit that might convert it into a barbarian??
2396823969
if(IsCombatUnit() && !isBarbarian() && !pPlot->isFriendlyCity(*this))
2396923970
{
@@ -23983,7 +23984,7 @@ void CvUnit::DoConvertEnemyUnitToBarbarian(const CvPlot* pPlot)
2398323984
{
2398423985

2398523986
CvPlayer* pBarbPlayer = &GET_PLAYER(BARBARIAN_PLAYER);
23986-
pConvertUnit = pBarbPlayer->initUnit(getUnitType(), getX(), getY(), AI_getUnitAIType(), NO_DIRECTION, true /*bNoMove, false);
23987+
pConvertUnit = pBarbPlayer->initUnit(getUnitType(), getX(), getY(), AI_getUnitAIType(), NO_DIRECTION, true /*bNoMove*/, false);
2398723988
pConvertUnit->convert(this, false);
2398823989
pConvertUnit->setupGraphical();
2398923990
pConvertUnit->setDamage(iExistingDamage, BARBARIAN_PLAYER);
@@ -24001,7 +24002,7 @@ void CvUnit::DoConvertEnemyUnitToBarbarian(const CvPlot* pPlot)
2400124002
}
2400224003
}
2400324004
}
24004-
}*/
24005+
#endif
2400524006
}
2400624007
}
2400724008
}

0 commit comments

Comments
 (0)