Changed: Created NELID macro to fix warning "multi-character character constant"

This commit is contained in:
kervala 2013-09-24 21:33:59 +02:00
parent bb7297f260
commit c8c296f484
16 changed files with 20 additions and 20 deletions

View file

@ -1711,8 +1711,8 @@ void CObjectViewer::serial (NLMISC::IStream& f)
{
// version 4: include particle workspace infos
// serial "OBJV_CFG"
f.serialCheck (NELID("VJBO');
f.serialCheck (NELID("GFC_');
f.serialCheck (NELID("VJBO"));
f.serialCheck (NELID("GFC_"));
// serial the version
int ver=f.serialVersion (4);

View file

@ -488,7 +488,7 @@ void CCharacterCL::stopAttachedFXForCurrrentAnim(bool stopLoopingFX)
{
if(!(*tmpItAttached)->FX.empty())
{
if (!(*tmpItAttached)->FX.removeByID('STOP') && !(*tmpItAttached)->FX.removeByID('main'))
if (!(*tmpItAttached)->FX.removeByID(NELID("STOP")) && !(*tmpItAttached)->FX.removeByID(NELID("main")))
{
(*tmpItAttached)->FX.activateEmitters(false);
}
@ -9373,7 +9373,7 @@ void CCharacterCL::CWornItem::enableAdvantageFX(NL3D::UInstance parent)
if (!enabled)
{
// well, it is unlikely that player will loses its ability to master an item after he gained it, but manage the case anyway.
if (!AdvantageFX.removeByID('STOP') && !AdvantageFX.removeByID('main'))
if (!AdvantageFX.removeByID(NELID("STOP")) && !AdvantageFX.removeByID(NELID("main")))
{
AdvantageFX.activateEmitters(false);
}

View file

@ -263,7 +263,7 @@ CFxCL::~CFxCL()
// Stop emitters
UParticleSystemInstance fxInst;
fxInst.cast (_Instance);
if (!fxInst.removeByID( 'STOP' ) && !fxInst.removeByID( 'main' ) )
if (!fxInst.removeByID(NELID("STOP")) && !fxInst.removeByID(NELID("main")))
{
fxInst.activateEmitters( false );
}

View file

@ -648,7 +648,7 @@ void CProjectileManager::CProjectile::shutDown(CCharacterCL *target)
target->buildAlignMatrix(userMatrix);
FX[k].forceSetUserMatrix(userMatrix);
}
if (!FX[k].removeByID('STOP') && !FX[k].removeByID('main'))
if (!FX[k].removeByID(NELID("STOP")) && !FX[k].removeByID(NELID("main")))
{
FX[k].activateEmitters(false);
//nlwarning("Projectile with a particle system that has no 'STOP' emitter");

View file

@ -544,7 +544,7 @@ void CTimedFXManager::CManagedFX::shutDown(NL3D::UScene *scene, CFXManager &fxMa
// fx isn't spwaned, so must tell fx to stop its emitters
if (Instance.isSystemPresent() && Instance.isValid())
{
if (!Instance.removeByID('main') && !Instance.removeByID('STOP'))
if (!Instance.removeByID(NELID("main")) && !Instance.removeByID(NELID("STOP")))
{
// if a specific emitter has not be tagged, just stop all emitters if there's no better solution
Instance.activateEmitters(false);

View file

@ -553,7 +553,7 @@ void CWorldMap::clear()
void CWorldMap::serial(NLMISC::IStream &f)
{
f.serialCheck(NELID("WMAP');
f.serialCheck(NELID("WMAP"));
// Version
// 0: initial version

View file

@ -259,7 +259,7 @@ bool CDBDeltaFile::preload()
*/
bool CDBDeltaFile::serialHeader()
{
serialCheck(NELID("DbDt');
serialCheck(NELID("DbDt"));
uint version = serialVersion(0);
if (isReading())
@ -280,7 +280,7 @@ bool CDBDeltaFile::serialHeader()
serial(_Header);
}
serialCheck(NELID("Data');
serialCheck(NELID("Data"));
_DataStart = ftell(_File);

View file

@ -189,7 +189,7 @@ private:
void serial(NLMISC::IStream& s)
{
s.serialCheck(NELID("DHdr');
s.serialCheck(NELID("DHdr"));
uint version = s.serialVersion(0);
s.serial(RowSize);

View file

@ -483,7 +483,7 @@ bool CDBReferenceFile::read(uint32 index, uint8* rowdata)
*/
bool CDBReferenceFile::serialHeader()
{
serialCheck(NELID("DbRf');
serialCheck(NELID("DbRf"));
uint version = serialVersion(0);
if (isReading())
@ -504,7 +504,7 @@ bool CDBReferenceFile::serialHeader()
serial(_Header);
}
serialCheck(NELID("Data');
serialCheck(NELID("Data"));
_DataStart = ftell(_File);

View file

@ -199,7 +199,7 @@ private:
void serial(NLMISC::IStream& s)
{
s.serialCheck(NELID("RHdr');
s.serialCheck(NELID("RHdr"));
uint version = s.serialVersion(0);
s.serial(BaseIndex);

View file

@ -1436,7 +1436,7 @@ inline uint32 CDbMessage::getMessageHeaderSize()
*/
inline void CUpdateLog::serial(NLMISC::IStream& f)
{
f.serialCheck(NELID("ULOG');
f.serialCheck(NELID("ULOG"));
uint version = f.serialVersion(1);

View file

@ -331,7 +331,7 @@ void CDatabaseState::serial(NLMISC::IStream& s)
{
s.xmlPush("database_state");
s.serialCheck(NELID("DBST');
s.serialCheck(NELID("DBST"));
uint version = s.serialVersion(0);
s.xmlPush("name");

View file

@ -60,7 +60,7 @@ public:
{
s.xmlPush("reference");
s.serialCheck(NELID("RIDX');
s.serialCheck(NELID("RIDX"));
uint version = s.serialVersion(0);
s.xmlPush("database");

View file

@ -73,7 +73,7 @@ void CPDStringMapper::setMapping(const std::string& str, uint32 id)
*/
void CPDStringMapper::serial(NLMISC::IStream& f)
{
f.serialCheck(NELID("PDSM');
f.serialCheck(NELID("PDSM"));
uint version = f.serialVersion(0);

View file

@ -714,7 +714,7 @@ public:
void serial(NLMISC::IStream& f)
{
f.serialCheck(NELID("IALC');
f.serialCheck(NELID("IALC"));
f.serialVersion(0);
f.serial(_NextIndex);

View file

@ -114,7 +114,7 @@ void CLightIGLoader::loadIG(const string &filename)
// Serial a header
_File.serialCheck (NELID("TPRG');
_File.serialCheck (NELID("TPRG"));
// Serial a version number
sint version = _File.serialVersion (5);