Changed: #825 Remove all warnings when compiling Ryzom (patch provided by abelgar)

This commit is contained in:
kervala 2010-09-23 15:08:52 +02:00
parent 98c24e3a40
commit c0c147af4e
33 changed files with 142 additions and 104 deletions

View file

@ -194,7 +194,7 @@ bool buildLMConts(const std::string &worldSheet, const std::string &primitivesPa
// get alias and region name
uint32 alias;
uint32 alias = 0;
string primName, primAlias;
vGenRes[i]->getPropertyByName("name", primName);

View file

@ -2130,8 +2130,8 @@ public:
{
uint8 *linePtr = lineBuffer;
uint8 *linePtrHM = lineBufferHM;
uint8 pointBuffer;
uint8 pointBufferHM;
uint8 pointBuffer = 0;
uint8 pointBufferHM = 0;
CMapPosition pos(scanpos);

View file

@ -241,12 +241,12 @@ public:
{
public:
inline CCellTblIteratorLinear():
_matrix(NULL), _tbl(NULL), _x(0), _y(0), _runLengthRemaining(0)
_x(0), _y(0), _matrix(NULL), _tbl(NULL), _runLengthRemaining(0)
{
}
inline CCellTblIteratorLinear(const CAIEntityMatrix<T> *matrix,const CAIEntityMatrixIteratorTblLinear *tbl,const CAIVector &pos):
_matrix(matrix), _tbl(tbl), _x((uint16)pos.x().asInt16Meters()), _y((uint16)pos.y().asInt16Meters())
_x((uint16)pos.x().asInt16Meters()), _y((uint16)pos.y().asInt16Meters()), _matrix(matrix), _tbl(tbl)
{
#ifdef NL_DEBUG
nlassert(_tbl!=NULL);

View file

@ -41,15 +41,15 @@
inline
CAIEntityPhysical::CAIEntityPhysical(CPersistentOfPhysical& owner, TDataSetRow const& entityIndex, NLMISC::CEntityId const& id, float radius, uint32 level, RYAI_MAP_CRUNCH::TAStarFlag const& AStarFlags)
: CAIEntity()
, _dataSetRow(entityIndex)
, _pos(entityIndex)
, CSpawnable<CPersistentOfPhysical >(owner)
, _id(id)
, _pos(entityIndex)
, _dataSetRow(entityIndex)
, _Stuned(0)
, _Rooted(0)
, _Blinded(0)
, _Feared(0)
//, _UnreachableTarget((CAIEntityPhysical*)NULL)
, _id(id)
, _radius(radius)
, _food(_radius)
, _Level(level)

View file

@ -67,12 +67,12 @@ void CBotProfileFight::resumeProfile()
CBotProfileFight::CBotProfileFight(CProfileOwner* owner, CAIEntityPhysical* ennemy)
: CBotProfileFightHeal()
, _Ennemy(ennemy)
, _Bot(NLMISC::safe_cast<CSpawnBot*>(owner))
, _Ennemy(ennemy)
, _PathPos(NLMISC::safe_cast<CSpawnBot*>(owner)->theta())
, _PathCont(NLMISC::safe_cast<CSpawnBot*>(owner)->getAStarFlag())
, _RangeCalculated(false)
, _SearchAlternativePath(false)
, _PathCont(NLMISC::safe_cast<CSpawnBot*>(owner)->getAStarFlag())
{
#ifdef NL_DEBUG_PTR
_Bot.setData(this);
@ -226,12 +226,12 @@ void CBotProfileHeal::resumeProfile()
CBotProfileHeal::CBotProfileHeal(const TDataSetRow &row, CProfileOwner *owner)
: CBotProfileFightHeal()
, _Row(row)
, _Bot(NLMISC::safe_cast<CSpawnBot*>(owner))
, _PathPos(NLMISC::safe_cast<CSpawnBot*>(owner)->theta())
, _PathCont(NLMISC::safe_cast<CSpawnBot*>(owner)->getAStarFlag())
, _Row(row)
, _RangeCalculated(false)
, _SearchAlternativePath(false)
, _PathCont(NLMISC::safe_cast<CSpawnBot*>(owner)->getAStarFlag())
{
}
@ -252,10 +252,10 @@ CBotProfileHeal::~CBotProfileHeal()
CBotProfileFlee::CBotProfileFlee(CProfileOwner *owner)
: CAIBaseProfile()
, _Bot(NLMISC::safe_cast<CSpawnBot*>(owner))
, _PathPos(NLMISC::safe_cast<CSpawnBot*>(owner)->theta())
, _DenyFlags(NLMISC::safe_cast<CSpawnBot*>(owner)->getAStarFlag())
, _PathPos(NLMISC::safe_cast<CSpawnBot*>(owner)->theta())
, _fightFleePathContainer(NLMISC::safe_cast<CSpawnBot*>(owner)->getAStarFlag())
, _Bot(NLMISC::safe_cast<CSpawnBot*>(owner))
{
}
@ -521,14 +521,20 @@ bool CFightOrganizer::reorganizeIteration(CBot* bot)
if (!entity->isAlive())
{
if (ai_profile_npc_VerboseLog)
{
nldebug("<FIGHT>Entity %s have aggro for dead entity %s, forgetting it.", spawnBot->getEntityId().toString().c_str(), entity->getEntityId().toString().c_str());
}
spawnBot->forgetAggroFor(entity->dataSetRow());
continue;
}
if (!entity->isBotAttackable())
{
if (ai_profile_npc_VerboseLog)
{
nldebug("<FIGHT>Entity %s have aggro for non bot attackable entity %s, forgetting it.", spawnBot->getEntityId().toString().c_str(), entity->getEntityId().toString().c_str());
}
spawnBot->forgetAggroFor(entity->dataSetRow());
continue;
}

View file

@ -676,7 +676,8 @@ void CGrpProfileBandit::beginProfile()
else
{
// look for aggro range parameter or set a default value
float aggroRangeFloat;
float aggroRangeFloat = 0.f;
if (!_Grp->getProfileParameter("aggro range", aggroRangeFloat))
_AggroRange =static_cast<uint32>( CGrpProfileBanditFactory::getDefaultBanditAggroRange() );
else
@ -991,7 +992,7 @@ void CGrpProfileGuard::updateProfile(uint ticksSinceLastUpdate)
}
string s;
float f;
float f = 0.f;
if (_Grp->getProfileParameter("faction", s) && !s.empty())
{
factionIndex = CStaticFames::getInstance().getFactionIndex(s);
@ -1703,10 +1704,10 @@ CGrpProfileFollowRoute::CGrpProfileFollowRoute(CProfileOwner *owner)
CGrpProfileFollowRoute::CGrpProfileFollowRoute(CProfileOwner *owner,const std::vector<CShape::TPosition> &geometry,const TVerticalPos &verticalPos, bool dontSendEvent)
: CMoveProfile(owner)
, _Geometry(&geometry)
, _GeometryComeFromState(false)
, _VerticalPos(verticalPos)
, _PathCont(NLMISC::safe_cast<CSpawnGroup*>(owner)->getPersistent().getAStarFlag())
, _GeometryComeFromState(false)
, _Geometry(&geometry)
, _VerticalPos(verticalPos)
, _DontSendEvent(dontSendEvent)
{
PROFILE_LOG("group", "follow_route", "ctor2", "");
@ -2402,8 +2403,8 @@ std::string CGrpProfileIdle::getOneLineInfoString() const
CGrpProfileWander::CGrpProfileWander(CProfileOwner* owner, CNpcZone const* npcZone)
: CMoveProfile(owner)
, _NpcZone(npcZone)
, _Social(false)
, _NpcZone(npcZone)
{
PROFILE_LOG("group", "wander", "ctor", "");
_BotStandProfileType = BOT_STAND_AT_POS;
@ -2748,8 +2749,8 @@ std::string CGrpProfileWander::getOneLineInfoString() const
CGrpProfileWanderNoPrim::CGrpProfileWanderNoPrim(CProfileOwner* owner, NLMISC::CSmartPtr<CNpcZonePlaceNoPrim> const& npcZone)
: CMoveProfile(owner)
, _NpcZone(npcZone)
, _Social(false)
, _NpcZone(npcZone)
{
PROFILE_LOG("group", "wander", "ctor", "");
_BotStandProfileType = BOT_STAND_AT_POS;
@ -3043,10 +3044,10 @@ CGrpProfileStandAtStartPoint::CBotPositionner::CBotPositionner(RYAI_MAP_CRUNCH::
}
CGrpProfileStandAtStartPoint::CBotPositionner::CBotPositionner(TVerticalPos verticalPos, CAIPos position, RYAI_MAP_CRUNCH::TAStarFlag flag)
: _BotAtDest(false)
: _PathCont(flag)
, _Position(position)
, _VerticalPos(verticalPos)
, _PathCont(flag)
, _BotAtDest(false)
{
_PathCont.setDestination(verticalPos, position);
}
@ -4019,9 +4020,9 @@ CBotProfileMoveTo::CBotProfileMoveTo(AITYPES::TVerticalPos verticalPos, RYAI_MAP
: CAIBaseProfile()
, _VerticalPos(verticalPos)
, _Dest(dest)
, _Bot(NLMISC::safe_cast<CSpawnBotNpc*>(owner))
, _PathPos(NLMISC::safe_cast<CSpawnBotNpc*>(owner)->theta())
, _PathCont(NLMISC::safe_cast<CSpawnBotNpc*>(owner)->getAStarFlag())
, _PathPos(NLMISC::safe_cast<CSpawnBotNpc*>(owner)->theta())
, _Bot(NLMISC::safe_cast<CSpawnBotNpc*>(owner))
{
PROFILE_LOG("bot", "move_to", "ctor", "");
#ifdef NL_DEBUG_PTR
@ -4095,11 +4096,11 @@ std::string CBotProfileMoveTo::getOneLineInfoString() const
CBotProfileFollowPos::CBotProfileFollowPos(CBotProfileFollowPos const& other)
: CAIBaseProfile()
, _PathCont(const_cast<CBotProfileFollowPos&>(other)._PathCont)
, _PathPos(const_cast<CBotProfileFollowPos&>(other)._PathPos._Angle) // Just to debug...
, _Bot(const_cast<CBotProfileFollowPos&>(other)._Bot)
, _PathCont(const_cast<CBotProfileFollowPos&>(other)._PathCont)
, _MaxWalkSpeed(FLT_MAX)
, _MaxRunSpeed(FLT_MAX)
, _PathPos(const_cast<CBotProfileFollowPos&>(other)._PathPos._Angle) // Just to debug...
, _Stop(false)
{
PROFILE_LOG("bot", "follow_pos", "ctor", "");
@ -4110,11 +4111,11 @@ CBotProfileFollowPos::CBotProfileFollowPos(CBotProfileFollowPos const& other)
CBotProfileFollowPos::CBotProfileFollowPos(CPathCont* pathCont, CProfileOwner* owner)
: CAIBaseProfile()
, _PathCont(pathCont)
, _PathPos(NLMISC::safe_cast<CSpawnBotNpc*>(owner)->theta())
, _Bot(NLMISC::safe_cast<CSpawnBotNpc*>(owner))
, _PathCont(pathCont)
, _MaxWalkSpeed(FLT_MAX)
, _MaxRunSpeed(FLT_MAX)
, _PathPos(NLMISC::safe_cast<CSpawnBotNpc*>(owner)->theta())
, _Stop(false)
{
PROFILE_LOG("bot", "follow_pos", "ctor", "");
@ -4530,9 +4531,9 @@ CGrpProfileStandOnVertices::CBotPositionner::CBotPositionner(RYAI_MAP_CRUNCH::TA
}
CGrpProfileStandOnVertices::CBotPositionner::CBotPositionner(uint32 geomIndex, RYAI_MAP_CRUNCH::TAStarFlag flags)
: _BotAtDest(false)
: _PathCont(flags)
, _GeomIndex(geomIndex)
, _PathCont(flags)
, _BotAtDest(false)
{
}

View file

@ -143,9 +143,9 @@ bool CAliasTreeOwner::CAliasDiff::operator()(CAliasTreeOwner const* other) const
inline
CAliasTreeOwner::CAliasTreeOwner(CAIAliasDescriptionNode* aliasTree)
: _AliasTree(aliasTree)
, _Alias(0)
: _Alias(0)
, _Name(std::string())
, _AliasTree(aliasTree)
{
if (aliasTree)
{
@ -159,9 +159,9 @@ CAliasTreeOwner::CAliasTreeOwner(CAIAliasDescriptionNode* aliasTree)
inline
CAliasTreeOwner::CAliasTreeOwner(uint32 alias, std::string const& name)
: _AliasTree(NULL)
, _Alias(alias)
: _Alias(alias)
, _Name(name)
, _AliasTree(NULL)
{
CAliasTreeOwnerLocator::getInstance()->addEntity(_Alias, _Name, this);
}

View file

@ -126,8 +126,8 @@ bool CAICircle::isInside(V const& pos)
inline
CAabb::CAabb()
: _VMax(INT_MIN/CAICoord::UNITS_PER_METER, INT_MIN/CAICoord::UNITS_PER_METER)
, _VMin(INT_MAX/CAICoord::UNITS_PER_METER, INT_MAX/CAICoord::UNITS_PER_METER)
: _VMin(INT_MAX/CAICoord::UNITS_PER_METER, INT_MAX/CAICoord::UNITS_PER_METER)
, _VMax(INT_MIN/CAICoord::UNITS_PER_METER, INT_MIN/CAICoord::UNITS_PER_METER)
{
}
/*

View file

@ -50,7 +50,7 @@ public:
static bool exists( const TDataSetRow& entityIndex );
static const NLMISC::CEntityId& getEntityId( const TDataSetRow& entityIndex );
static TDataSetRow getDataSetRow( const NLMISC::CEntityId& entityId );
static const uint16 getTeamId(const TDataSetRow& entityIndex);
static uint16 getTeamId(const TDataSetRow& entityIndex);
static CAICoord x( const TDataSetRow& entityIndex );
static CAICoord y( const TDataSetRow& entityIndex );

View file

@ -344,14 +344,14 @@ CTokenTestResult::CTokenTestResult()
}
inline
CTokenTestResult::CTokenTestResult(const NLMISC::CSmartPtr<CCodeNode> &codeNode)
: _codeNode(codeNode)
, _res(BRULE_VALID)
: _res(BRULE_VALID)
, _codeNode(codeNode)
{
}
inline
CTokenTestResult::CTokenTestResult(const NLMISC::CSmartPtr<CCodeNode> &codeNode, TBasicTokenTestRes res)
: _codeNode(codeNode)
, _res(res)
: _res(BRULE_VALID)
, _codeNode(codeNode)
{
}
inline

View file

@ -556,10 +556,10 @@ inline
CStringSeparator::CStringSeparator(const std::string &str, const std::string &motif)
:_Index(0)
,_NewIndex(0)
,_Str(str)
,_Motif(motif)
,_Delta(0)
,_StartIndex(0)
,_Str(str)
,_Motif(motif)
{
}
inline

View file

@ -583,9 +583,9 @@ void CStateInstance::setNextPunctualState(CAIState* state)
inline
CPersistentStateInstance::CPersistentStateInstance(CStateMachine& reactionContainer)
: CKeyWordOwner()
, CStateInstance(NULL)
, _StartState()
, _Container(reactionContainer)
, CStateInstance(NULL)
{
}

View file

@ -100,6 +100,7 @@ public:
case TypeFloat: return NLMISC::toString(_f);
// case TypeAliasTree: return _a->treeToString();
// case TypeEventTree: return _e->toString();
default: break;
}
return "<Invalid Argument Type>";
}
@ -115,6 +116,7 @@ public:
case TypeFloat: f.serial(_f); break;
// case TypeAliasTree: f.serial(_a); break;
// case TypeEventTree: f.serial(_e); break;
default: break;
}
}

View file

@ -1313,7 +1313,7 @@ static void parsePrimGrpFaunaSpawn(const CAIAliasDescriptionNode *treeNode,const
// deal with the weight
std::string s;
uint32 weight;
uint32 weight = 0;
if (prim->getPropertyByName("weight",s))
{
weight=atoi(s.c_str());
@ -2409,7 +2409,9 @@ static void parsePrimDynNpcZoneShape(const CAIAliasDescriptionNode *aliasNode, c
static void parsePrimRoadTrigger(const CAIAliasDescriptionNode *aliasNode, const IPrimitive *prim)
{
CPrimVector t1, t2, sp;
float t1r, t2r, spr;
float t1r = 0.f;
float t2r = 0.f;
float spr = 0.f;
string s;
for (uint i=0; i<prim->getNumChildren(); ++i)
@ -2494,6 +2496,8 @@ static void parsePrimDynRoad(const CAIAliasDescriptionNode *aliasNode, const IPr
case AITypeRoadTrigger:
parsePrimRoadTrigger(nextTreeNode(aliasNode,child),child);
break;
default:
break;
}
}
}
@ -2527,6 +2531,8 @@ static void parsePrimGeomItems(const CAIAliasDescriptionNode *aliasNode, const I
case AITypeDynRoad:
parsePrimDynRoad(nextTreeNode(aliasNode,child),child);
break;
default:
break;
}
}
}
@ -2643,6 +2649,8 @@ static void parsePrimCellZones(const CAIAliasDescriptionNode *aliasNode, const I
case AITypeCellZone:
parsePrimCellZone(nextTreeNode(aliasNode,child),child);
break;
default:
break;
}
}
}
@ -2847,6 +2855,8 @@ static void parsePrimGroupTemplate(const CAIAliasDescriptionNode *aliasNode, con
}
break;
default:
break;
}
}
@ -2895,6 +2905,8 @@ static void parsePrimGroupFamilyProfileFaunaContent(const CAIAliasDescriptionNod
case AITypeGroupTemplateFauna:
parsePrimGroupTemplate(nextTreeNode(aliasNode,child),child,"C");
break;
default:
break;
}
}
@ -2942,6 +2954,8 @@ static void parsePrimGroupFamilyProfileTribeContent(const CAIAliasDescriptionNod
case AITypeGroupTemplateMultiLevel:
parsePrimGroupTemplate(nextTreeNode(aliasNode,child),child,"C");
break;
default:
break;
}
}
@ -2980,6 +2994,8 @@ static void parsePrimGroupFamilyProfileNpcContent(const CAIAliasDescriptionNode
case AITypeGroupTemplateMultiLevel:
parsePrimGroupTemplate(nextTreeNode(aliasNode,child),child,"C");
break;
default:
break;
}
}
@ -3047,6 +3063,8 @@ static void parsePrimGroupDescriptions(const CAIAliasDescriptionNode *aliasNode,
// case AITypeGroupFamilyProfileGeneric:
// parsePrimGroupFamilyProfileGeneric(nextTreeNode(aliasNode,child),child, GroupFamilyTribe);
// break;
default:
break;
}
}
}
@ -3354,6 +3372,8 @@ static void parsePrimDynSystem(const IPrimitive *prim, const std::string &mapNam
case AITypeOutpost:
parsePrimOutpost(child, mapName, filename);
break;
default:
break;
}
}
}
@ -3388,6 +3408,8 @@ static void parsePrimNogoPointList(const IPrimitive *prim, const std::string &ma
CAIActions::exec("SETNOGO", x, y);
}
break;
default:
break;
}
}
@ -4049,7 +4071,7 @@ NLMISC_COMMAND(loadMapsFromCommon,"load all primitive defined in usedPrimitives
const vector<string> &basePrim = CPrimitiveCfg::getMap(args[0]);
set<string> filter(basePrim.begin(), basePrim.end());
for ( uint i = 0; (sint)i<usedPrimitives.size(); ++i)
for ( uint i = 0; i < usedPrimitives.size(); ++i)
{
const vector<string> &prims = CPrimitiveCfg::getMap(usedPrimitives.asString(i));
for (uint j=0; j<prims.size(); ++j)

View file

@ -125,8 +125,8 @@ private:
inline
CAStarHeapNode::CAStarHeapNode(CTopology::TTopologyRef Ref, uint Father, float Distance, bool Open)
: _Ref(Ref)
, CABaseStarNode(Father, Distance, Open)
: CABaseStarNode(Father, Distance, Open)
, _Ref(Ref)
{
}
@ -197,7 +197,7 @@ class CInsideAStarHeapNode : public CABaseStarNode
public:
friend class CAStarNode;
explicit CInsideAStarHeapNode(const CAStarNode &node, uint Father, CDirection Direction, float Distance, bool Open) : _Node(node), _Direction(Direction), CABaseStarNode(Father,Distance,Open)
explicit CInsideAStarHeapNode(const CAStarNode &node, uint Father, CDirection Direction, float Distance, bool Open) : CABaseStarNode(Father,Distance,Open), _Direction(Direction), _Node(node)
{
}
@ -924,6 +924,9 @@ void CWorldMap::countCells(uint &compute, uint &white, uint &simple, uint &multi
}
return true;
}
break;
default:
break;
}
return false;
@ -1126,6 +1129,8 @@ void CWorldMap::countCells(uint &compute, uint &white, uint &simple, uint &multi
}
return false;
}
default:
break;
}
return false;
@ -1205,7 +1210,8 @@ void CWorldMap::countCells(uint &compute, uint &white, uint &simple, uint &multi
}
break;
}
default:
break;
}
return false;
}
@ -1319,7 +1325,8 @@ void CWorldMap::countCells(uint &compute, uint &white, uint &simple, uint &multi
temp.setPosS(pos);
return true;
}
default:
break;
}
return false;
}

View file

@ -1487,8 +1487,8 @@ uint32 CTopology::TTopologyId::getVal() const
inline
CTopology::TTopologyRef::TTopologyRef()
: _RootCell(NULL)
, TTopologyId()
: TTopologyId()
, _RootCell(NULL)
{
}
@ -2238,7 +2238,7 @@ private:
inline
CWhiteCell::CWhiteCell(CWorldMap const& worldMapPtr)
: _HeightMap(NULL), CRootCell(worldMapPtr)
: CRootCell(worldMapPtr), _HeightMap(NULL)
{
}
@ -3236,13 +3236,13 @@ public:
};
inline
CWorldPosition::CWorldPosition(const CRootCell *cell, const CMapPosition &pos, const CSlot &slot) : _RootCell(cell), CMapPosition(pos), CSlot(slot)
CWorldPosition::CWorldPosition(const CRootCell *cell, const CMapPosition &pos, const CSlot &slot) : CMapPosition(pos), CSlot(slot), _RootCell(cell)
{
_cellLinkage=_RootCell->getCellLink(*this);
}
inline
CWorldPosition::CWorldPosition(const CRootCell *cell, const CMapPosition &pos, const CSlot &slot,bool generationOnly) : _RootCell(cell), CMapPosition(pos), CSlot(slot)
CWorldPosition::CWorldPosition(const CRootCell *cell, const CMapPosition &pos, const CSlot &slot,bool generationOnly) : CMapPosition(pos), CSlot(slot), _RootCell(cell)
{
}

View file

@ -23,8 +23,8 @@
#include "module_core.h"
#include "module_utils.h"
class ::IModuleCore;
class ::IModule;
class IModuleCore;
class IModule;
/**
* A module parent is a class encapsulating the modules contained in a module core

View file

@ -418,6 +418,8 @@ bool CDBDescriptionParser::loadAttribute(xmlNodePtr node, CTableNode& table)
return false;
}
break;
default:
break;
}
return true;
@ -727,6 +729,8 @@ bool CDBDescriptionParser::buildColumns(uint tableIndex)
table.Columns.push_back(column);
}
break;
default:
break;
}
}

View file

@ -104,6 +104,8 @@ std::string CDbMessage::buildLogString(const CDBDescriptionParser& description)
else if (typenode.ByteSize == 4) result += NLMISC::toString(*(uint32*)dataptr);
}
break;
default:
break;
}
}
}
@ -166,6 +168,8 @@ void CDbMessage::getHRContent(const CDBDescriptionParser& description, std::stri
else if (column.ByteSize == 4) strValue = NLMISC::toString(asUint32());
}
break;
default:
break;
}
result = NLMISC::toString("%-12s: ", "UpdateValue");

View file

@ -1016,7 +1016,7 @@ class CUpdateLog
{
public:
CUpdateLog() : UpdateId(0xffffffff), _Updates(NULL), _OwnUpdates(false) { }
CUpdateLog() : UpdateId(0xffffffff), _OwnUpdates(false), _Updates(NULL) { }
~CUpdateLog();
@ -1373,12 +1373,6 @@ inline uint32 CDbMessage::getMessageHeaderSize()
size += sizeof(_Value3[0]);
break;
case AddString:
break;
case UnmapString:
break;
case ReleaseRow:
size += sizeof(_ObjectIndex.Table)+sizeof(_ObjectIndex.Row);
break;
@ -1388,10 +1382,7 @@ inline uint32 CDbMessage::getMessageHeaderSize()
size += 2;
break;
case PushContext:
break;
case PopContext:
default:
break;
}

View file

@ -267,7 +267,7 @@ class CMixedStreamFile : public NLMISC::IStream
public:
/// Constructor
CMixedStreamFile() : _File(NULL), NLMISC::IStream(false)
CMixedStreamFile() : NLMISC::IStream(false), _File(NULL)
{
}

View file

@ -157,7 +157,7 @@ class CObjectIndex
public:
/// Constructor of invalid index
explicit CObjectIndex(bool validateChecksum = false) : _Table(INVALID_TABLE_INDEX), _Row(INVALID_ROW_INDEX), _Checksum((TIndexChecksum)~VALID_INDEX_CHECKSUM)
explicit CObjectIndex(bool validateChecksum = false) : _Row(INVALID_ROW_INDEX), _Table(INVALID_TABLE_INDEX), _Checksum((TIndexChecksum)~VALID_INDEX_CHECKSUM)
{
if (validateChecksum)
validate();
@ -166,7 +166,7 @@ public:
}
/// Constructor
CObjectIndex(TTableIndex table, TRowIndex row) : _Table(table), _Row(row) { validate(); }
CObjectIndex(TTableIndex table, TRowIndex row) : _Row(row), _Table(table) { validate(); }
/// Constructor
CObjectIndex(const CObjectIndex &index) { *this = index; }
@ -397,13 +397,13 @@ public:
/// Constructor
explicit CColumnIndex(TTableIndex table = INVALID_TABLE_INDEX, TRowIndex row = INVALID_ROW_INDEX, TColumnIndex column = INVALID_COLUMN_INDEX)
: _Table(table), _Row(row), _Column(column)
: _Table(table), _Column(column), _Row(row)
{
}
/// Constructor
explicit CColumnIndex(const CObjectIndex& object, TColumnIndex column)
: _Table(INVALID_TABLE_INDEX), _Row(INVALID_ROW_INDEX), _Column(INVALID_COLUMN_INDEX)
: _Table(INVALID_TABLE_INDEX), _Column(INVALID_COLUMN_INDEX), _Row(INVALID_ROW_INDEX)
{
if (!object.isValid())
return;

View file

@ -81,7 +81,7 @@ public:
TRowData data() { return (*_MapIt).second + (_Mapped ? sizeof(CMappedHeader) : sizeof(CHeader)); }
/// Get row data
const TRowData data() const { return (*_MapIt).second + (_Mapped ? sizeof(CMappedHeader) : sizeof(CHeader)); }
TRowData data() const { return (*_MapIt).second + (_Mapped ? sizeof(CMappedHeader) : sizeof(CHeader)); }
/// Default Constructor, should never be used
explicit CAccessor() { }
@ -104,7 +104,7 @@ public:
uint64 key() const { return mapped() ? ((CMappedHeader*)fullRow())->getKey() : 0; }
/// Get Full Row Data
const TRowData fullRow() const { return (*_MapIt).second; }
TRowData fullRow() const { return (*_MapIt).second; }
/// Equals

View file

@ -35,13 +35,13 @@ class CBasicEffect
public:
/// Constructor
CBasicEffect(EFFECT_FAMILIES::TEffectFamily family, const TDataSetRow & creatorId, const TDataSetRow & targetRowId)
: _Family(family), _CreatorRowId(creatorId), _TargetRowId(targetRowId)
: _CreatorRowId(creatorId), _TargetRowId(targetRowId), _Family(family)
{
_EffectId = ++_EffectCounter;
}
CBasicEffect( EFFECT_FAMILIES::TEffectFamily family, const TDataSetRow & creatorId, const TDataSetRow & targetRowId, uint32 effectId )
: _Family(family), _CreatorRowId(creatorId), _TargetRowId(targetRowId), _EffectId(effectId)
: _CreatorRowId(creatorId), _TargetRowId(targetRowId), _Family(family), _EffectId(effectId)
{
}

View file

@ -119,7 +119,7 @@ public:
uint8 Index; // index of the phrase in the player memorized phrase interface if != 0xff
CEGSExecuteMsg() : Index(0xff), Cyclic(false)
CEGSExecuteMsg() : Cyclic(false), Index(0xff)
{}
virtual void description ()

View file

@ -121,9 +121,9 @@ namespace MSW
CResultBase(MYSQL_RES *result)
: _Result(result),
_CurrentRow(NULL),
_FieldLength(NULL)
: _CurrentRow(NULL),
_FieldLength(NULL),
_Result(result)
{
}

View file

@ -26,7 +26,7 @@ CBrain::CBrain(CMood &personality) : CMood(personality)
_UpdateEvery = 0;
}
CBrain::CBrain(const CBrain &c)
CBrain::CBrain(const CBrain &c) : CMood()
{
_Personality = c._Personality;
_RealTime = c._RealTime;

View file

@ -95,7 +95,7 @@ private:
enum { DEFAULT, PARA, HEADER, FOOTER, FILE_HEADER, FILE_FOOTER, TBL, TABTBL, TEXT } mode;
public:
CCruncher(): mode(DEFAULT), firstTblLine(true)
CCruncher(): firstTblLine(true), readColumnName(false), mode(DEFAULT)
{
}

View file

@ -220,7 +220,7 @@ void ProcessDirectory( const CSString& dir, const StringVector& extensions )
sixieme = (int)files.size() / 6;
printf( "%d files are processed", files.size() );
printf( "%u files are processed", (uint) files.size() );
for (uint32 i=0; i<files.size(); ++i)
{

View file

@ -126,6 +126,8 @@ int main(int argc, char *argv[])
fclose(fp);
}
break;
default:
break;
}
}

View file

@ -149,7 +149,7 @@ int main(int argc, char *argv[])
CSheetId::init(false);
for(int f = 0; f < filenames.size(); f++)
for(uint f = 0; f < filenames.size(); f++)
{
fileName = filenames[f];
@ -278,6 +278,8 @@ int main(int argc, char *argv[])
if (!pdr.writeToTxtFile(outputFileName.c_str(), CPersistentDataRecord::LINES_STRING))
goto failureWrite;
break;
default:
break;
}
// return 0;

View file

@ -45,24 +45,21 @@ sint main(sint argc, char **argv)
var = cf.getVarPtr("Paths");
if (var != NULL)
{
uint i;
for (i=0; (sint)i<var->size(); ++i)
for (uint i=0; i < var->size(); ++i)
LookupPath.push_back(var->asString(i));
}
var = cf.getVarPtr("NoRecursePaths");
if (var != NULL)
{
uint i;
for (i=0; (sint)i<var->size(); ++i)
for (uint i=0; i < var->size(); ++i)
LookupNoRecursePath.push_back(var->asString(i));
}
var = cf.getVarPtr("PacsPrimPaths");
if (var != NULL)
{
uint i;
for (i=0; (sint)i<var->size(); ++i)
for (uint i=0; i < var->size(); ++i)
PacsPrimPath.push_back(var->asString(i));
}
@ -77,14 +74,12 @@ sint main(sint argc, char **argv)
var = cf.getVarPtr("Commands");
if (var != NULL)
{
uint i;
for (i=0; (sint)i<var->size(); ++i)
for (uint i=0; i < var->size(); ++i)
commands.push_back(var->asString(i));
}
uint i;
string cmd;
for (i=1; (sint)i<argc; ++i)
for (sint i=1; i < argc; ++i)
{
if (string(argv[i]) == string("-"))
{
@ -108,7 +103,7 @@ sint main(sint argc, char **argv)
NLMISC::createDebug ();
nlinfo("Running commands:");
for (i=0; i<commands.size(); ++i)
for (uint i=0; i<commands.size(); ++i)
ICommand::execute(commands[i], *InfoLog);
return 0;

View file

@ -101,8 +101,10 @@ void CPackedWorldBuilder::build(const std::vector<std::string> &zoneNames, const
{
std::vector<CSmartPtr<CZoneRefCount> > zones;
zones.reserve(zoneNames.size());
sint zoneMinX, zoneMaxX;
sint zoneMinY, zoneMaxY;
sint zoneMinX = 0;
sint zoneMaxX = 0;
sint zoneMinY = 0;
sint zoneMaxY = 0;
bool firstZoneCorner = true;
for(uint k = 0; k < zoneNames.size(); ++k)
{
@ -252,7 +254,7 @@ void CPackedWorldBuilder::build(const std::vector<std::string> &zoneNames, const
CIFile f;
if (f.open(cacheFilename))
{
CPackedZoneBase *pb;
CPackedZoneBase *pb = NULL;
f.serialPolyPtr(pb);
packedZoneGrid(x, y) = pb;
mustRebuild = false;