From b5c625f261f8f2b5b74b5b2a86b3907c48ab82df Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 24 Sep 2013 21:33:59 +0200 Subject: [PATCH] Changed: Created NELID macro to fix warning "multi-character character constant" --- code/nel/tools/3d/object_viewer/object_viewer.cpp | 4 ++-- code/ryzom/client/src/character_cl.cpp | 4 ++-- code/ryzom/client/src/fx_cl.cpp | 2 +- code/ryzom/client/src/projectile_manager.cpp | 2 +- code/ryzom/client/src/timed_fx_manager.cpp | 2 +- code/ryzom/server/src/ai_share/world_map.cpp | 2 +- code/ryzom/server/src/pd_lib/db_delta_file.cpp | 4 ++-- code/ryzom/server/src/pd_lib/db_delta_file.h | 2 +- code/ryzom/server/src/pd_lib/db_reference_file.cpp | 4 ++-- code/ryzom/server/src/pd_lib/db_reference_file.h | 2 +- code/ryzom/server/src/pd_lib/pd_messages.h | 2 +- code/ryzom/server/src/pd_lib/pd_server_utils.cpp | 2 +- code/ryzom/server/src/pd_lib/pd_server_utils.h | 2 +- code/ryzom/server/src/pd_lib/pd_string_mapper.cpp | 2 +- code/ryzom/server/src/pd_lib/pd_utils.h | 2 +- code/ryzom/server/src/server_share/light_ig_loader.cpp | 2 +- 16 files changed, 20 insertions(+), 20 deletions(-) diff --git a/code/nel/tools/3d/object_viewer/object_viewer.cpp b/code/nel/tools/3d/object_viewer/object_viewer.cpp index d96554c0f..ff530e007 100644 --- a/code/nel/tools/3d/object_viewer/object_viewer.cpp +++ b/code/nel/tools/3d/object_viewer/object_viewer.cpp @@ -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); diff --git a/code/ryzom/client/src/character_cl.cpp b/code/ryzom/client/src/character_cl.cpp index e3b453cfc..932819817 100644 --- a/code/ryzom/client/src/character_cl.cpp +++ b/code/ryzom/client/src/character_cl.cpp @@ -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); } diff --git a/code/ryzom/client/src/fx_cl.cpp b/code/ryzom/client/src/fx_cl.cpp index 971100386..7a5418c3a 100644 --- a/code/ryzom/client/src/fx_cl.cpp +++ b/code/ryzom/client/src/fx_cl.cpp @@ -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 ); } diff --git a/code/ryzom/client/src/projectile_manager.cpp b/code/ryzom/client/src/projectile_manager.cpp index 80db533c5..6b4e6c7c1 100644 --- a/code/ryzom/client/src/projectile_manager.cpp +++ b/code/ryzom/client/src/projectile_manager.cpp @@ -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"); diff --git a/code/ryzom/client/src/timed_fx_manager.cpp b/code/ryzom/client/src/timed_fx_manager.cpp index 6ea6f273b..89b71974f 100644 --- a/code/ryzom/client/src/timed_fx_manager.cpp +++ b/code/ryzom/client/src/timed_fx_manager.cpp @@ -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); diff --git a/code/ryzom/server/src/ai_share/world_map.cpp b/code/ryzom/server/src/ai_share/world_map.cpp index 08b21e220..eae84acbf 100644 --- a/code/ryzom/server/src/ai_share/world_map.cpp +++ b/code/ryzom/server/src/ai_share/world_map.cpp @@ -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 diff --git a/code/ryzom/server/src/pd_lib/db_delta_file.cpp b/code/ryzom/server/src/pd_lib/db_delta_file.cpp index b67dff215..4ca800256 100644 --- a/code/ryzom/server/src/pd_lib/db_delta_file.cpp +++ b/code/ryzom/server/src/pd_lib/db_delta_file.cpp @@ -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); diff --git a/code/ryzom/server/src/pd_lib/db_delta_file.h b/code/ryzom/server/src/pd_lib/db_delta_file.h index c70ec0c03..f33feaa52 100644 --- a/code/ryzom/server/src/pd_lib/db_delta_file.h +++ b/code/ryzom/server/src/pd_lib/db_delta_file.h @@ -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); diff --git a/code/ryzom/server/src/pd_lib/db_reference_file.cpp b/code/ryzom/server/src/pd_lib/db_reference_file.cpp index b020e5346..edb8c596e 100644 --- a/code/ryzom/server/src/pd_lib/db_reference_file.cpp +++ b/code/ryzom/server/src/pd_lib/db_reference_file.cpp @@ -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); diff --git a/code/ryzom/server/src/pd_lib/db_reference_file.h b/code/ryzom/server/src/pd_lib/db_reference_file.h index 46024b041..269e5278f 100644 --- a/code/ryzom/server/src/pd_lib/db_reference_file.h +++ b/code/ryzom/server/src/pd_lib/db_reference_file.h @@ -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); diff --git a/code/ryzom/server/src/pd_lib/pd_messages.h b/code/ryzom/server/src/pd_lib/pd_messages.h index bd34c4f28..25ea12c4b 100644 --- a/code/ryzom/server/src/pd_lib/pd_messages.h +++ b/code/ryzom/server/src/pd_lib/pd_messages.h @@ -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); diff --git a/code/ryzom/server/src/pd_lib/pd_server_utils.cpp b/code/ryzom/server/src/pd_lib/pd_server_utils.cpp index 76b7155a8..1ca303b0f 100644 --- a/code/ryzom/server/src/pd_lib/pd_server_utils.cpp +++ b/code/ryzom/server/src/pd_lib/pd_server_utils.cpp @@ -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"); diff --git a/code/ryzom/server/src/pd_lib/pd_server_utils.h b/code/ryzom/server/src/pd_lib/pd_server_utils.h index b2125fee8..ac67e8a7a 100644 --- a/code/ryzom/server/src/pd_lib/pd_server_utils.h +++ b/code/ryzom/server/src/pd_lib/pd_server_utils.h @@ -60,7 +60,7 @@ public: { s.xmlPush("reference"); - s.serialCheck(NELID("RIDX'); + s.serialCheck(NELID("RIDX")); uint version = s.serialVersion(0); s.xmlPush("database"); diff --git a/code/ryzom/server/src/pd_lib/pd_string_mapper.cpp b/code/ryzom/server/src/pd_lib/pd_string_mapper.cpp index 780cc8cd5..184d4bb7f 100644 --- a/code/ryzom/server/src/pd_lib/pd_string_mapper.cpp +++ b/code/ryzom/server/src/pd_lib/pd_string_mapper.cpp @@ -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); diff --git a/code/ryzom/server/src/pd_lib/pd_utils.h b/code/ryzom/server/src/pd_lib/pd_utils.h index cb835e36d..73a0268d8 100644 --- a/code/ryzom/server/src/pd_lib/pd_utils.h +++ b/code/ryzom/server/src/pd_lib/pd_utils.h @@ -714,7 +714,7 @@ public: void serial(NLMISC::IStream& f) { - f.serialCheck(NELID("IALC'); + f.serialCheck(NELID("IALC")); f.serialVersion(0); f.serial(_NextIndex); diff --git a/code/ryzom/server/src/server_share/light_ig_loader.cpp b/code/ryzom/server/src/server_share/light_ig_loader.cpp index 2f3805688..de29ad949 100644 --- a/code/ryzom/server/src/server_share/light_ig_loader.cpp +++ b/code/ryzom/server/src/server_share/light_ig_loader.cpp @@ -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);