Changed: #825 Remove all warning when compiling Ryzom on Linux

This commit is contained in:
kervala 2010-05-13 22:45:24 +02:00
parent 88bc352b2b
commit 737427674c
166 changed files with 491 additions and 491 deletions

View file

@ -106,7 +106,7 @@ public:
}
// get number of animation states
uint getNumAnimationState() const { return _AnimationStates.size(); }
uint getNumAnimationState() const { return (uint)_AnimationStates.size(); }
// get an animation state by its index
CAnimationState *getAnimationStateByIndex(uint index);

View file

@ -276,7 +276,7 @@ CAnimation::TAnimId CAnimationState::chooseAnim(uint32 jobSpecialisation, EGSPD:
{
uint i;
uint best;
const uint count = _Animations.size ();
const uint count = (uint)_Animations.size ();
double bestAng = 1000.0; // Big value to be > to the first element.
for (i=0; i<count; i++)
{

View file

@ -155,7 +155,7 @@ public:
//@}
uint getNumAnimation() const { return _Animations.size(); }
uint getNumAnimation() const { return (uint)_Animations.size(); }
CAnimation *getAnimationByIndex(uint index);
// Transform a string in state id

View file

@ -149,7 +149,7 @@ static /*inline*/ void addNode( ICDBNode *newNode, std::string newName, CCDBNode
{
if ( ! bankName.empty() )
{
CCDBNodeBranch::mapNodeByBank( newNode, bankName, clientOnly, nodes.size()-1 );
CCDBNodeBranch::mapNodeByBank( newNode, bankName, clientOnly, (uint)nodes.size()-1 );
//nldebug( "CDB: Mapping %s for %s (node %u)", newName.c_str(), bankName.c_str(), nodes.size()-1 );
}
else
@ -273,7 +273,7 @@ void CCDBNodeBranch::init( xmlNodePtr node, NLMISC::IProgressCallback &progressC
_IdBits = 0;
for ( uint b=0; b!=NB_CDB_BANKS; ++b )
{
uint nbNodesOfBank = _CDBBankToUnifiedIndexMapping[b].size();
uint nbNodesOfBank = (uint)_CDBBankToUnifiedIndexMapping[b].size();
uint idb = 0;
if ( nbNodesOfBank > 0 )
for ( idb=1; nbNodesOfBank > unsigned(1<<idb) ; idb++ ) {}

View file

@ -278,7 +278,7 @@ public:
virtual uint nbStage();
/// Return the number of attached FXs remaining to remove.
virtual uint nbAttachedFXToRemove() {return _AttachedFXListToRemove.size();}
virtual uint nbAttachedFXToRemove() {return (uint)_AttachedFXListToRemove.size();}
/// Set the animation state key.
bool animationStateKey(TAnimationType channel, TAnimStateId value);

View file

@ -176,7 +176,7 @@ static bool send(const string &url)
"Host: crashcounter.nevrax.com\n"
"User-agent: Ryzom\n"
"\n";
uint32 size = buffer.size();
uint32 size = (uint32)buffer.size();
if(!url.empty())
{
if(CrashCounterSock.send((uint8 *)buffer.c_str(), size, false) != CSock::Ok)

View file

@ -302,7 +302,7 @@ void CAutomatonStateSheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStrea
}
else
{
size = ModeTransition.size ();
size = (uint32)ModeTransition.size ();
f.serial (size);
}
for (uint i = 0; i < size; i++)
@ -560,7 +560,7 @@ void CAutomatonListSheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStream
}
else
{
uint32 nNb = Automatons.size();
uint32 nNb = (uint32)Automatons.size();
f.serial(nNb);
map<string, CAutomatonSheet*>::iterator it = Automatons.begin();
while (it != Automatons.end())

View file

@ -731,7 +731,7 @@ void CCharacterSheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
// body to bone
f.serial(BodyToBone);
// attack list
uint32 size = AttackLists.size();
uint32 size = (uint32)AttackLists.size();
f.serial(size);
AttackLists.resize(size);
//

View file

@ -103,7 +103,7 @@ void CEmotListSheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
}
else
{
size = Emots.size();
size = (uint32)Emots.size();
f.serial (size);
}
for (uint i = 0; i < size; i++)

View file

@ -74,7 +74,7 @@ public:
*/
const CPlantInfo *getPlantInfoFromWeightedIndex(uint64 index) const;
// Plant info access
uint getNumPlantInfos() const { return _Plants.size(); }
uint getNumPlantInfos() const { return (uint)_Plants.size(); }
const CPlantInfo &getPlantInfo(uint index) const { return _Plants[index]; }
private:
std::vector<CPlantInfo> _Plants;

View file

@ -48,7 +48,7 @@ public:
const char *getAdvantageFX() const;
const char *getAttackFX() const;
// static fxs
uint getNumStaticFX() const { return _StaticFXs.size(); }
uint getNumStaticFX() const { return (uint)_StaticFXs.size(); }
const char *getStaticFXName(uint index) const;
const char *getStaticFXBone(uint index) const;
const NLMISC::CVector &getStaticFXOffset(uint index) const;

View file

@ -379,7 +379,7 @@ void CItemSheet::build(const NLGEORGES::UFormElm &item)
nlwarning("<loadCosmetics> Can't load the VPValue from sheet name in sheet %s", Id.toString().c_str() );
else
{
sint i = pos - 1;
sint i = (sint)pos - 1;
for(; i >= 0; i-- )
{
if ( !isdigit( sheetName[i] ) )

View file

@ -309,7 +309,7 @@ void CRaceStatsSheet::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
f.serial(Automaton);
f.serial(BodyToBone);
// attack list
uint32 size = AttackLists.size();
uint32 size = (uint32)AttackLists.size();
f.serial(size);
AttackLists.resize(size);
//

View file

@ -174,7 +174,7 @@ void CUnblockTitlesSheet::build(const UFormElm &item)
if( !strSkillsNeeded.empty() )
{
uint16 skillsNeededSz = TitlesUnblock[title].SkillsNeeded.size();
uint16 skillsNeededSz = (uint16)TitlesUnblock[title].SkillsNeeded.size();
TitlesUnblock[title].SkillsNeeded.resize(skillsNeededSz+1);
TitlesUnblock[title].SkillsLevelNeeded.resize(skillsNeededSz+1);
@ -235,7 +235,7 @@ void CUnblockTitlesSheet::build(const UFormElm &item)
if( !strItemsNeeded.empty() )
{
uint16 itemsNeededSz = TitlesUnblock[title].ItemsNeeded.size();
uint16 itemsNeededSz = (uint16)TitlesUnblock[title].ItemsNeeded.size();
TitlesUnblock[title].ItemsNeeded.resize(itemsNeededSz+1);
TitlesUnblock[title].ItemsQualityNeeded.resize(itemsNeededSz+1);

View file

@ -116,7 +116,7 @@ CColorSlotManager::TIntCouple CColorSlotManager::findFileExtensionInSlot(const s
TStringVect::const_iterator extIt = std::find(it->begin(), it->end(), ext);
if (extIt != it->end())
{
return std::make_pair(it - _Slots.begin(), extIt - it->begin());
return std::make_pair((uint)(it - _Slots.begin()), (uint)(extIt - it->begin()));
}
}
return TIntCouple((uint) NotFound, 0);
@ -136,7 +136,7 @@ uint CColorSlotManager::addSlot(const TStringVect &slotDescs)
{
NLMISC::strupr(_Slots.back()[k]);
}
return _Slots.size() - 1;
return (uint)_Slots.size() - 1;
}
@ -327,7 +327,7 @@ bool CColorSlotManager::addSlotsFromConfigFile(NLMISC::CConfigFile &cf, uint &st
{
return false;
}
uint startSlot = _Slots.size();
uint startSlot = (uint)_Slots.size();
@ -362,7 +362,7 @@ bool CColorSlotManager::addSlotsFromConfigFile(NLMISC::CConfigFile &cf, uint &st
}
startSlotDest = startSlot;
numSlots = _Slots.size() - startSlot;
numSlots = (uint)_Slots.size() - startSlot;
return true;
}

View file

@ -754,7 +754,7 @@ NLMISC_COMMAND(log, "Add/Del Positive/Negative Filters for logs", "Log System <d
NLMISC_COMMAND(execScript, "Execute a script file (.cmd)","<FileName>")
{
int size = args.size();
int size = (int)args.size();
if (size != 1)
return false;
@ -839,7 +839,7 @@ NLMISC_COMMAND(execScript, "Execute a script file (.cmd)","<FileName>")
NLMISC_COMMAND(db, "Modify Database","<Property> <Value>")
{
CInterfaceManager *pIM = CInterfaceManager::getInstance();
int size = args.size();
int size = (int)args.size();
if (size == 2)
{
#if !FINAL_VERSION
@ -4046,7 +4046,7 @@ NLMISC_COMMAND(logFaberMpCompatibles, "log all MP compatibles for faber the item
}
// header
uint numMpSlots= brick->FaberPlan.ItemPartMps.size();
uint numMpSlots= (uint)brick->FaberPlan.ItemPartMps.size();
nlinfo("********** FABERLOG **********");
nlinfo(" ItemBuilt Origin: %s", ITEM_ORIGIN::enumToString(itemBuilt->ItemOrigin).c_str() );
nlinfo(" NumMPSlot: %d", numMpSlots);
@ -5028,8 +5028,8 @@ bool CUserCommand::execute(const std::string &/* rawCommandString */, const std:
// Find the good keyword table
CMode *mode = NULL;
if (FixedArgModes.find (args.size()) != FixedArgModes.end())
mode = &(FixedArgModes[args.size()]);
if (FixedArgModes.find ((uint)args.size()) != FixedArgModes.end())
mode = &(FixedArgModes[(uint)args.size()]);
else
if (!InfiniteMode.Keywords.empty() && (args.size() >= InfiniteMode.KeywordsCount))
mode = &InfiniteMode;
@ -5258,7 +5258,7 @@ NLMISC_COMMAND(dumpPosAsPrim, "ld helper : add current position to pos.primitive
{
COFile stream;
stream.open(path);
stream.serialBuffer((uint8 *) &srcFile[0], srcFile.size());
stream.serialBuffer((uint8 *) &srcFile[0], (uint)srcFile.size());
}
catch(NLMISC::EStream &e)
{

View file

@ -382,7 +382,7 @@ static uint getNumZones()
if (Landscape == NULL) return 0;
std::vector<std::string> zoneLoaded;
Landscape->getAllZoneLoaded(zoneLoaded);
return zoneLoaded.size();
return (uint)zoneLoaded.size();
}
//-----------------------------------------------

View file

@ -491,7 +491,7 @@ void CContinentManager::serialUserLandMarks(NLMISC::IStream &f)
f.serialVersion(1);
if (!f.isReading())
{
uint32 numCont = _Continents.size();
uint32 numCont = (uint32)_Continents.size();
f.serial(numCont);
for(TContinents::iterator it = _Continents.begin(); it != _Continents.end(); ++it)
{

View file

@ -147,17 +147,17 @@ void flushDebugStack(const std::string &title)
{
// Log Title.
string strTmp = toString(" %s\n", title.c_str());
DebugFile.serialBuffer((uint8*)strTmp.c_str(), strTmp.size());
DebugFile.serialBuffer((uint8*)strTmp.c_str(), (uint)strTmp.size());
for(uint i=0; i<DebugStack.size(); ++i)
{
strTmp = toString(" %s\n", DebugStack[i].c_str());
DebugFile.serialBuffer((uint8*)strTmp.c_str(), strTmp.size());
DebugFile.serialBuffer((uint8*)strTmp.c_str(), (uint)strTmp.size());
}
// Empty line separator
strTmp = toString("\n");
DebugFile.serialBuffer((uint8*)strTmp.c_str(), strTmp.size());
DebugFile.serialBuffer((uint8*)strTmp.c_str(), (uint)strTmp.size());
}
// No Output File -> nlwarning
else

View file

@ -305,7 +305,7 @@ void CDecal::renderTriCache(NL3D::IDriver &drv, NL3D::CShadowPolyReceiver &/*
{
{
CVertexBufferReadWrite vba;
_VB.setNumVertices(_TriCache.size());
_VB.setNumVertices((uint32)_TriCache.size());
_VB.lock(vba);
memcpy(vba.getVertexCoordPointer(), &_TriCache[0], sizeof(CRGBAVertex) * _TriCache.size());
}
@ -337,23 +337,23 @@ void CDecal::renderTriCache(NL3D::IDriver &drv, NL3D::CShadowPolyReceiver &/*
simpleMat.texEnvArg0RGB(0, CMaterial::Constant, CMaterial::SrcColor);
simpleMat.setDoubleSided(true);
simpleMat.texConstantColor(0, CRGBA::White);
drv.renderRawTriangles(simpleMat, 0, _TriCache.size() / 3);
drv.renderRawTriangles(simpleMat, 0, (uint32)_TriCache.size() / 3);
IDriver::TPolygonMode pm = drv.getPolygonMode();
drv.setPolygonMode(IDriver::Line);
simpleMat.texConstantColor(0, CRGBA::Red);
drv.renderRawTriangles(simpleMat, 0, _TriCache.size() / 3);
drv.renderRawTriangles(simpleMat, 0, (uint32)_TriCache.size() / 3);
drv.setPolygonMode(pm);
}
else
{
drv.renderRawTriangles(_Material, 0, _TriCache.size() / 3);
drv.renderRawTriangles(_Material, 0, (uint32)_TriCache.size() / 3);
}
}
else
{
{
CVertexBufferReadWrite vba;
_VB.setNumVertices(_TriCache.size());
_VB.setNumVertices((uint32)_TriCache.size());
_VB.lock(vba);
NLMISC::CRGBA col = _Diffuse;
if (drv.getVertexColorFormat()==CVertexBuffer::TBGRA)
@ -391,11 +391,11 @@ void CDecal::renderTriCache(NL3D::IDriver &drv, NL3D::CShadowPolyReceiver &/*
static CMaterial simpleMat2;
simpleMat2.initUnlit();
simpleMat2.setDoubleSided(true);
drv.renderRawTriangles(simpleMat2, 0, _TriCache.size() / 3);
drv.renderRawTriangles(simpleMat2, 0, (uint32)_TriCache.size() / 3);
}
else
{
drv.renderRawTriangles(_Material, 0, _TriCache.size() / 3);
drv.renderRawTriangles(_Material, 0, (uint32)_TriCache.size() / 3);
}
}
}
@ -515,7 +515,7 @@ void CDecal::render(NL3D::UDriver &/* drv */,
planes[1].make(-CVector::J, camPos - tileNear * CVector::J),
planes[2].make(CVector::I, camPos + tileNear * CVector::I),
planes[3].make(-CVector::I, camPos - tileNear * CVector::I);
uint numVerts = clipPoly.Vertices.size();
uint numVerts = (uint)clipPoly.Vertices.size();
clipPoly2D.Vertices.resize(numVerts);
for (uint k = 0; k < numVerts; ++k)
{

View file

@ -735,7 +735,7 @@ bool CEntityManager::remove(uint slot, bool warning)
//-----------------------------------------------
void CEntityManager::removeCollision()
{
const uint nbEntities = _Entities.size();
const uint nbEntities = (uint)_Entities.size();
for(uint i=0; i<nbEntities; ++i)
{
// Is the entity allocated.
@ -1391,7 +1391,7 @@ void CEntityManager::updatePostCamera(uint clippedUpdateTime, const std::vector<
}
// Update visible entities post positions.
const uint count = _VisibleEntities.size ();
const uint count = (uint)_VisibleEntities.size ();
for(i=0; i<count; ++i)
{
CEntityReference &visibleEntity = _VisibleEntities[i];
@ -1419,7 +1419,7 @@ void CEntityManager::updatePostRender()
TextContext->setFontSize(ClientCfg.NameFontSize);
CRGBA color;
const uint activeCount = _ActiveEntities.size ();
const uint activeCount = (uint)_ActiveEntities.size ();
uint i;
for(i=0; i<activeCount; i++)
{
@ -1429,7 +1429,7 @@ void CEntityManager::updatePostRender()
visibleEntity.Entity->updateAllPostRender ();
}
const uint count = _VisibleEntities.size ();
const uint count = (uint)_VisibleEntities.size ();
for(i=0; i<count; ++i)
{
CEntityReference &visibleEntity = _VisibleEntities[i];
@ -1551,20 +1551,20 @@ void CEntityManager::writeEntities()
return;
string strTmp = "StartCommands = {\n";
f.serialBuffer((uint8*)strTmp.c_str(), strTmp.size());
f.serialBuffer((uint8*)strTmp.c_str(), (uint)strTmp.size());
const uint nb = _Entities.size();
const uint nb = (uint)_Entities.size();
for(uint i=1; i<nb; ++i)
{
if(_Entities[i])
{
strTmp = toString("\"%s\",\t\"%f\", \"%f\", \"%f\", \"%f\", \"%f\", \"%f\",\t// %3d\n", _Entities[i]->sheetId().toString().c_str(), _Entities[i]->pos().x, _Entities[i]->pos().y, _Entities[i]->pos().z, _Entities[i]->front().x, _Entities[i]->front().y, _Entities[i]->front().z, i);
f.serialBuffer((uint8*)strTmp.c_str(), strTmp.size());
f.serialBuffer((uint8*)strTmp.c_str(), (uint)strTmp.size());
}
}
strTmp = "};\n";
f.serialBuffer((uint8*)strTmp.c_str(), strTmp.size());
f.serialBuffer((uint8*)strTmp.c_str(), (uint)strTmp.size());
// Close the File.
f.close();
@ -1587,7 +1587,7 @@ void CEntityManager::serial(class NLMISC::IStream &f) throw(NLMISC::EStream)
// f.serial(_EntitiesAllocated); no need to serialize this one except maybe to check.
// Serialize each entity.
const uint nb = _Entities.size();
const uint nb = (uint)_Entities.size();
for(uint i=0; i<nb; ++i)
{
NLMISC::CSheetId si;
@ -1636,7 +1636,7 @@ void CEntityManager::dumpXML(class NLMISC::IStream &f)
// Start the opening of a new node named Identity
f.xmlPush("Entities");
const uint nb = _Entities.size();
const uint nb = (uint)_Entities.size();
for(uint i=0; i<nb; ++i)
{
// Add a comment
@ -1731,7 +1731,7 @@ CEntityCL *CEntityManager::getEntityByName (uint32 stringId) const
if (stringId)
{
uint i;
const uint count = _Entities.size();
const uint count = (uint)_Entities.size();
for (i=0; i<count; i++)
{
if(_Entities[i])
@ -1747,7 +1747,7 @@ CEntityCL *CEntityManager::getEntityByName (uint32 stringId) const
CEntityCL *CEntityManager::getEntityByName (const ucstring &name, bool caseSensitive, bool complete) const
{
ucstring source = name;
const uint size = source.size();
const uint size = (uint)source.size();
if (!caseSensitive)
{
uint j;
@ -1756,7 +1756,7 @@ CEntityCL *CEntityManager::getEntityByName (const ucstring &name, bool caseSensi
}
uint i;
const uint count = _Entities.size();
const uint count = (uint)_Entities.size();
uint selectedEntityId;
float selectedEntityDist = FLT_MAX; // No selected Entity
@ -1818,7 +1818,7 @@ CEntityCL *CEntityManager::getEntityByCompressedIndex(TDataSetIndex compressedIn
if (compressedIndex != INVALID_DATASET_ROW)
{
uint i;
const uint count = _Entities.size();
const uint count = (uint)_Entities.size();
for (i=0; i<count; i++)
{
if(_Entities[i])
@ -1861,7 +1861,7 @@ void CEntityManager::managePACSTriggers()
void CEntityManager::removeColUserOther()
{
uint i;
const uint count = _Entities.size();
const uint count = (uint)_Entities.size();
for(i=1; i<count; i++)
{
if(_Entities[i])
@ -1883,7 +1883,7 @@ void CEntityManager::removeColUserOther()
void CEntityManager::restoreColUserOther()
{
uint i;
const uint count = _Entities.size();
const uint count = (uint)_Entities.size();
for(i=1; i<count; i++)
{
if(_Entities[i])

View file

@ -325,7 +325,7 @@ public :
/** Count the number of emot
* \return uint : the number of emot already known.
*/
uint getNbEmots() {return _EmotList->Emots.size();}
uint getNbEmots() {return (uint)_EmotList->Emots.size();}
/** Method to get the emot associated to an index.
* \param index : number of the emot asked.
* \param result : will be filled with the name of the emot associated.

View file

@ -1184,7 +1184,7 @@ uint32 CEntityCL::addInstance(const string &shapeName, const std::string &stickP
// Create new instance slot?
if(instIdx == CEntityCL::BadIndex)
{
idx= _Instances.size();
idx= (uint32)_Instances.size();
_Instances.push_back(SInstanceCL());
}
@ -1255,7 +1255,7 @@ void CEntityCL::show(bool s)
//-----------------------------------------------
void CEntityCL::hideSkin()
{
const uint nbInst = _Instances.size();
const uint nbInst = (uint)_Instances.size();
for(uint i = 0; i<nbInst; ++i)
{
if(!_Instances[i].Current.empty())
@ -2061,7 +2061,7 @@ bool CEntityCL::clipped (const std::vector<NLMISC::CPlane> &clippingPlanes, cons
// Speed Clip: clip just the sphere.
// if out of only plane, entirely out.
const uint count = clippingPlanes.size ();
const uint count = (uint)clippingPlanes.size ();
uint i;
for(i=0;i<count;i++)
{
@ -2391,7 +2391,7 @@ ucstring CEntityCL::removeShardFromName(const ucstring &name)
return name;
// if it is the same as the shard name of the user, remove it
if(ucstrnicmp(name, p0+1, p1-p0-1, PlayerSelectedHomeShardName)==0)
if(ucstrnicmp(name, (uint)p0+1, (uint)(p1-p0-1), PlayerSelectedHomeShardName)==0)
return name.substr(0,p0) + name.substr(p1+1);
// else don't modify
else

View file

@ -170,7 +170,7 @@ const std::string& CLoginStateMachine::toString(CLoginStateMachine::TEvent event
string sLog = NLMISC::toString("[%s] %s -> %s\n", CLoginStateMachine::toString(ev).c_str(), CLoginStateMachine::toString(_CurrentState).c_str(), CLoginStateMachine::toString(stateId).c_str()); \
if ( outputF.open( "error_join.log", true, true ) ) \
{ \
outputF.serialBuffer( (uint8*)(&sLog[0]), sLog.size() ); \
outputF.serialBuffer( (uint8*)(&sLog[0]), (uint)sLog.size() ); \
outputF.close(); \
} \
} \
@ -902,7 +902,7 @@ retryJoinEdit:
time_t currentTime;
time( &currentTime );
string headerS = NLMISC::toString( "\n\n%s%s\n\n", asctime(localtime(&currentTime)), outErrorMsg.c_str() );
outputF.serialBuffer( (uint8*)(&headerS[0]), headerS.size() );
outputF.serialBuffer( (uint8*)(&headerS[0]), (uint)headerS.size() );
// outputF.serialBuffer( (uint8*)(&res[0]), res.size() );
outputF.close();
}

View file

@ -320,10 +320,10 @@ void CGroundFXManager::checkIntegrity()
}
}
}
uint numFX = _ActiveFXs.size();
uint numFX = (uint)_ActiveFXs.size();
nlassert(numFX == _NumFX);
nlassert(numFX <= _MaxNumFX);
uint numCachedFX = _CachedFXs.size();
uint numCachedFX = (uint)_CachedFXs.size();
nlassert(numCachedFX == _NumCachedFX);
nlassert(numCachedFX <= _MaxNumCachedFX);
}

View file

@ -80,7 +80,7 @@ uint CHairSet::getNumHairItem(EGSPD::CPeople::TPeople gspeople) const
{
H_AUTO_USE(RZ_HairSet)
EPeople people = convPeople(gspeople);
return people != DontKnow ? _Hairs[people].size() : 0;
return people != DontKnow ? (uint)_Hairs[people].size() : 0;
}
@ -102,7 +102,7 @@ sint CHairSet::getHairItemFromId(EGSPD::CPeople::TPeople gspeople, uint Id) cons
EPeople people = convPeople(gspeople);
if (people == DontKnow) return -1;
TIntArray::const_iterator it = std::find(_Hairs[people].begin(), _Hairs[people].end(), Id);
if (it != _Hairs[people].end()) return it - _Hairs[people].begin();
if (it != _Hairs[people].end()) return (sint)(it - _Hairs[people].begin());
else return -1;
}

View file

@ -79,7 +79,7 @@ bool CHttpClient::send(const std::string& buffer, bool verbose)
nlassert(_Sock.connected());
if(verbose) nldebug("Sending '%s' to '%s'", buffer.c_str(), _Sock.remoteAddr().asString().c_str());
uint32 size = buffer.size();
uint32 size = (uint32)buffer.size();
if(!buffer.empty())
{
if(_Sock.send((uint8 *)buffer.c_str(), size, false) != CSock::Ok)

View file

@ -30,7 +30,7 @@ using namespace std;
size_t CCurlHttpClient::writeDataFromCurl(void *buffer, size_t size, size_t nmemb, void *pHttpClient)
{
CCurlHttpClient * httpClient = static_cast<CCurlHttpClient*>(pHttpClient);
httpClient->pushReceivedData((uint8*)buffer, size*nmemb);
httpClient->pushReceivedData((uint8*)buffer, (uint)(size*nmemb));
return size*nmemb;
}

View file

@ -375,7 +375,7 @@ void CIGCallback::CIGInstance::updateFromSheets()
H_AUTO_USE(RZ_IGCallback)
nlassert(_EntitySheets.size() == _IG->getNumInstance());
// See for which objects distance should be overriden (object which use a .PLANT sheet)
uint numInstances = _EntitySheets.size();
uint numInstances = (uint)_EntitySheets.size();
for(uint k = 0; k < numInstances; ++k)
{
if (_EntitySheets[k] && _EntitySheets[k]->Type == CEntitySheet::PLANT)
@ -402,7 +402,7 @@ void CIGCallback::CIGInstance::updateManagedFXs()
H_AUTO_USE(RZ_IGCallback)
nlassert(_EntitySheets.size() == _IG->getNumInstance());
// See for which objects distance should be overriden (object which use a .PLANT sheet)
uint numInstances = _EntitySheets.size();
uint numInstances = (uint)_EntitySheets.size();
// vector of fx that should be managed by the dedicated manager. static for malloc perf
static std::vector<CTimedFX> timedFXs;
timedFXs.clear();

View file

@ -193,7 +193,7 @@ void *XmlMalloc4NeL (size_t size)
// if (XmlAllocUsesSTL)
{
int *newB = (int *) xmlStlAlloc.allocate(size + sizeof(int));
*newB = size;
*newB = (int)size;
return (void *) (newB + 1);
}
// else

View file

@ -207,7 +207,7 @@ struct CStatThread : public NLMISC::IRunnable
name = UserEntity->getEntityName().toString();
std::string userid = toString("u%d", NetMngr.getUserId())+name;
return toUpper(getMD5((const uint8 *)userid.c_str(), userid.size()).toString());
return toUpper(getMD5((const uint8 *)userid.c_str(), (uint32)userid.size()).toString());
}
// return true if we sent the connect because we have all information
@ -222,7 +222,7 @@ struct CStatThread : public NLMISC::IRunnable
std::string params;
addParam(params, "ra", randomString());
std::string session = toString("%d%d", NetMngr.getUserId(), CTime::getSecondsSince1970());
addParam(params, "sessioncookie", toUpper(getMD5((const uint8 *)session.c_str(), session.size()).toString()));
addParam(params, "sessioncookie", toUpper(getMD5((const uint8 *)session.c_str(), (uint32)session.size()).toString()));
addParam(params, "cookie", cookie());
addParam(params, "browsertoken", "X");
addParam(params, "platformtoken", "Win32");

View file

@ -69,7 +69,7 @@ static inline uint getCharacterCategory(ucchar c)
static uint skipUCCharsRight(uint startPos, const ucstring &str)
{
uint pos = startPos;
uint endIndex = str.length();
uint endIndex = (uint)str.length();
uint ccat = getCharacterCategory(str[pos]);
// skip characters of the same category
while (pos != endIndex && getCharacterCategory(str[pos]) == ccat) ++pos;
@ -284,11 +284,11 @@ class CAHEditGotoLineBegin : public CAHEdit
// go to the start of line
if (_GroupEdit->getViewText())
{
sint line = _GroupEdit->getViewText()->getLineFromIndex(_GroupEdit->getCursorPos() + _GroupEdit->getPrompt().length());
sint line = _GroupEdit->getViewText()->getLineFromIndex(_GroupEdit->getCursorPos() + (uint)_GroupEdit->getPrompt().length());
if (line == -1) return;
sint newPos = std::max(_GroupEdit->getViewText()->getLineStartIndex(line), (sint) _GroupEdit->getPrompt().length());
if (newPos == -1) return;
_GroupEdit->setCursorPos(newPos - _GroupEdit->getPrompt().length());
_GroupEdit->setCursorPos(newPos - (sint32)_GroupEdit->getPrompt().length());
_GroupEdit->setCursorAtPreviousLineEnd(false);
}
}
@ -306,20 +306,20 @@ class CAHEditGotoLineEnd : public CAHEdit
{
if (_GroupEdit->getViewText()->getMultiLine())
{
sint line = _GroupEdit->getViewText()->getLineFromIndex(_GroupEdit->getCursorPos() + _GroupEdit->getPrompt().length(), _GroupEdit->isCursorAtPreviousLineEnd());
sint line = _GroupEdit->getViewText()->getLineFromIndex(_GroupEdit->getCursorPos() + (uint)_GroupEdit->getPrompt().length(), _GroupEdit->isCursorAtPreviousLineEnd());
if (line == -1) return;
sint newPos;
bool endOfPreviousLine;
_GroupEdit->getViewText()->getLineEndIndex(line, newPos, endOfPreviousLine);
if (newPos != -1)
{
_GroupEdit->setCursorPos(newPos - _GroupEdit->getPrompt().length());
_GroupEdit->setCursorPos(newPos - (sint32)_GroupEdit->getPrompt().length());
_GroupEdit->setCursorAtPreviousLineEnd(endOfPreviousLine);
}
}
else
{
_GroupEdit->setCursorPos(_GroupEdit->getPrompt().length() + _GroupEdit->getInputString().length());
_GroupEdit->setCursorPos((sint32)_GroupEdit->getPrompt().length() + (sint32)_GroupEdit->getInputString().length());
}
}
}
@ -344,7 +344,7 @@ class CAHEditGotoBlockEnd : public CAHEdit
{
void actionPart ()
{
_GroupEdit->setCursorPos(_GroupEdit->getInputStringRef().length());
_GroupEdit->setCursorPos((sint32)_GroupEdit->getInputStringRef().length());
_GroupEdit->setCursorAtPreviousLineEnd(false);
}
};
@ -374,7 +374,7 @@ class CAHEditPreviousLine : public CAHEdit
}
else if (!_GroupEdit->getMaxHistoric() && _GroupEdit->getViewText()->getMultiLine())
{
uint cursorPosInText = _GroupEdit->getCursorPos() + _GroupEdit->getPrompt().length();
uint cursorPosInText = _GroupEdit->getCursorPos() + (uint)_GroupEdit->getPrompt().length();
if (
(_GroupEdit->getCursorPos() == (sint32) _GroupEdit->getInputStringRef().length() && _GroupEdit->getViewText()->getNumLine() == 1) ||
_GroupEdit->getViewText()->getLineFromIndex(cursorPosInText, _GroupEdit->isCursorAtPreviousLineEnd()) == 0
@ -392,7 +392,7 @@ class CAHEditPreviousLine : public CAHEdit
_GroupEdit->getViewText()->getCharacterIndexFromPosition(cx, cy, newCharIndex, newLineEnd);
if (newLineEnd)
{
_GroupEdit->setCursorPos(newCharIndex - _GroupEdit->getPrompt().length());
_GroupEdit->setCursorPos(newCharIndex - (sint32)_GroupEdit->getPrompt().length());
_GroupEdit->setCursorAtPreviousLineEnd(true);
sint32 newPos = _GroupEdit->getCursorPos();
clamp(newPos, (sint32) 0, (sint32) _GroupEdit->getInputStringRef().size());
@ -413,7 +413,7 @@ class CAHEditPreviousLine : public CAHEdit
{
_GroupEdit->setCursorPos(newCharIndex + 1);
}
_GroupEdit->setCursorPos(_GroupEdit->getCursorPos()-_GroupEdit->getPrompt().length());
_GroupEdit->setCursorPos(_GroupEdit->getCursorPos()-(sint32)_GroupEdit->getPrompt().length());
sint32 newpos = _GroupEdit->getCursorPos();
clamp(newpos, (sint32) 0, (sint32)_GroupEdit->getInputStringRef().size());
_GroupEdit->setCursorPos(newpos);
@ -448,7 +448,7 @@ class CAHEditNextLine : public CAHEdit
{
sint cx, cy;
sint height;
_GroupEdit->getViewText()->getCharacterPositionFromIndex(_GroupEdit->getCursorPos() + _GroupEdit->getPrompt().length(), _GroupEdit->isCursorAtPreviousLineEnd(), cx, cy, height);
_GroupEdit->getViewText()->getCharacterPositionFromIndex(_GroupEdit->getCursorPos() + (sint)_GroupEdit->getPrompt().length(), _GroupEdit->isCursorAtPreviousLineEnd(), cx, cy, height);
if (cy != 0)
{
cy -= height;
@ -457,7 +457,7 @@ class CAHEditNextLine : public CAHEdit
_GroupEdit->getViewText()->getCharacterIndexFromPosition(cx, cy, newCharIndex, newLineEnd);
if (newLineEnd)
{
_GroupEdit->setCursorPos(newCharIndex - _GroupEdit->getPrompt().length());
_GroupEdit->setCursorPos(newCharIndex - (sint32)_GroupEdit->getPrompt().length());
_GroupEdit->setCursorAtPreviousLineEnd(true);
sint32 newPos = _GroupEdit->getCursorPos();
clamp(newPos, (sint32) 0, (sint32) _GroupEdit->getInputStringRef().size());
@ -478,7 +478,7 @@ class CAHEditNextLine : public CAHEdit
{
_GroupEdit->setCursorPos(min(sint32(newCharIndex + 1), sint32(_GroupEdit->getInputStringRef().length() + _GroupEdit->getPrompt().length())));
}
_GroupEdit->setCursorPos(_GroupEdit->getCursorPos()-_GroupEdit->getPrompt().length());
_GroupEdit->setCursorPos(_GroupEdit->getCursorPos()-(sint32)_GroupEdit->getPrompt().length());
sint32 newPos = _GroupEdit->getCursorPos();
clamp(newPos, (sint32) 0, (sint32) _GroupEdit->getInputStringRef().size());
_GroupEdit->setCursorPos(newPos);

View file

@ -223,7 +223,7 @@ CInterfaceGroup *CInterfaceHelp::activateNextWindow(CDBCtrlSheet *elt, sint forc
// update WindowList if possible
initWindows();
sint maxHelpWindow= _InfoWindows.size();
sint maxHelpWindow= (sint)_InfoWindows.size();
// Update Active window list
@ -429,7 +429,7 @@ void CInterfaceHelp::closeAll()
{
// update WindowList if possible
initWindows();
sint maxHelpWindow= _InfoWindows.size();
sint maxHelpWindow= (sint)_InfoWindows.size();
_ActiveWindows.clear();
// For all windows
@ -447,7 +447,7 @@ void CInterfaceHelp::resetWindowPos(sint y)
// update WindowList if possible
initWindows();
sint maxHelpWindow= _InfoWindows.size();
sint maxHelpWindow= (sint)_InfoWindows.size();
uint32 w, h;
pIM->getViewRenderer().getScreenSize(w,h);
@ -473,7 +473,7 @@ void CInterfaceHelp::serialInfoWindows(NLMISC::IStream &f)
resetWindowPos(-100);
f.serialCont(infoWindowSave);
uint minSize= min(infoWindowSave.size(), _InfoWindows.size());
uint minSize= (uint)min(infoWindowSave.size(), _InfoWindows.size());
for(uint i=0;i<minSize;i++)
{
_InfoWindows[i].Window->setX(infoWindowSave[i].X);
@ -2508,7 +2508,7 @@ void refreshMissionHelp(CSheetHelpSetup &setup, const CPrerequisitInfos &infos)
}
// inactivate other lines
for (uint i = infos.Prerequisits.size(); i < 15 ; ++i)
for (uint i = (uint)infos.Prerequisits.size(); i < 15 ; ++i)
{
const std::string text = setup.HelpWindow->getId() + ":content:scroll_text_id:text_list:" + NLMISC::toString("text_%u",i+1);
CViewText *viewText = dynamic_cast<CViewText *>(setup.HelpWindow->getElement(text));

View file

@ -57,7 +57,7 @@ public:
void addListeningWindow(CChatWindow *w);
void removeListeningWindow(CChatWindow *w);
bool isListeningWindow(CChatWindow *w) const;
uint getNumListeningWindows() const { return _ListeningWindows.size(); }
uint getNumListeningWindows() const { return (uint)_ListeningWindows.size(); }
CChatWindow *getListeningWindow(uint index);
// helpers : depending on the 'listening' flag value, remove or add the window from the list
void setWindowState(CChatWindow *cw, bool listening);

View file

@ -246,7 +246,7 @@ public:
// try to rename a window
bool rename(const ucstring &oldName, const ucstring &newName, bool newNameLocalize);
// warning : this is slow
uint getNumChatWindow() const { return _ChatWindowMap.size(); }
uint getNumChatWindow() const { return (uint)_ChatWindowMap.size(); }
// warning : this is slow : for debug only
CChatWindow *getChatWindowByIndex(uint index);
///////////////////////////////////////////////////////////////////////////////////////

View file

@ -63,7 +63,7 @@ public:
virtual CCtrlBase *getSubCtrl (sint32 /* x */, sint32 /* y */) { return this; }
/// Debug
virtual uint32 getMemory() { return sizeof(*this)+_Id.size(); }
virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); }
/// Get the ContextHelp for this control. Default is to return _ContextHelp

View file

@ -48,7 +48,7 @@ public:
virtual void updateCoords();
virtual uint32 getMemory() { return sizeof(*this)+_Id.size(); }
virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); }
// Display part
virtual void draw();

View file

@ -50,7 +50,7 @@ void CCtrlPolygon::updateBoudingRect()
sint32 ymin = INT_MAX;
sint32 xmax = INT_MIN;
sint32 ymax = INT_MIN;
uint numVerts = _Poly.Vertices.size();
uint numVerts = (uint)_Poly.Vertices.size();
_XFormPoly.Vertices.resize(numVerts);
for(uint k = 0; k < numVerts; ++k)
{
@ -155,7 +155,7 @@ void CCtrlPolygon::draw()
if (_Touched)
{
_RealTris.clear();
uint numTris = _Tris.size();
uint numTris = (uint)_Tris.size();
sint32 cornerX, cornerY;
static std::vector<NLMISC::CTriangle> winTris;
winTris.resize(numTris);

View file

@ -42,7 +42,7 @@ class CCtrlPolygon : public CCtrlBase
{
public:
CCtrlPolygon();
virtual uint32 getMemory() { return sizeof(*this)+_Id.size(); }
virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); }
virtual void updateCoords();
virtual void draw();
/** Change the vertices. This is costly because concav / complex polys are split in a list of triangles

View file

@ -44,7 +44,7 @@ public:
bool parse(xmlNodePtr cur,CInterfaceGroup *parentGroup);
virtual void updateCoords();
virtual void draw();
virtual uint32 getMemory() { return sizeof(*this)+_Id.size(); }
virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); }
// from CViewBase
virtual sint32 getAlpha() const { return (sint32) _Color.A; }

View file

@ -45,8 +45,8 @@ sint CCtrlSheetSelection::addGroup(const std::string &name)
return - 1;
}
_Groups.push_back(CSheetSelectionGroup(name));
_GroupNameToIndex[name] = _Groups.size() - 1;
return _Groups.size() - 1;
_GroupNameToIndex[name] = (uint)_Groups.size() - 1;
return (sint)_Groups.size() - 1;
}
//=============================================================

View file

@ -47,7 +47,7 @@ public:
virtual void updateCoords();
virtual uint32 getMemory() { return sizeof(*this)+_Id.size(); }
virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); }
// Display part
virtual void draw();

View file

@ -322,7 +322,7 @@ void CDBGroupBuildPhrase::startComposition(const CSPhraseCom &phrase)
// simulate a root selection
validateRoot(rootBrick);
// setup params of the root
numParam= rootBrick->ParameterFamilies.size();
numParam= (uint)rootBrick->ParameterFamilies.size();
brickIndexForParam= 0;
// For all brick not the root
@ -344,7 +344,7 @@ void CDBGroupBuildPhrase::startComposition(const CSPhraseCom &phrase)
curParam++;
// If this parameter has additonal parameter they follow
if( brick && !brick->ParameterFamilies.empty() )
numParam+= brick->ParameterFamilies.size();
numParam+= (uint)brick->ParameterFamilies.size();
}
// a mandatory/optional/credit?
else
@ -363,7 +363,7 @@ void CDBGroupBuildPhrase::startComposition(const CSPhraseCom &phrase)
curParam= 0;
numParam= 0;
if(brick)
numParam= brick->ParameterFamilies.size();
numParam= (uint)brick->ParameterFamilies.size();
}
}
}
@ -1749,7 +1749,7 @@ void CDBGroupBuildPhrase::updateDisplayFromRootBrick()
// else ok, setup the composition
else
{
_NumMandatories= brick->MandatoryFamilies.size();
_NumMandatories= (uint32)brick->MandatoryFamilies.size();
// Don't enable any optional/credit by default
_NumCredits= 0;
_NumOptionals= 0;

View file

@ -68,7 +68,7 @@ public:
const ucstring &getText(uint i) const;
const ucstring &getTexture(uint i) const;
void removeText(uint i);
uint getNumTexts() const {return _Texts.size();}
uint getNumTexts() const {return (uint)_Texts.size();}
// selection
void setSelection(sint32 val);

View file

@ -297,7 +297,7 @@ void CDBGroupListSheet::updateCoords ()
uint numValidSheets;
if (_Array)
{
numValidSheets = _SheetChildren.size();
numValidSheets = (uint)_SheetChildren.size();
}
else
{

View file

@ -59,7 +59,7 @@ public:
// Get the index of a sheet inserted in this list. Returns -1 if it is not an index of that list
virtual sint getIndexOf(const CDBCtrlSheet *sheet) const;
// get number of sheets
virtual uint getNbSheet() const { return _SheetChildren.size(); }
virtual uint getNbSheet() const { return (uint)_SheetChildren.size(); }
// get a sheet by its index
virtual CDBCtrlSheet *getSheet(uint index) const;
// Get the number of active elements

View file

@ -91,7 +91,7 @@ void CDBGroupListSheetBonusMalus::draw ()
// sint32 drl= getRenderLayer()+1;
// May draw disable bitmaps on the ctrl sheets if disabled.
uint numCtrls= min(_SheetChildren.size(), _DisableStates.size());
uint numCtrls= (uint)min(_SheetChildren.size(), _DisableStates.size());
for(uint i=0;i<numCtrls;i++)
{
CDBCtrlSheet *ctrl= _SheetChildren[i]->Ctrl;

View file

@ -49,7 +49,7 @@ public:
CDBGroupListSheetText(const TCtorParam &param);
virtual ~CDBGroupListSheetText(); // AJM: make base class destructors virtual to avoid memory leaks!
virtual uint getNbSheet() const { return _SheetChildren.size(); }
virtual uint getNbSheet() const { return (uint)_SheetChildren.size(); }
/// CInterfaceGroup Interface
virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup);

View file

@ -50,7 +50,7 @@ public:
void setType (TViewBar vb);
bool parse(xmlNodePtr cur,CInterfaceGroup * parentGroup);
virtual uint32 getMemory() { return sizeof(*this)+_Id.size(); }
virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); }
virtual void updateCoords ();
virtual void draw ();

View file

@ -36,7 +36,7 @@ public:
CDBViewBar3(const TCtorParam &param);
bool parse(xmlNodePtr cur,CInterfaceGroup * parentGroup);
virtual uint32 getMemory() { return sizeof(*this)+_Id.size(); }
virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); }
virtual void updateCoords ();
void setMini (bool mini);

View file

@ -132,7 +132,7 @@ void CEncyclopediaManager::updateAlbum(const CEncyMsgAlbum &a)
CEncyMsgAlbum *pA = getAlbum(a.Name);
if (pA == NULL)
{
uint32 nBack = _Albums.size();
uint32 nBack = (uint32)_Albums.size();
_Albums.push_back(CEncyMsgAlbum());
pA = &_Albums[nBack];
}
@ -152,7 +152,7 @@ void CEncyclopediaManager::updateThema(uint32 nAlbumName, const CEncyMsgThema &t
// Thema not found add it !
if (pT == NULL)
{
uint32 nBack = pA->Themas.size();
uint32 nBack = (uint32)pA->Themas.size();
pA->Themas.push_back(CEncyMsgThema());
pT = &pA->Themas[nBack];

View file

@ -887,7 +887,7 @@ void CGroupCompasMenu::setActive (bool state)
// and add each entry
const std::vector<CCompassDialogsManager::CCompassDialogsEntry> & entries = CCompassDialogsManager::getInstance().getEntries();
const uint size = entries.size();
const uint size = (uint)entries.size();
for( uint i = 0; i < size; ++i)
{
CCompassTarget ct;
@ -993,7 +993,7 @@ class CCompassDialogsStringCallback : public IStringWaitCallback
{
virtual void onDynStringAvailable(uint /* stringId */, const ucstring &value)
{
uint size = CCompassDialogsManager::getInstance()._Entries.size();
uint size = (uint)CCompassDialogsManager::getInstance()._Entries.size();
for ( uint i = 0; i < size; i++)
{
ucstring name;

View file

@ -208,7 +208,7 @@ bool CGroupEditBox::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
prop = (char*) xmlGetProp( cur, (xmlChar*)"negative_filter" );
if (prop)
{
uint length = strlen(prop);
uint length = (uint)strlen(prop);
_NegativeFilter.resize(length);
std::copy((const char *) prop, (const char *) prop + length, _NegativeFilter.begin());
}
@ -254,8 +254,8 @@ void CGroupEditBox::draw ()
sint32 blankTextId= rVR.getBlankTextureId();
CRGBA col= _BackSelectColor;
col.A= pIM->getGlobalColorForContent().A;
sint32 minPos= min(_CursorPos, _SelectCursorPos) + _Prompt.length();
sint32 maxPos= max(_CursorPos, _SelectCursorPos) + _Prompt.length();
sint32 minPos= min(_CursorPos, _SelectCursorPos) + (sint32)_Prompt.length();
sint32 maxPos= max(_CursorPos, _SelectCursorPos) + (sint32)_Prompt.length();
// get its position on screen
sint cxMinPos, cyMinPos;
@ -311,7 +311,7 @@ void CGroupEditBox::draw ()
// get its position on screen
sint cx, cy;
sint height;
_ViewText->getCharacterPositionFromIndex(_CursorPos + _Prompt.length(), _CursorAtPreviousLineEnd, cx, cy, height);
_ViewText->getCharacterPositionFromIndex(_CursorPos + (sint)_Prompt.length(), _CursorAtPreviousLineEnd, cx, cy, height);
// display the cursor
// get the texture for the cursor
if (_CursorTexID == -1)
@ -394,7 +394,7 @@ void CGroupEditBox::paste()
else
sString = (const char*)hLock;
sint length = sString.length();
sint length = (sint)sString.length();
ucstring toAppend;
// filter character depending on the netry type
@ -524,14 +524,14 @@ void CGroupEditBox::paste()
}
}
}
length = toAppend.size();
length = (sint)toAppend.size();
if ((uint) (_InputString.length() + length) > _MaxNumChar)
{
length = _MaxNumChar - _InputString.length();
length = _MaxNumChar - (sint)_InputString.length();
}
ucstring toAdd = toAppend.substr(0, length);
_InputString = _InputString.substr(0, _CursorPos) + toAdd + _InputString.substr(_CursorPos);
_CursorPos += toAdd.length();
_CursorPos += (sint32)toAdd.length();
GlobalUnlock (hObj);
nlinfo ("Chat input was pasted from the clipboard");
}
@ -712,7 +712,7 @@ bool CGroupEditBox::undo()
setInputString(_StartInputString);
_CanUndo = false;
_CanRedo = true;
setCursorPos(_InputString.length());
setCursorPos((sint32)_InputString.length());
setSelectionAll();
return true;
}
@ -726,7 +726,7 @@ bool CGroupEditBox::redo()
setInputString(_ModifiedInputString);
_CanUndo = true;
_CanRedo = false;
setCursorPos(_InputString.length());
setCursorPos((sint32)_InputString.length());
setSelectionAll();
return true;
}
@ -769,7 +769,7 @@ bool CGroupEditBox::expand()
// then back to ucstring
_InputString.fromUtf8(command);
_InputString = '/' + _InputString;
_CursorPos = _InputString.length();
_CursorPos = (sint32)_InputString.length();
_CursorAtPreviousLineEnd = false;
triggerOnChangeAH();
return true;
@ -895,7 +895,7 @@ bool CGroupEditBox::handleEvent (const CEventDescriptor& event)
_ViewText->getCharacterIndexFromPosition(eventDesc.getX() - _ViewText->getXReal(), eventDesc.getY() - _ViewText->getYReal(), newCurPos, cursorAtPreviousLineEnd);
_CursorAtPreviousLineEnd = cursorAtPreviousLineEnd;
_CursorPos = newCurPos;
_CursorPos -= _Prompt.length();
_CursorPos -= (sint32)_Prompt.length();
_CursorPos = std::max(_CursorPos, sint32(0));
return true;
@ -990,7 +990,7 @@ void CGroupEditBox::updateCoords()
// Check if cursor visible
sint xCursVT, xCurs, yTmp, hTmp;
// Get the cursor pos from the BL of the viewtext
_ViewText->getCharacterPositionFromIndex(_CursorPos+_Prompt.size(), false, xCursVT, yTmp, hTmp);
_ViewText->getCharacterPositionFromIndex(_CursorPos+(sint)_Prompt.size(), false, xCursVT, yTmp, hTmp);
// Get the cursor pos from the BL of the edit box
xCurs = xCursVT - (_XReal - _ViewText->getXReal());
// If the cursor is outside the edit box move the view text to show the cursor
@ -1098,7 +1098,7 @@ void CGroupEditBox::setInputString(const ucstring &str)
_InputString = str;
if (_CursorPos > (sint32) str.length())
{
_CursorPos = str.length();
_CursorPos = (sint32)str.length();
_CursorAtPreviousLineEnd = false;
}
if (!_ViewText) return;
@ -1192,7 +1192,7 @@ void CGroupEditBox::setSelectionAll()
{
_CurrSelection = this;
_SelectCursorPos= 0;
_CursorPos= _InputString.size();
_CursorPos= (sint32)_InputString.size();
_CursorAtPreviousLineEnd = false;
}
}
@ -1254,7 +1254,7 @@ void CGroupEditBox::setCommand(const ucstring &command, bool execute)
else
{
CInterfaceManager::getInstance()->setCaptureKeyboard (this);
_CursorPos = _InputString.length();
_CursorPos = (sint32)_InputString.length();
}
}
@ -1392,8 +1392,8 @@ void CGroupEditBox::setFocusOnText()
pIM->setCaptureKeyboard (this);
_CurrSelection = this;
_SelectCursorPos= _InputString.size();
_CursorPos= _InputString.size();
_SelectCursorPos= (sint32)_InputString.size();
_CursorPos= (sint32)_InputString.size();
_CursorAtPreviousLineEnd = false;
}

View file

@ -65,7 +65,7 @@ extern CActionsContext ActionsContext;
string CGroupHTML::localImageName(const string &url)
{
string dest = "cache/";
dest += getMD5((uint8 *)url.c_str(), url.size()).toString();
dest += getMD5((uint8 *)url.c_str(), (uint32)url.size()).toString();
dest += ".cache";
return dest;
}
@ -358,7 +358,7 @@ void CGroupHTML::addText (const char * buf, int len)
// Build the final unicode string
ucstring tmp;
tmp.reserve(len);
uint ucLen = inputUCString.size();
uint ucLen = (uint)inputUCString.size();
//uint ucLenWithoutSpace = 0;
for (uint i=0; i<ucLen; i++)
{
@ -1096,7 +1096,7 @@ void CGroupHTML::beginElement (uint element_number, const BOOL *present, const c
_Forms.back().Entries.back().SelectValues.push_back(optionValue);
if (selected)
{
_Forms.back().Entries.back().InitialSelection = _Forms.back().Entries.back().SelectValues.size() - 1;
_Forms.back().Entries.back().InitialSelection = (sint)_Forms.back().Entries.back().SelectValues.size() - 1;
}
}
@ -2181,7 +2181,7 @@ CInterfaceGroup *CGroupHTML::addTextArea(const std::string &templateName, const
templateParams.push_back (std::pair<std::string,std::string> ("enter_recover_focus", "false"));
templateParams.push_back (std::pair<std::string,std::string> ("max_num_chars", "1024"));
CInterfaceGroup *textArea = im->createGroupInstance (templateName.c_str(),
getParagraph()->getId(), templateParams.empty()?NULL:&(templateParams[0]), templateParams.size());
getParagraph()->getId(), templateParams.empty()?NULL:&(templateParams[0]), (uint)templateParams.size());
// Group created ?
if (textArea)
@ -2221,7 +2221,7 @@ CDBGroupComboBox *CGroupHTML::addComboBox(const std::string &templateName, const
std::vector<std::pair<std::string,std::string> > templateParams;
templateParams.push_back (std::pair<std::string,std::string> ("id", name));
CInterfaceGroup *group = im->createGroupInstance (templateName.c_str(),
getParagraph()->getId(), templateParams.empty()?NULL:&(templateParams[0]), templateParams.size());
getParagraph()->getId(), templateParams.empty()?NULL:&(templateParams[0]), (uint)templateParams.size());
// Group created ?
if (group)

View file

@ -58,7 +58,7 @@ static string getWebAuthKey()
UserEntity->getDisplayName().toString() +
toString(cid) +
NetMngr.getLoginCookie().toString();
string key = getMD5((const uint8*)rawKey.c_str(), rawKey.size()).toString();
string key = getMD5((const uint8*)rawKey.c_str(), (uint32)rawKey.size()).toString();
//nlinfo("rawkey = '%s'", rawKey.c_str());
//nlinfo("authkey = %s", key.c_str());
return key;

View file

@ -686,7 +686,7 @@ class CHandlerResetCharacterInScene : public IActionHandler
bool pvpOnly= nlstricmp(sParams,"pvponly")==0;
// Reset all entities
uint i;
uint numEntity = EntitiesMngr.entities().size();
uint numEntity = (uint)EntitiesMngr.entities().size();
for (i=0; i<numEntity; i++)
{
CEntityCL *entity = EntitiesMngr.entity(i);
@ -1098,7 +1098,7 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::newGroupInScene(const std::string
std::vector<std::pair<std::string,std::string> > templateParams;
templateParams.push_back (std::pair<std::string,std::string>("id", id));
groupInfo = CInterfaceManager::getInstance()->createGroupInstance ( templateName,
"ui:interface", templateParams.empty()?NULL:&(templateParams[0]), templateParams.size());
"ui:interface", templateParams.empty()?NULL:&(templateParams[0]), (uint)templateParams.size());
}
CGroupInSceneUserInfo *info = dynamic_cast<CGroupInSceneUserInfo*>(groupInfo);

View file

@ -76,10 +76,10 @@ void CGroupList::addChild (CViewBase* child, bool deleteOnRemove)
}
// add child at last index
addChildAtIndex(child, _Elements.size(), deleteOnRemove);
addChildAtIndex(child, (uint)_Elements.size(), deleteOnRemove);
if (_Elements.size() >= 2)
{
setOrder(_Elements.size() - 1, getOrder(_Elements.size() - 2) + 1);
setOrder((uint)_Elements.size() - 1, getOrder((uint)_Elements.size() - 2) + 1);
}
}

View file

@ -86,7 +86,7 @@ public:
void removeHead();
// Get the number of children
uint getNumChildren() const { return _Elements.size(); }
uint getNumChildren() const { return (uint)_Elements.size(); }
// Get the number of active children
uint getNumActiveChildren() const;
@ -132,7 +132,7 @@ public:
virtual CInterfaceElement* getElement (const std::string &id)
{ return CInterfaceGroup::getElement (id); }
sint32 getNbElement() { return _Elements.size(); }
sint32 getNbElement() { return (sint32)_Elements.size(); }
sint32 getSpace() { return _Space; }
void setDynamicDisplaySize (bool dds) { _DynamicDisplaySize = dds; }

View file

@ -1175,7 +1175,7 @@ void CGroupMap::checkCoords()
uint i;
if (_RespawnPos.size() < _RespawnLM.size())
{
for (i = _RespawnPos.size(); i < _RespawnLM.size(); i++)
for (i = (uint)_RespawnPos.size(); i < _RespawnLM.size(); i++)
{
delCtrl(_RespawnLM[i]);
_RespawnLM[i] = NULL;
@ -2245,7 +2245,7 @@ void CGroupMap::setScale(float newScale)
//============================================================================================================
void CGroupMap::updateLandMarkList(TLandMarkButtonVect &lmVect)
{
uint numLM = lmVect.size();
uint numLM = (uint)lmVect.size();
for(uint k = 0; k < numLM; ++k)
{
CLandMarkButton *lmb = lmVect[k];
@ -2259,7 +2259,7 @@ void CGroupMap::updateLandMarkList(TLandMarkButtonVect &lmVect)
//============================================================================================================
void CGroupMap::updateLandMarkTextList(TLandMarkTextVect &lmVect)
{
uint numLM = lmVect.size();
uint numLM = (uint)lmVect.size();
for(uint k = 0; k < numLM; ++k)
{
CLandMarkText *lmt = lmVect[k];
@ -2276,7 +2276,7 @@ void CGroupMap::updateLandMarkTextList(TLandMarkTextVect &lmVect)
//============================================================================================================
void CGroupMap::removeLandMarks(TLandMarkButtonVect &lm)
{
uint numLM = lm.size();
uint numLM = (uint)lm.size();
for(uint k = 0; k < numLM; ++k)
{
if (lm[k])
@ -2491,7 +2491,7 @@ CCtrlButton *CGroupMap::addUserLandMark(const NLMISC::CVector2f &pos, const ucst
_CurContinent->UserLandMarks.push_back(ulm);
// add a landmark with a menu to remove it
addLandMark(_UserLM, pos, title, getUserLandMarkOptions(_CurContinent->UserLandMarks.size() - 1));
addLandMark(_UserLM, pos, title, getUserLandMarkOptions((uint32)_CurContinent->UserLandMarks.size() - 1));
// Save the config file each time a user landmark is created
CInterfaceManager *pIM = CInterfaceManager::getInstance();
@ -2571,7 +2571,7 @@ void CGroupMap::removeExceedingUserLandMarks(uint maxNumber)
uint CGroupMap::getNumUserLandMarks() const
{
if (_CurContinent == NULL) return 0;
return _CurContinent->UserLandMarks.size();
return (uint)_CurContinent->UserLandMarks.size();
}
//============================================================================================================
CLandMarkOptions CGroupMap::getUserLandMarkOptions(uint32 lmindex) const

View file

@ -342,7 +342,7 @@ bool CGroupSubMenu::parse (xmlNodePtr cur, CInterfaceGroup *parent)
string completeId = _Parent->getId() + ":" + _Lines[_Lines.size()-1].Id;
CInterfaceGroup *pUGLeft = im->createGroupInstance((const char*)usergroup, completeId, vparams);
if (pUGLeft)
setUserGroupLeft(_Lines.size()-1, pUGLeft, true);
setUserGroupLeft((uint)_Lines.size()-1, pUGLeft, true);
}
usergroup = (char*) xmlGetProp (cur, (xmlChar*)"usergroup_r");
if (usergroup)
@ -357,7 +357,7 @@ bool CGroupSubMenu::parse (xmlNodePtr cur, CInterfaceGroup *parent)
string completeId = _Parent->getId() + ":" + _Lines[_Lines.size()-1].Id;
CInterfaceGroup *pUG = im->createGroupInstance((const char*)usergroup, completeId, vparams);
if (pUG)
setUserGroupRight(_Lines.size()-1, pUG, true);
setUserGroupRight((uint)_Lines.size()-1, pUG, true);
}
}
cur = cur->next;
@ -1123,7 +1123,7 @@ CInterfaceElement* CGroupSubMenu::getElement (const std::string &id)
// ------------------------------------------------------------------------------------------------
void CGroupSubMenu::addSeparator(const std::string &id)
{
addSeparatorAtIndex(_Lines.size(), id);
addSeparatorAtIndex((uint)_Lines.size(), id);
}
// ------------------------------------------------------------------------------------------------
@ -1377,7 +1377,7 @@ void CGroupSubMenu::hideSubMenus ()
// ------------------------------------------------------------------------------------------------
void CGroupSubMenu::reset()
{
uint lineCount = _Lines.size();
uint lineCount = (uint)_Lines.size();
for(sint k = lineCount - 1; k >= 0; --k)
{
removeLine(k);
@ -1516,7 +1516,7 @@ void CGroupSubMenu::setUserGroupLeft(uint line, CInterfaceGroup *group, bool own
CGroupSubMenu *CGroupSubMenu::cloneMenu(CGroupSubMenu *appendToMenu, CGroupMenu *newFather, CInterfaceGroup *initGroup /* = NULL */) const
{
CGroupSubMenu *copyMenu = appendToMenu ? appendToMenu : new CGroupSubMenu(CViewText::TCtorParam());
uint startSize = copyMenu->_Lines.size();
uint startSize = (uint)copyMenu->_Lines.size();
copyMenu->_GroupMenu = newFather;
copyMenu->initOptions(initGroup);
copyMenu->_Lines.reserve(_Lines.size() + startSize);

View file

@ -128,7 +128,7 @@ public:
void addSeparatorAtIndex(uint index, const std::string &id = "");
uint getNumLine() const { return _Lines.size(); }
uint getNumLine() const { return (uint)_Lines.size(); }
void removeLine(uint index);
const std::string getActionHandler(uint lineIndex) const;
const std::string getActionHandlerParam(uint lineIndex) const;
@ -157,7 +157,7 @@ public:
void removeAllUserGroups();
uint getNumLines() const { return _Lines.size(); }
uint getNumLines() const { return (uint)_Lines.size(); }
// return pointer to submenu or NULL if there's none
CGroupSubMenu *getSubMenu(uint index) const;

View file

@ -71,10 +71,10 @@ void CGroupParagraph::addChild (CViewBase* child, bool deleteOnRemove)
}
// add child at last index
addChildAtIndex(child, _Elements.size(), deleteOnRemove);
addChildAtIndex(child, (uint)_Elements.size(), deleteOnRemove);
if (_Elements.size() >= 2)
{
setOrder(_Elements.size() - 1, getOrder(_Elements.size() - 2) + 1);
setOrder((uint)_Elements.size() - 1, getOrder((uint)_Elements.size() - 2) + 1);
}
invalidateContent();
}
@ -487,7 +487,7 @@ void CGroupParagraph::updateCoords()
// For each elements, place them
uint firstElementOnLine = 0;
const uint elmCount = _Elements.size();
const uint elmCount = (uint)_Elements.size();
uint i;
for (i = 0; i < elmCount+1; ++i)
{

View file

@ -102,7 +102,7 @@ public:
// void removeHead();
// Get the number of children
uint getNumChildren() const { return _Elements.size(); }
uint getNumChildren() const { return (uint)_Elements.size(); }
// Get the number of active children
uint getNumActiveChildren() const;
@ -150,7 +150,7 @@ public:
virtual CInterfaceElement* getElement (const std::string &id)
{ return CInterfaceGroup::getElement (id); }
sint32 getNbElement() { return _Elements.size(); }
sint32 getNbElement() { return (sint32)_Elements.size(); }
sint32 getSpace() { return _Space; }
void forceSizeW (sint32 newSizeW);

View file

@ -246,7 +246,7 @@ void CGroupQuickHelp::beginElement (uint element_number, const BOOL *present, co
// Extract the string
step.EventToComplete.insert (events.substr (first, last-first));
first = last+1;
first = (uint)last+1;
}
}
}

View file

@ -403,7 +403,7 @@ void CGroupTable::updateCoords()
}
// Width of cells and table borders
sint32 borderWidth = 2*Border + (_Columns.size()+1) * CellSpacing + (_Columns.size()*2) * CellPadding;
sint32 borderWidth = 2*Border + ((sint32)_Columns.size()+1) * CellSpacing + ((sint32)_Columns.size()*2) * CellPadding;
// Get the width
sint32 tableWidthMax = ForceWidthMin?ForceWidthMin:_LastParentW; // getWReal();
@ -786,7 +786,7 @@ sint32 CGroupTable::getMaxUsedW() const
for (i=0; i<columns.size(); i++)
maxWidth += columns[i];
maxWidth += 2*Border + (columns.size()+1) * CellSpacing + (columns.size()*2) * CellPadding;
maxWidth += 2*Border + ((sint32)columns.size()+1) * CellSpacing + ((sint32)columns.size()*2) * CellPadding;
return maxWidth;
}
@ -831,7 +831,7 @@ sint32 CGroupTable::getMinUsedW() const
for (i=0; i<columns.size(); i++)
maxWidth += columns[i];
maxWidth += 2*Border + (columns.size()+1) * CellSpacing + (columns.size()*2) * CellPadding;
maxWidth += 2*Border + ((sint32)columns.size()+1) * CellSpacing + ((sint32)columns.size()*2) * CellPadding;
return maxWidth;
}

View file

@ -63,7 +63,7 @@ void CGroupTree::SNode::updateLastVisibleSon()
{
LastVisibleSon = NULL;
if (!Show || !Opened) return;
for (sint sonIndex = Children.size() - 1; sonIndex >= 0; -- sonIndex)
for (sint sonIndex = (sint)Children.size() - 1; sonIndex >= 0; -- sonIndex)
{
if (Children[sonIndex]->Show)
{
@ -82,7 +82,7 @@ CGroupTree::SNode::~SNode()
{
makeOrphan();
// IMPORTANT : must delete in reverse order because "makeOrphan" is called when deleting sons, thus changing vector size...
for (sint i = Children.size() - 1; i >= 0; --i)
for (sint i = (sint)Children.size() - 1; i >= 0; --i)
delete Children[i];
Children.clear();
// TestYoyo
@ -667,7 +667,7 @@ void CGroupTree::draw()
col.A = (uint8)(((sint32)col.A*((sint32)pIM->getGlobalColorForContent().A+1))>>8);
}
drawSelection( getHrcIconXEnd(_Lines[_OverLine].Depth + _Lines[_OverLine].getNumAdditionnalBitmap()), (_Lines.size()-_OverLine-1)*_BmpH,
drawSelection( getHrcIconXEnd(_Lines[_OverLine].Depth + _Lines[_OverLine].getNumAdditionnalBitmap()), ((sint)_Lines.size()-_OverLine-1)*_BmpH,
_WReal-getHrcIconXEnd(_Lines[_OverLine].Depth + _Lines[_OverLine].getNumAdditionnalBitmap()), col);
}
// Draw extended over
@ -703,7 +703,7 @@ void CGroupTree::draw()
col.A = (uint8)(((sint32)col.A*((sint32)pIM->getGlobalColorForContent().A+1))>>8);
}
drawSelection( getHrcIconXEnd(_Lines[_SelectedLine].Depth + _Lines[_SelectedLine].getNumAdditionnalBitmap()), (_Lines.size()-_SelectedLine-1)*_BmpH,
drawSelection( getHrcIconXEnd(_Lines[_SelectedLine].Depth + _Lines[_SelectedLine].getNumAdditionnalBitmap()), ((sint)_Lines.size()-_SelectedLine-1)*_BmpH,
_WReal-getHrcIconXEnd(_Lines[_SelectedLine].Depth + _Lines[_SelectedLine].getNumAdditionnalBitmap()), col );
}
@ -913,7 +913,7 @@ void CGroupTree::rebuild()
addTextLine (0, _RootNode);
// Reformating
sint32 sizeH = _Lines.size()*_BmpH;
sint32 sizeH = (sint32)_Lines.size()*_BmpH;
for (uint i = 0; i < _Lines.size(); ++i)
_Lines[i].TextOrTemplate->setY (_Lines[i].Node->YDecal + sizeH - ((1+_Lines[i].TextOrTemplate->getY())*_BmpH));
// Add the hierarchy bitmaps
@ -1013,7 +1013,7 @@ void CGroupTree::addTextLine (uint8 nDepth, CGroupTree::SNode *pNode)
line.TextOrTemplate->setParent (this);
line.TextOrTemplate->setParentPos (NULL);
line.TextOrTemplate->setX (getHrcIconXEnd(nDepth-1 + line.getNumAdditionnalBitmap()));
line.TextOrTemplate->setY (_Lines.size());
line.TextOrTemplate->setY ((sint32)_Lines.size());
line.TextOrTemplate->setModulateGlobalColor(this->getModulateGlobalColor());
if (pNode->DisplayText)
addView (line.TextOrTemplate);
@ -1099,7 +1099,7 @@ void CGroupTree::addHierarchyBitmaps ()
// A Bitmap must be created
CViewBitmap *pVB = createViewBitmap(nLine, "t", "blank.tga");
pVB->setX (getHrcIconXStart(nLayer));
pVB->setY (_Lines.size()*_BmpH - ((1+nLine)*_BmpH));
pVB->setY ((sint32)_Lines.size()*_BmpH - ((1+nLine)*_BmpH));
bool bAddBitmap = true;
bool bAddXExtendBitmap = false;
@ -1225,7 +1225,7 @@ void CGroupTree::addHierarchyBitmaps ()
{
CViewBitmap *pVB = createViewBitmap(nLine, "ext_t", _ArboXExtend);
pVB->setX (getHrcIconXStart(nLayer) - _XExtend);
pVB->setY (_Lines.size()*_BmpH - ((1+nLine)*_BmpH));
pVB->setY ((sint32)_Lines.size()*_BmpH - ((1+nLine)*_BmpH));
addView (pVB);
_Lines[nLine].Bmps.push_back(pVB);
}
@ -1243,7 +1243,7 @@ void CGroupTree::addHierarchyBitmaps ()
{
CViewBitmap *pVB = createViewBitmap(nLine, "custom_bm", _Lines[nLine].Node->Bitmap);
pVB->setX (getHrcIconXStart(_Lines[nLine].Depth + 1));
pVB->setY (_Lines.size()*_BmpH - ((1+nLine)*_BmpH));
pVB->setY ((sint32)_Lines.size()*_BmpH - ((1+nLine)*_BmpH));
_Lines[nLine].Bmps.push_back(pVB);
addView (pVB);
}

View file

@ -93,7 +93,7 @@ public:
void remove(NL3D::UInstanceGroup *pIG);
uint getCharacter3DCount() const { return _Characters.size(); }
uint getCharacter3DCount() const { return (uint)_Characters.size(); }
CInterface3DCharacter *getCharacter3D(uint index);
CInterface3DCamera *getCamera(uint index);

View file

@ -1232,7 +1232,7 @@ CInterfaceElement *CInterfaceElement::clone()
std::copy(dupStream.buffer(), dupStream.buffer() + dupStream.length(), datas.begin());
dupStream.resetPtrTable();
dupStream.invert();
dupStream.fill(&datas[0], datas.size());
dupStream.fill(&datas[0], (uint32)datas.size());
dupStream.serialPolyPtr(begunThisCloneWarHas);
}
catch(NLMISC::EStream &)

View file

@ -173,7 +173,7 @@ public:
virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup);
/// Debug info on memory
virtual uint32 getMemory () { return sizeof(*this)+_Id.size(); }
virtual uint32 getMemory () { return (uint32)(sizeof(*this)+_Id.size()); }
/// helper: display a parse error with the id of the lement
void parseError (CInterfaceGroup *parentGroup, const char *reason = NULL);

View file

@ -41,7 +41,7 @@ void CInterfaceExprNodeValue::getDepends(std::vector<ICDBNode *> &/* nodes */)
void CInterfaceExprNodeValueFnCall::eval(CInterfaceExprValue &result)
{
nlassert(Func);
uint numParams = Params.size();
uint numParams = (uint)Params.size();
std::vector<CInterfaceExprValue> params(numParams);
for(uint k = 0; k < numParams; ++k)
{
@ -53,7 +53,7 @@ void CInterfaceExprNodeValueFnCall::eval(CInterfaceExprValue &result)
void CInterfaceExprNodeValueFnCall::evalWithDepends(CInterfaceExprValue &result, std::vector<ICDBNode *> &nodes)
{
nlassert(Func);
uint numParams = Params.size();
uint numParams = (uint)Params.size();
std::vector<CInterfaceExprValue> params(numParams);
for(uint k = 0; k < numParams; ++k)
{
@ -64,7 +64,7 @@ void CInterfaceExprNodeValueFnCall::evalWithDepends(CInterfaceExprValue &result,
void CInterfaceExprNodeValueFnCall::getDepends(std::vector<ICDBNode *> &nodes)
{
uint numParams = Params.size();
uint numParams = (uint)Params.size();
for(uint k = 0; k < numParams; ++k)
{
Params[k]->getDepends(nodes);

View file

@ -430,7 +430,7 @@ static DECLARE_INTERFACE_USER_FCT(userFctSwitch)
return false;
sint64 n = args[0].getInteger();
if ((n > (args.size()-2)) || (n < 0))
if ((n > ((sint64)args.size()-2)) || (n < 0))
return false;
result = args[(uint)n+1];

View file

@ -724,7 +724,7 @@ bool CInterfaceGroup::handleEvent (const CEventDescriptor &event)
return true;
// For each child group
for (sint i = _ChildrenGroups.size()-1; i >= 0; --i)
for (sint i = (sint)_ChildrenGroups.size()-1; i >= 0; --i)
{
CInterfaceGroup *pIG = _ChildrenGroups[i];
if (pIG->getActive())

View file

@ -69,7 +69,7 @@ public:
bool delElement (const std::string &id, bool noWarning=false);
bool delElement (CInterfaceElement *pIE, bool noWarning=false);
uint getNumGroup() const { return _ChildrenGroups.size(); }
uint getNumGroup() const { return (uint)_ChildrenGroups.size(); }
CInterfaceGroup *getGroup(uint index) const;
sint32 getMaxUsedW() const;

View file

@ -89,7 +89,7 @@ public:
*/
void removeTarget(CInterfaceElement *elem);
// Get the number of targets of this link
uint getNumTargets() const { return _Targets.size(); }
uint getNumTargets() const { return (uint)_Targets.size(); }
// Get the i-th target
CInterfaceElement *getTarget(uint index) const { return _Targets[index]._InterfaceElement; }

View file

@ -2814,7 +2814,7 @@ bool CInterfaceManager::handleEvent (const CEventDescriptor& event)
{
// Take the top most control.
uint nMaxDepth = 0;
for (sint32 i = _CtrlsUnderPointer.size()-1; i >= 0; i--)
for (sint32 i = (sint32)_CtrlsUnderPointer.size()-1; i >= 0; i--)
{
CCtrlBase *ctrl= _CtrlsUnderPointer[i];
if (ctrl && ctrl->isCapturable() && isControlInWindow(ctrl, pNewCurrentWnd))
@ -2863,7 +2863,7 @@ bool CInterfaceManager::handleEvent (const CEventDescriptor& event)
// Take the top most control.
{
uint nMaxDepth = 0;
for (sint32 i = _CtrlsUnderPointer.size()-1; i >= 0; i--)
for (sint32 i = (sint32)_CtrlsUnderPointer.size()-1; i >= 0; i--)
{
CCtrlBase *ctrl= _CtrlsUnderPointer[i];
if (ctrl && ctrl->isCapturable() && isControlInWindow(ctrl, pNewCurrentWnd))
@ -3956,7 +3956,7 @@ uint CInterfaceManager::getProcedureNumActions(const std::string &procName) cons
if(it!=_ProcedureMap.end())
{
const CProcedure &proc= it->second;
return proc.Actions.size();
return (uint)proc.Actions.size();
}
else
return 0;

View file

@ -487,7 +487,7 @@ static void interfaceScriptAsMemStream(const std::string &script, CMemStream &de
}
destStream.seek(0, NLMISC::IStream::begin);
if (script.empty()) return;
destStream.serialBuffer(const_cast<uint8 *>((const uint8 *) &script[0]), script.size());
destStream.serialBuffer(const_cast<uint8 *>((const uint8 *) &script[0]), (uint)script.size());
destStream.invert();
destStream.seek(0, NLMISC::IStream::begin);
}
@ -701,7 +701,7 @@ bool CInterfaceParser::parseXMLDocument(xmlNodePtr root, bool reload)
// Resize action category array
uint actionCategoryCount = CIXml::countChildren(curNode, "action_category");
Actions.reserveCategories(Actions.getCategories ().size()+actionCategoryCount);
Actions.reserveCategories((uint)Actions.getCategories ().size()+actionCategoryCount);
EditActions.reserveCategories(1);
while (curNode)
@ -2625,7 +2625,7 @@ bool CInterfaceParser::solveDefine(const std::string &propVal, std::string &n
curPos++;
// get the id pos
uint startIdPos= curPos;
uint startIdPos= (uint)curPos;
while( curPos<propVal.size() && validDefineChar(propVal[curPos]) )
curPos++;
// get the id
@ -2754,7 +2754,7 @@ void CInterfaceParser::CAction::buildBlocks (const std::string &in, std::vector
// get the id pos
uint countNbDigit = 0;
uint startIdPos= curPos;
uint startIdPos= (uint)curPos;
while (curPos<in.size() && in[curPos]>='0' && in[curPos]<='9')
{
curPos++;
@ -2772,7 +2772,7 @@ void CInterfaceParser::CAction::buildBlocks (const std::string &in, std::vector
// There is some digit it is an argument
// copy the last not param sub string.
sint nbToCopy = curPos-countNbIdent-countNbDigit-lastPos;
sint nbToCopy = (sint)(curPos-countNbIdent-countNbDigit-lastPos);
if (nbToCopy > 0)
lastString += in.substr(lastPos, nbToCopy);

View file

@ -244,7 +244,7 @@ public:
CInterfaceGroup *createGroupInstance(const std::string &templateName, const std::string &parentID, std::vector<std::pair<std::string, std::string> > &templateParams, bool updateLinks = true)
{
if (templateParams.size() > 0)
return createGroupInstance(templateName, parentID, &templateParams[0], templateParams.size(), updateLinks);
return createGroupInstance(templateName, parentID, &templateParams[0], (uint)templateParams.size(), updateLinks);
else
return createGroupInstance(templateName, parentID, NULL, 0, updateLinks);
}
@ -258,7 +258,7 @@ public:
CInterfaceElement *createUIElement(const std::string &templateName, const std::string &parentID, std::vector<std::pair<std::string, std::string> > &templateParams, bool updateLinks = true)
{
if (templateParams.size() > 0)
return createUIElement(templateName, parentID, &templateParams[0], templateParams.size(), updateLinks);
return createUIElement(templateName, parentID, &templateParams[0], (uint)templateParams.size(), updateLinks);
else
return createUIElement(templateName, parentID, NULL, 0, updateLinks);
}

View file

@ -113,7 +113,7 @@ ucstring CItemSpecialEffectHelper::getEffect(const std::string &effect, bool &fi
}
// Check number of arguments
uint n = (effectMap[name]).size();
uint n = (uint)(effectMap[name]).size();
if (params.size() != n)
{
nlinfo("Bad arguments for : %s", effect.c_str());

View file

@ -434,7 +434,7 @@ PRIVATE int HTNeLReader_read (HTInputStream * me)
/* Read the file desriptor */
while (fp)
{
if ((me->b_read = nel_fread(me->data, FILE_BUFFER_SIZE, fp)) == 0)
if ((me->b_read = (int)nel_fread(me->data, FILE_BUFFER_SIZE, fp)) == 0)
{
HTAlertCallback *cbf = HTAlert_find(HT_PROG_DONE);
// HTTRACE(PROT_TRACE, "ANSI read... Finished loading file %p\n" _ fp);
@ -509,7 +509,7 @@ PRIVATE int HTNeLReader_close (HTInputStream * me)
PUBLIC int HTNeLReader_consumed (HTInputStream * me, size_t bytes)
{
me->write += bytes;
me->b_read -= bytes;
me->b_read -= (int)bytes;
HTHost_setRemainingRead(me->host, me->b_read);
return HT_OK;
}

View file

@ -411,7 +411,7 @@ bool CLuaState::executeFile(const std::string &pathName)
}
*/
script.resize(CFile::getFileSize(pathName));
inputFile.serialBuffer((uint8 *) &script[0], script.size());
inputFile.serialBuffer((uint8 *) &script[0], (uint)script.size());
// execute the script text, with dbgSrc==filename (use @ for lua internal purpose)

View file

@ -3205,7 +3205,7 @@ int CLuaIHM::tableToString(CLuaState &ls)
while (ls.next(-2))
{
ls.toString(-1);
length += ls.strlen(-1);
length += (uint)ls.strlen(-1);
ls.pop(2);
}
std::string result;
@ -3215,7 +3215,7 @@ int CLuaIHM::tableToString(CLuaState &ls)
ls.pushNil();
while (ls.next(-2))
{
uint length = ls.strlen(-1);
uint length = (uint)ls.strlen(-1);
if (length)
{
memcpy(dest, ls.toString(-1), length);
@ -3658,7 +3658,7 @@ void CLuaIHM::sortGuildMembers()
sint32 CLuaIHM::getNbGuildMembers()
{
//H_AUTO(Lua_CLuaIHM_getNbGuildMembers)
return CGuildManager::getInstance()->getGuildMembers().size();
return (sint32)CGuildManager::getInstance()->getGuildMembers().size();
}
// ***************************************************************************

View file

@ -83,7 +83,7 @@ void addKeyLine (CGroupList *pParent, const ucstring &keyName, const ucstring &s
{
CInterfaceManager *pIM = CInterfaceManager::getInstance();
CMacroCmdManager *pMCM = CMacroCmdManager::getInstance();
uint lineId= pMCM->NewKey->AllLines.size();
uint lineId= (uint)pMCM->NewKey->AllLines.size();
string templateId = pParent->getId() + ":k" + NLMISC::toString(lineId);
vector< pair<string, string> > vParams;
vParams.push_back(make_pair(string("id"), templateId));

View file

@ -452,7 +452,7 @@ void CHugeListObs::update(ICDBNode * /* node */)
// In the display we want a contiguous set of items. Not For Trading, because of Resale
if(_Category==Trading)
{
numLoadedPages= itemPages->size();
numLoadedPages= (uint)itemPages->size();
}
else
{

View file

@ -307,7 +307,7 @@ sint CPeopleList::addPeople(const ucstring &name, uint teamMateIndex /*= 0*/)
_Peoples.push_back(CPeople());
_Peoples.back().Container = gc;
_Peoples.back().GlobalID = _CurrPeopleID;
updatePeopleMenu(_Peoples.size() - 1);
updatePeopleMenu((uint)_Peoples.size() - 1);
++_CurrPeopleID;

View file

@ -76,7 +76,7 @@ public:
// Get index from the id of the container that represent the people
sint getIndexFromContainerID(const std::string &id) const;
// Get the number of people in this list
uint getNumPeople() const { return _Peoples.size(); }
uint getNumPeople() const { return (uint)_Peoples.size(); }
// Get name of a people
ucstring getName(uint index) const;
// Sort people alphabetically

View file

@ -281,7 +281,7 @@ sint32 CSBrickManager::CBrickContainer::getNumParameters(NLMISC::CSheetId id) c
CSBrickSheet *brick= pBM->getBrick(id);
if(brick)
{
return brick->ParameterFamilies.size();
return (sint32)brick->ParameterFamilies.size();
}
else
{
@ -449,7 +449,7 @@ void CSBrickManager::compileBrickProperties()
textTemp.erase();
// Parse the text
uint textSize= text.size();
uint textSize= (uint)text.size();
for(uint j=0;j<textSize;)
{
// Property parsing?

View file

@ -967,7 +967,7 @@ void CSkillManager::tryToUnblockTitleFromItems()
// if (_TitlesUnblocked[i].UnblockedItemLists[j]) // Not already unblocked
// continue;
uint numItemsFromListToValidate = rTU.ItemsNeeded[j].size();
uint numItemsFromListToValidate = (uint)rTU.ItemsNeeded[j].size();
for (uint k = 0; k < rTU.ItemsNeeded[j].size(); ++k) // for all items in current item list
{

View file

@ -163,7 +163,7 @@ public:
const CSPhraseCom &getPhrase(uint32 slot) const;
/// get the number of memory lines.
uint32 getNbMemoryLines() const { return _Memories.size(); }
uint32 getNbMemoryLines() const { return (uint32)_Memories.size(); }
/** Allocate a Free Slot (for NEW phrase setup). 0 is not a free slot
* NB: the slot is not still correctly filled(), and getPhrase() will return Empty. use setPhrase() just after

View file

@ -49,7 +49,7 @@ public:
virtual void updateCoords() { CInterfaceElement::updateCoords(); }
/// Debug
virtual uint32 getMemory() { return sizeof(*this)+_Id.size(); }
virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); }
/// Reflection
virtual sint32 getAlpha() const { return -1; } // Not obliged to implement this

View file

@ -63,7 +63,7 @@ public:
* \return true if success
*/
bool parse(xmlNodePtr cur,CInterfaceGroup * parentGroup);
virtual uint32 getMemory() { return sizeof(*this)+_Id.size(); }
virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); }
virtual void updateCoords ();

View file

@ -111,7 +111,7 @@ public:
* \return true if success
*/
bool parse(xmlNodePtr cur,CInterfaceGroup * parentGroup);
virtual uint32 getMemory() { return sizeof(*this)+_Id.size(); }
virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); }
/**
* draw the view
*/

View file

@ -47,8 +47,8 @@ public:
* \return true if success
*/
bool parse(xmlNodePtr cur,CInterfaceGroup * parentGroup);
virtual uint32 getMemory() { return sizeof(*this) + _Id.size() + _AccIconBackString.size() +
_AccIconMainString.size() + _AccIconOverString.size() + _TextureNoItemName.size(); }
virtual uint32 getMemory() { return (uint32)(sizeof(*this) + _Id.size() + _AccIconBackString.size() +
_AccIconMainString.size() + _AccIconOverString.size() + _TextureNoItemName.size()); }
/**
* draw the view

View file

@ -81,7 +81,7 @@ void CViewPolygon::draw()
if (_Touched)
{
_RealTris.clear();
uint numTris = _Tris.size();
uint numTris = (uint)_Tris.size();
sint32 cornerX, cornerY;
static std::vector<NLMISC::CTriangle> winTris;
winTris.resize(numTris);

View file

@ -35,7 +35,7 @@ class CViewPolygon : public CViewBase
{
public:
CViewPolygon();
virtual uint32 getMemory() { return sizeof(*this)+_Id.size(); }
virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); }
virtual void updateCoords();
virtual void draw();
void setVertices(const std::vector<NLMISC::CVector> &vertices);

View file

@ -42,7 +42,7 @@ public:
bool parse(xmlNodePtr cur,CInterfaceGroup *parentGroup);
virtual void updateCoords();
virtual void draw();
virtual uint32 getMemory() { return sizeof(*this)+_Id.size(); }
virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); }
// from CViewBase
virtual sint32 getAlpha() const { return (sint32) _Color.A; }

View file

@ -664,7 +664,7 @@ void CViewRenderer::drawUnclippedTriangles(sint layerId, const std::vector<NLMIS
layerId+= VR_BIAS_LAYER;
nlassert(layerId>=0 && layerId<VR_NUM_LAYER);
CLayer &layer = _BlankGlobalTexture->Layers[layerId];
uint startCount = layer.FilteredAlphaBlendedTris.size();
uint startCount = (uint)layer.FilteredAlphaBlendedTris.size();
layer.FilteredAlphaBlendedTris.resize(startCount + tris.size());
const NLMISC::CTriangle *src =&tris[0];
const NLMISC::CTriangle *last = src + tris.size();
@ -1167,7 +1167,7 @@ void CViewRenderer::flush ()
// alpha blended
if (!layer.FilteredAlphaBlendedQuads.empty())
{
Driver->drawQuads (&(layer.FilteredAlphaBlendedQuads[0]), layer.FilteredAlphaBlendedQuads.size(), _Material);
Driver->drawQuads (&(layer.FilteredAlphaBlendedQuads[0]), (uint32)layer.FilteredAlphaBlendedQuads.size(), _Material);
layer.FilteredAlphaBlendedQuads.clear();
}
if (!layer.FilteredAlphaBlendedTris.empty())
@ -1182,7 +1182,7 @@ void CViewRenderer::flush ()
_Material.setBlendFunc (NL3D::UMaterial::one, NL3D::UMaterial::one);
if (!layer.FilteredAdditifQuads.empty())
{
Driver->drawQuads (&(layer.FilteredAdditifQuads[0]), layer.FilteredAdditifQuads.size(), _Material);
Driver->drawQuads (&(layer.FilteredAdditifQuads[0]), (uint32)layer.FilteredAdditifQuads.size(), _Material);
layer.FilteredAdditifQuads.clear();
}
if (!layer.FilteredAdditifTris.empty())

View file

@ -500,14 +500,14 @@ void CViewText::draw ()
}
// next word
charIndex+= currWord.Text.length();
charIndex+= (sint)currWord.Text.length();
}
charIndex += currLine.getEndSpaces() + (currLine.getLF() ? 1 : 0);
}
}
// draw
for (sint i = _Lines.size()-1; i >= 0; --i)
for (sint i = (sint)_Lines.size()-1; i >= 0; --i)
{
CLine &currLine = *_Lines[i];
// current x position
@ -848,7 +848,7 @@ void CViewText::updateTextContextMultiLine(uint nMaxWidth)
float rWidthCurrentLine = 0, rWidthLetter;
bool linePushed= false;
// for all the text
uint textSize= _Text.size();
uint textSize= (uint)_Text.size();
uint formatTagIndex= 0;
for (i = 0; i < textSize; ++i)
{
@ -1019,14 +1019,14 @@ void CViewText::updateTextContextMultiLineJustified(uint nMaxWidth, bool expandS
}
// Detect change of wordFormat at the begining of the word
if(isFormatTagChange(spaceEnd, formatTagIndex))
if(isFormatTagChange((uint)spaceEnd, formatTagIndex))
{
getFormatTagChange(spaceEnd, formatTagIndex, wordFormat);
getFormatTagChange((uint)spaceEnd, formatTagIndex, wordFormat);
}
// Get word until a space, a \n, or a FormatTagChange is encountered
uint i;
for(i= spaceEnd;i<_Text.length();i++)
for(i= (uint)spaceEnd;i<(uint)_Text.length();i++)
{
ucchar c= _Text[i];
if(c==' ' || c=='\n')
@ -1364,7 +1364,7 @@ void CViewText::updateTextContext ()
}
else
{
for (sint i = _Text.size() - 1; i >= 0; --i)
for (sint i = (sint)_Text.size() - 1; i >= 0; --i)
{
ucLetter= _Text[i];
ucstring ucStrLetter;
@ -1465,7 +1465,7 @@ sint CViewText::getLineFromIndex(uint index, bool cursorDisplayedAtEndOfPrevious
}
charIndex = newCharIndex;
}
return _Lines.size() - 1;
return (sint)_Lines.size() - 1;
}
else
{
@ -1629,7 +1629,7 @@ void CViewText::getCharacterPositionFromIndex(sint index, bool cursorAtPreviousL
return;
}
}
charIndex += currWord.Text.length() + currWord.NumSpaces;
charIndex += (uint)currWord.Text.length() + currWord.NumSpaces;
px += currWord.NumSpaces * currLine.getSpaceWidth() + currWord.Info.StringWidth;
}
}
@ -1690,12 +1690,12 @@ void CViewText::getCharacterIndexFromPosition(sint x, sint y, uint &index, bool
float py = 0.f;
if (py > y)
{
index = _Text.length();
index = (uint)_Text.length();
cursorAtPreviousLineEnd = false;
return;
}
sint line;
for (line = _Lines.size() - 1; line >= 0; --line)
for (line = (uint)_Lines.size() - 1; line >= 0; --line)
{
float newPy = py + _FontHeight + _MultiLineSpace;
if (newPy > y)
@ -1758,7 +1758,7 @@ void CViewText::getCharacterIndexFromPosition(sint x, sint y, uint &index, bool
}
}
px = newPx;
charPos += currWord.Text.length() + currWord.NumSpaces;
charPos += (uint)currWord.Text.length() + currWord.NumSpaces;
}
index = charPos;
cursorAtPreviousLineEnd = false;
@ -1769,7 +1769,7 @@ void CViewText::getCharacterIndexFromPosition(sint x, sint y, uint &index, bool
cursorAtPreviousLineEnd = false;
if (y < 0)
{
index = _Text.length();
index = (uint)_Text.length();
return;
}
if (y > (sint) _FontHeight)
@ -1833,7 +1833,7 @@ uint CViewText::getNumLine() const
{
if (_MultiLine)
{
return _Lines.size();
return (uint)_Lines.size();
}
else
{
@ -1935,7 +1935,7 @@ void CViewText::CWord::build(const ucstring &text, uint numSpaces/*=0*/)
// ***************************************************************************
void CViewText::removeEndSpaces()
{
int i = _Text.size()-1;
int i = (int)_Text.size()-1;
while ((i>=0) && ((_Text[i] < 0x20) || (_Text[i] == ' ')))
{
i--;
@ -2252,7 +2252,7 @@ void CViewText::buildFormatTagText(const ucstring &text, ucstring &textBuild, s
// Build the text without the formatTags, and get the color tags separately
textBuild.reserve(text.size());
uint textSize= text.size();
uint textSize= (uint)text.size();
// Must herit all the props from old tags.
CViewText::CFormatTag precTag; // set default.
for (uint i = 0; i < textSize;)
@ -2263,7 +2263,7 @@ void CViewText::buildFormatTagText(const ucstring &text, ucstring &textBuild, s
CViewText::CFormatTag ct= precTag;
// get new color and skip tag.
ct.Color= getColorTag(text, i);
ct.Index= textBuild.size();
ct.Index= (uint)textBuild.size();
formatTags.push_back(ct);
}
else if(isTabTag(text, i, textSize))
@ -2272,7 +2272,7 @@ void CViewText::buildFormatTagText(const ucstring &text, ucstring &textBuild, s
CViewText::CFormatTag ct= precTag;
// get new Tab and skip tag.
ct.TabX= getTabTag(text, i);
ct.Index= textBuild.size();
ct.Index= (uint)textBuild.size();
formatTags.push_back(ct);
}
else if(isTooltipTag(text, i, textSize))
@ -2287,11 +2287,11 @@ void CViewText::buildFormatTagText(const ucstring &text, ucstring &textBuild, s
}
else
{
ct.IndexTt= tooltips.size();
ct.IndexTt= (uint)tooltips.size();
tooltips.push_back(uitt);
}
ct.Index= textBuild.size();
ct.Index= (uint)textBuild.size();
formatTags.push_back(ct);
}
else
@ -2307,7 +2307,7 @@ void CViewText::buildFormatTagText(const ucstring &text, ucstring &textBuild, s
{
CViewText::CFormatTag ct= precTag;
ct.TabX= 0;
ct.Index= textBuild.size();
ct.Index= (uint)textBuild.size();
formatTags.push_back(ct);
}
}

View file

@ -54,7 +54,7 @@ public:
void parseTextOptions (xmlNodePtr cur);
bool parse (xmlNodePtr cur, CInterfaceGroup * parentGroup);
virtual uint32 getMemory() { return sizeof(*this)+_Id.size(); }
virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); }
/// Updating
virtual void draw ();
@ -308,7 +308,7 @@ private:
// Add a new word (and its context) in the line + a number of spaces to append at the end of the line
void addWord(const ucstring &word, uint numSpaces, const CFormatInfo &wordFormat, uint fontWidth);
void addWord(const CWord &word, uint fontWidth);
uint getNumWords() const { return _Words.size(); }
uint getNumWords() const { return (uint)_Words.size(); }
CWord &getWord(uint index) { return _Words[index]; }
float getSpaceWidth() const { return _SpaceWidth; }
void setSpaceWidth(float width) { _SpaceWidth = width; }

View file

@ -250,7 +250,7 @@ void CYuboChat::sendInternal(const ucstring &msg)
}
// append linefield
toSend+= "\r\n";
uint32 size= toSend.size();
uint32 size= (uint32)toSend.size();
uint32 off= 0;
// until the whole message is sent
while(size!=0)
@ -262,7 +262,7 @@ void CYuboChat::sendInternal(const ucstring &msg)
}
// maybe send the rest of the message (very rare....)
off+=size;
size= toSend.size()-off;
size= (uint32)toSend.size()-off;
}
}
catch(Exception &e)

View file

@ -113,7 +113,7 @@ void CLandscapePolyDrawer::addPoly(const NLMISC::CPolygon2D &poly,
_PolyColor.push_back(color);
_BBoxes.push_back(bBox);
buildShadowVolume(_Polygons.size());
buildShadowVolume((uint)_Polygons.size());
}
//-----------------------------------------------------------------------------------------------------------
@ -381,7 +381,7 @@ void CLandscapePolyDrawer::buildShadowVolume(uint poly)
CIndexBuffer ib;
CVector2f barycenter(0, 0);
const CPolygon2D & polygon = _Polygons[poly-1];
uint verticesNb = polygon.Vertices.size();
uint verticesNb = (uint)polygon.Vertices.size();
// barycenter polygon
for(i=0; i<verticesNb; i++)
@ -482,7 +482,7 @@ void CLandscapePolyDrawer::drawShadowVolume(uint poly, bool firstPass)
CVertexBuffer & vb = _PolyVB[poly-1];
const CPolygon2D & polygon = _Polygons[poly-1];
const CVector2f & barycenter = _Barycenters[poly-1];
uint verticesNb = polygon.Vertices.size();
uint verticesNb = (uint)polygon.Vertices.size();
uint i;
CVector2f vertex;
@ -534,7 +534,7 @@ void CLandscapePolyDrawer::drawShadowVolume(uint poly, bool firstPass)
((CDriverUser*)Driver)->getDriver()->activeVertexBuffer(_PolyVB[poly-1]);
((CDriverUser*)Driver)->getDriver()->activeIndexBuffer(_PolyIB[poly-1]);
((CDriverUser*)Driver)->getDriver()->renderTriangles(
*GenericMat.getObjectPtr(), 0, 4*_Polygons[poly-1].Vertices.size());
*GenericMat.getObjectPtr(), 0, 4*(uint32)_Polygons[poly-1].Vertices.size());
if(!firstPass)
{

Some files were not shown because too many files have changed in this diff Show more