Changed: Replace all "" by empty(), clear(), Empty(), etc...
This commit is contained in:
parent
27cefa66d5
commit
dc217f573f
159 changed files with 366 additions and 373 deletions
|
@ -29,7 +29,7 @@ struct CHashKey
|
||||||
|
|
||||||
CHashKey (const unsigned char Message_Digest[20])
|
CHashKey (const unsigned char Message_Digest[20])
|
||||||
{
|
{
|
||||||
HashKeyString = "";
|
HashKeyString.clear();
|
||||||
for(sint i = 0; i < 20 ; ++i)
|
for(sint i = 0; i < 20 ; ++i)
|
||||||
{
|
{
|
||||||
HashKeyString += Message_Digest[i];
|
HashKeyString += Message_Digest[i];
|
||||||
|
@ -45,7 +45,7 @@ struct CHashKey
|
||||||
}
|
}
|
||||||
else if (str.size() == 40)
|
else if (str.size() == 40)
|
||||||
{
|
{
|
||||||
HashKeyString = "";
|
HashKeyString.clear();
|
||||||
for(uint i = 0; i < str.size(); i+=2)
|
for(uint i = 0; i < str.size(); i+=2)
|
||||||
{
|
{
|
||||||
uint8 val;
|
uint8 val;
|
||||||
|
|
|
@ -319,7 +319,7 @@ void CCluster::serial (NLMISC::IStream&f)
|
||||||
// write the env fx name
|
// write the env fx name
|
||||||
std::string envFxName = CStringMapper::unmap(_EnvironmentFxId);
|
std::string envFxName = CStringMapper::unmap(_EnvironmentFxId);
|
||||||
if (envFxName == "no fx")
|
if (envFxName == "no fx")
|
||||||
envFxName = "";
|
envFxName.clear();
|
||||||
f.serial(envFxName);
|
f.serial(envFxName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1265,7 +1265,7 @@ bool CDriverD3D::init (uintptr_t windowIcon, emptyProc exitFunc)
|
||||||
if (error != ERROR_CLASS_ALREADY_EXISTS)
|
if (error != ERROR_CLASS_ALREADY_EXISTS)
|
||||||
{
|
{
|
||||||
nlwarning("CDriverD3D::init: Can't register window class %s (error code %i)", _WindowClass.c_str(), (sint)error);
|
nlwarning("CDriverD3D::init: Can't register window class %s (error code %i)", _WindowClass.c_str(), (sint)error);
|
||||||
_WindowClass = "";
|
_WindowClass.clear();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ void CD3DShaderFX::setName (const char *name)
|
||||||
|
|
||||||
bool CD3DShaderFX::loadShaderFile (const char *filename)
|
bool CD3DShaderFX::loadShaderFile (const char *filename)
|
||||||
{
|
{
|
||||||
_Text = "";
|
_Text.clear();
|
||||||
// Lookup
|
// Lookup
|
||||||
string _filename = NLMISC::CPath::lookup(filename, false, true, true);
|
string _filename = NLMISC::CPath::lookup(filename, false, true, true);
|
||||||
if (!_filename.empty())
|
if (!_filename.empty())
|
||||||
|
|
|
@ -109,7 +109,7 @@ void dumpWriteMask(uint mask, std::string &out)
|
||||||
H_AUTO_D3D(dumpWriteMask)
|
H_AUTO_D3D(dumpWriteMask)
|
||||||
if (mask == 0xf)
|
if (mask == 0xf)
|
||||||
{
|
{
|
||||||
out = "";
|
out.clear();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
out = ".";
|
out = ".";
|
||||||
|
@ -126,7 +126,7 @@ void dumpSwizzle(const CVPSwizzle &swz, std::string &out)
|
||||||
H_AUTO_D3D(dumpSwizzle)
|
H_AUTO_D3D(dumpSwizzle)
|
||||||
if (swz.isIdentity())
|
if (swz.isIdentity())
|
||||||
{
|
{
|
||||||
out = "";
|
out.clear();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
out = ".";
|
out = ".";
|
||||||
|
|
|
@ -491,7 +491,7 @@ void CDriverGL::showCursor(bool b)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_CurrName = "";
|
_CurrName.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// update current hardware icon to avoid to have the plain arrow
|
// update current hardware icon to avoid to have the plain arrow
|
||||||
|
|
|
@ -1270,7 +1270,7 @@ static void ARBVertexProgramDumpWriteMask(uint mask, std::string &out)
|
||||||
H_AUTO_OGL(ARBVertexProgramDumpWriteMask)
|
H_AUTO_OGL(ARBVertexProgramDumpWriteMask)
|
||||||
if (mask == 0xf)
|
if (mask == 0xf)
|
||||||
{
|
{
|
||||||
out = "";
|
out.clear();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
out = ".";
|
out = ".";
|
||||||
|
@ -1286,7 +1286,7 @@ static void ARBVertexProgramDumpSwizzle(const CVPSwizzle &swz, std::string &out)
|
||||||
H_AUTO_OGL(ARBVertexProgramDumpSwizzle)
|
H_AUTO_OGL(ARBVertexProgramDumpSwizzle)
|
||||||
if (swz.isIdentity())
|
if (swz.isIdentity())
|
||||||
{
|
{
|
||||||
out = "";
|
out.clear();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
out = ".";
|
out = ".";
|
||||||
|
|
|
@ -626,7 +626,7 @@ bool CUnixEventEmitter::processMessage (XEvent &event, CEventServer *server)
|
||||||
}
|
}
|
||||||
case SelectionClear:
|
case SelectionClear:
|
||||||
_SelectionOwned = false;
|
_SelectionOwned = false;
|
||||||
_CopiedString = "";
|
_CopiedString.clear();
|
||||||
break;
|
break;
|
||||||
case SelectionNotify:
|
case SelectionNotify:
|
||||||
{
|
{
|
||||||
|
|
|
@ -262,8 +262,8 @@ void CLandscapeUser::refreshZonesAround(const CVector &pos, float radius, std::s
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_LOAD_LANDSCAPE;
|
NL3D_HAUTO_LOAD_LANDSCAPE;
|
||||||
|
|
||||||
zoneRemoved= "";
|
zoneRemoved.clear();
|
||||||
zoneAdded= "";
|
zoneAdded.clear();
|
||||||
CZoneManager::SZoneManagerWork Work;
|
CZoneManager::SZoneManagerWork Work;
|
||||||
// Check if new zone must be added to landscape
|
// Check if new zone must be added to landscape
|
||||||
if (_ZoneManager.isWorkComplete(Work))
|
if (_ZoneManager.isWorkComplete(Work))
|
||||||
|
|
|
@ -242,11 +242,11 @@ void CPortal::serial (NLMISC::IStream& f)
|
||||||
{
|
{
|
||||||
std::string occName = CStringMapper::unmap(_OcclusionModelId);
|
std::string occName = CStringMapper::unmap(_OcclusionModelId);
|
||||||
if (occName == "no occlusion")
|
if (occName == "no occlusion")
|
||||||
occName = "";
|
occName.clear();
|
||||||
f.serial(occName);
|
f.serial(occName);
|
||||||
occName = CStringMapper::unmap(_OpenOcclusionModelId);
|
occName = CStringMapper::unmap(_OpenOcclusionModelId);
|
||||||
if (occName == "no occlusion")
|
if (occName == "no occlusion")
|
||||||
occName = "";
|
occName.clear();
|
||||||
f.serial(occName);
|
f.serial(occName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -134,7 +134,7 @@ void CTileBank::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
nlassert (f.isReading());
|
nlassert (f.isReading());
|
||||||
|
|
||||||
// Reset _AbsPath
|
// Reset _AbsPath
|
||||||
_AbsPath="";
|
_AbsPath.clear();
|
||||||
|
|
||||||
// Remove diffuse and additive in transition
|
// Remove diffuse and additive in transition
|
||||||
uint tileCount=(uint)getTileCount ();
|
uint tileCount=(uint)getTileCount ();
|
||||||
|
@ -782,7 +782,7 @@ void CTile::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
_Flags=0;
|
_Flags=0;
|
||||||
|
|
||||||
// Initialize alpha name
|
// Initialize alpha name
|
||||||
_BitmapName[alpha]="";
|
_BitmapName[alpha].clear();
|
||||||
|
|
||||||
// Read free flag
|
// Read free flag
|
||||||
f.serial (tmp);
|
f.serial (tmp);
|
||||||
|
@ -804,7 +804,7 @@ void CTile::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
void CTile::clearTile (CTile::TBitmap type)
|
void CTile::clearTile (CTile::TBitmap type)
|
||||||
{
|
{
|
||||||
_BitmapName[type]="";
|
_BitmapName[type].clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1521,7 +1521,7 @@ void CTileSet::setDisplacement (TDisplacement displacement, const std::string& f
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
void CTileSet::cleanUnusedData ()
|
void CTileSet::cleanUnusedData ()
|
||||||
{
|
{
|
||||||
_Name="";
|
_Name.clear();
|
||||||
_ChildName.clear();
|
_ChildName.clear();
|
||||||
_Border128[0].reset ();
|
_Border128[0].reset ();
|
||||||
_Border128[1].reset ();
|
_Border128[1].reset ();
|
||||||
|
@ -1853,14 +1853,12 @@ CTileNoise::CTileNoise ()
|
||||||
{
|
{
|
||||||
// Not loaded
|
// Not loaded
|
||||||
_TileNoiseMap=NULL;
|
_TileNoiseMap=NULL;
|
||||||
_FileName="";
|
|
||||||
}
|
}
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
CTileNoise::CTileNoise (const CTileNoise &src)
|
CTileNoise::CTileNoise (const CTileNoise &src)
|
||||||
{
|
{
|
||||||
// Default ctor
|
// Default ctor
|
||||||
_TileNoiseMap=NULL;
|
_TileNoiseMap=NULL;
|
||||||
_FileName="";
|
|
||||||
|
|
||||||
// Copy
|
// Copy
|
||||||
*this=src;
|
*this=src;
|
||||||
|
@ -1932,7 +1930,7 @@ void CTileNoise::reset()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Erase filename
|
// Erase filename
|
||||||
_FileName="";
|
_FileName.clear();
|
||||||
}
|
}
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
||||||
|
|
|
@ -885,7 +885,7 @@ void CVertexBuffer::serialHeader(NLMISC::IStream &f)
|
||||||
if(f.isReading())
|
if(f.isReading())
|
||||||
{
|
{
|
||||||
_PreferredMemory = RAMPreferred;
|
_PreferredMemory = RAMPreferred;
|
||||||
_Name = "";
|
_Name.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1110,7 +1110,7 @@ static void dumpWriteMask(uint mask, std::string &out)
|
||||||
{
|
{
|
||||||
if (mask == 0xf)
|
if (mask == 0xf)
|
||||||
{
|
{
|
||||||
out = "";
|
out.clear();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
out = ".";
|
out = ".";
|
||||||
|
@ -1125,7 +1125,7 @@ static void dumpSwizzle(const CVPSwizzle &swz, std::string &out)
|
||||||
{
|
{
|
||||||
if (swz.isIdentity())
|
if (swz.isIdentity())
|
||||||
{
|
{
|
||||||
out = "";
|
out.clear();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
out = ".";
|
out = ".";
|
||||||
|
|
|
@ -170,7 +170,7 @@ bool CZoneManager::isWorkComplete (CZoneManager::SZoneManagerWork &rWork)
|
||||||
rWork.NameZoneAdded = ite->ZoneToAddName;
|
rWork.NameZoneAdded = ite->ZoneToAddName;
|
||||||
rWork.ZoneRemoved = false;
|
rWork.ZoneRemoved = false;
|
||||||
rWork.IdZoneToRemove = 0;
|
rWork.IdZoneToRemove = 0;
|
||||||
rWork.NameZoneRemoved = "";
|
rWork.NameZoneRemoved.clear();
|
||||||
rWork.Zone = const_cast<CZone*>(ite->Zone);
|
rWork.Zone = const_cast<CZone*>(ite->Zone);
|
||||||
_LoadedZones.push_back (ite->ZoneToAddId);
|
_LoadedZones.push_back (ite->ZoneToAddId);
|
||||||
|
|
||||||
|
@ -187,7 +187,7 @@ bool CZoneManager::isWorkComplete (CZoneManager::SZoneManagerWork &rWork)
|
||||||
{
|
{
|
||||||
_RemovingZone = false;
|
_RemovingZone = false;
|
||||||
rWork.ZoneAdded = false;
|
rWork.ZoneAdded = false;
|
||||||
rWork.NameZoneAdded = "";
|
rWork.NameZoneAdded.clear();
|
||||||
rWork.ZoneRemoved = true;
|
rWork.ZoneRemoved = true;
|
||||||
rWork.IdZoneToRemove = _IdZoneToRemove;
|
rWork.IdZoneToRemove = _IdZoneToRemove;
|
||||||
rWork.NameZoneRemoved = getZoneNameFromId(_IdZoneToRemove);
|
rWork.NameZoneRemoved = getZoneNameFromId(_IdZoneToRemove);
|
||||||
|
|
|
@ -498,7 +498,7 @@ void CFormDfn::CEntry::setDfn (CFormLoader &loader, const char *filename)
|
||||||
void CFormDfn::CEntry::setDfnPointer ()
|
void CFormDfn::CEntry::setDfnPointer ()
|
||||||
{
|
{
|
||||||
TypeElement = EntryVirtualDfn;
|
TypeElement = EntryVirtualDfn;
|
||||||
Filename = "";
|
Filename.clear();
|
||||||
Type = NULL;
|
Type = NULL;
|
||||||
Dfn = NULL;
|
Dfn = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1512,7 +1512,7 @@ const char* CFormElm::tokenize (const char *name, string &str, uint &/* errorInd
|
||||||
return name+1;
|
return name+1;
|
||||||
}
|
}
|
||||||
|
|
||||||
str = "";
|
str.clear();
|
||||||
while ( (*name != '.') && (*name != '[') && (*name != ']') && (*name != 0) )
|
while ( (*name != '.') && (*name != '[') && (*name != ']') && (*name != 0) )
|
||||||
{
|
{
|
||||||
// Add a char
|
// Add a char
|
||||||
|
@ -2066,7 +2066,7 @@ void CFormElmStruct::getFormName (std::string &result, const CFormElm *child) co
|
||||||
// Reset the result
|
// Reset the result
|
||||||
if (child == NULL)
|
if (child == NULL)
|
||||||
{
|
{
|
||||||
result = "";
|
result.clear();
|
||||||
result.reserve (50);
|
result.reserve (50);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2723,7 +2723,7 @@ void CFormElmArray::getFormName (std::string &result, const CFormElm *child) con
|
||||||
// Reset the result
|
// Reset the result
|
||||||
if (child == NULL)
|
if (child == NULL)
|
||||||
{
|
{
|
||||||
result = "";
|
result.clear();
|
||||||
result.reserve (50);
|
result.reserve (50);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3067,7 +3067,7 @@ void CFormElmAtom::getFormName (std::string &result, const CFormElm *child) cons
|
||||||
{
|
{
|
||||||
// Must be NULL
|
// Must be NULL
|
||||||
nlassert (child == NULL);
|
nlassert (child == NULL);
|
||||||
result = "";
|
result.clear();
|
||||||
result.reserve (50);
|
result.reserve (50);
|
||||||
|
|
||||||
// Get parent form name
|
// Get parent form name
|
||||||
|
|
|
@ -159,7 +159,7 @@ void CFileHeader::read (xmlNodePtr root)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Look for the comment node
|
// Look for the comment node
|
||||||
Comments = "";
|
Comments.clear();
|
||||||
xmlNodePtr node = CIXml::getFirstChildNode (root, "COMMENTS");
|
xmlNodePtr node = CIXml::getFirstChildNode (root, "COMMENTS");
|
||||||
if (node)
|
if (node)
|
||||||
{
|
{
|
||||||
|
@ -181,7 +181,7 @@ void CFileHeader::read (xmlNodePtr root)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Look for the log node
|
// Look for the log node
|
||||||
Log = "";
|
Log.clear();
|
||||||
node = CIXml::getFirstChildNode (root, "LOG");
|
node = CIXml::getFirstChildNode (root, "LOG");
|
||||||
if (node)
|
if (node)
|
||||||
{
|
{
|
||||||
|
|
|
@ -185,7 +185,7 @@ void CType::read (xmlNodePtr root)
|
||||||
xmlFree ((void*)value);
|
xmlFree ((void*)value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Default = "";
|
Default.clear();
|
||||||
|
|
||||||
// Read Min
|
// Read Min
|
||||||
value = (const char*)xmlGetProp (root, (xmlChar*)"Min");
|
value = (const char*)xmlGetProp (root, (xmlChar*)"Min");
|
||||||
|
@ -197,7 +197,7 @@ void CType::read (xmlNodePtr root)
|
||||||
xmlFree ((void*)value);
|
xmlFree ((void*)value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Min = "";
|
Min.clear();
|
||||||
|
|
||||||
// Read Max
|
// Read Max
|
||||||
value = (const char*)xmlGetProp (root, (xmlChar*)"Max");
|
value = (const char*)xmlGetProp (root, (xmlChar*)"Max");
|
||||||
|
@ -209,7 +209,7 @@ void CType::read (xmlNodePtr root)
|
||||||
xmlFree ((void*)value);
|
xmlFree ((void*)value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Max = "";
|
Max.clear();
|
||||||
|
|
||||||
// Read Increment
|
// Read Increment
|
||||||
value = (const char*)xmlGetProp (root, (xmlChar*)"Increment");
|
value = (const char*)xmlGetProp (root, (xmlChar*)"Increment");
|
||||||
|
@ -221,7 +221,7 @@ void CType::read (xmlNodePtr root)
|
||||||
xmlFree ((void*)value);
|
xmlFree ((void*)value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Increment = "";
|
Increment.clear();
|
||||||
|
|
||||||
// Read the definitions
|
// Read the definitions
|
||||||
uint childrenCount = CIXml::countChildren (root, "DEFINITION");
|
uint childrenCount = CIXml::countChildren (root, "DEFINITION");
|
||||||
|
@ -465,7 +465,7 @@ uint getNextToken (const char *startString, string &token, uint &offset)
|
||||||
offset += 9;
|
offset += 9;
|
||||||
return NL_TOKEN_NAME;
|
return NL_TOKEN_NAME;
|
||||||
}
|
}
|
||||||
token = "";
|
token.clear();
|
||||||
while (startString[offset])
|
while (startString[offset])
|
||||||
{
|
{
|
||||||
if (startString[offset] == '\\')
|
if (startString[offset] == '\\')
|
||||||
|
|
|
@ -1768,7 +1768,7 @@ namespace NLGUI
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
void CGroupEditBox::clearAllEditBox()
|
void CGroupEditBox::clearAllEditBox()
|
||||||
{
|
{
|
||||||
_InputString = "";
|
_InputString.clear();
|
||||||
_CursorPos = 0;
|
_CursorPos = 0;
|
||||||
_CursorAtPreviousLineEnd = false;
|
_CursorAtPreviousLineEnd = false;
|
||||||
if (!_ViewText) return;
|
if (!_ViewText) return;
|
||||||
|
|
|
@ -2089,10 +2089,10 @@ namespace NLGUI
|
||||||
templateName = value[MY_HTML_TEXTAREA_Z_INPUT_TMPL];
|
templateName = value[MY_HTML_TEXTAREA_Z_INPUT_TMPL];
|
||||||
|
|
||||||
// Get the string name
|
// Get the string name
|
||||||
_TextAreaName = "";
|
_TextAreaName.clear();
|
||||||
_TextAreaRow = 1;
|
_TextAreaRow = 1;
|
||||||
_TextAreaCols = 10;
|
_TextAreaCols = 10;
|
||||||
_TextAreaContent = "";
|
_TextAreaContent.clear();
|
||||||
_TextAreaMaxLength = 1024;
|
_TextAreaMaxLength = 1024;
|
||||||
if (present[MY_HTML_TEXTAREA_NAME] && value[MY_HTML_TEXTAREA_NAME])
|
if (present[MY_HTML_TEXTAREA_NAME] && value[MY_HTML_TEXTAREA_NAME])
|
||||||
_TextAreaName = value[MY_HTML_TEXTAREA_NAME];
|
_TextAreaName = value[MY_HTML_TEXTAREA_NAME];
|
||||||
|
@ -2112,7 +2112,7 @@ namespace NLGUI
|
||||||
if(!_TitlePrefix.empty())
|
if(!_TitlePrefix.empty())
|
||||||
_TitleString = _TitlePrefix + " - ";
|
_TitleString = _TitlePrefix + " - ";
|
||||||
else
|
else
|
||||||
_TitleString = "";
|
_TitleString.clear();
|
||||||
_Title = true;
|
_Title = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -2144,10 +2144,10 @@ namespace NLGUI
|
||||||
endParagraph();
|
endParagraph();
|
||||||
break;
|
break;
|
||||||
case HTML_OBJECT:
|
case HTML_OBJECT:
|
||||||
_ObjectType = "";
|
_ObjectType.clear();
|
||||||
_ObjectData = "";
|
_ObjectData.clear();
|
||||||
_ObjectMD5Sum = "";
|
_ObjectMD5Sum.clear();
|
||||||
_ObjectAction = "";
|
_ObjectAction.clear();
|
||||||
if (present[HTML_OBJECT_TYPE] && value[HTML_OBJECT_TYPE])
|
if (present[HTML_OBJECT_TYPE] && value[HTML_OBJECT_TYPE])
|
||||||
_ObjectType = value[HTML_OBJECT_TYPE];
|
_ObjectType = value[HTML_OBJECT_TYPE];
|
||||||
if (present[HTML_OBJECT_DATA] && value[HTML_OBJECT_DATA])
|
if (present[HTML_OBJECT_DATA] && value[HTML_OBJECT_DATA])
|
||||||
|
@ -2369,7 +2369,7 @@ namespace NLGUI
|
||||||
{
|
{
|
||||||
endParagraph();
|
endParagraph();
|
||||||
}
|
}
|
||||||
_DivName = "";
|
_DivName.clear();
|
||||||
popIfNotEmpty (_Divs);
|
popIfNotEmpty (_Divs);
|
||||||
popIfNotEmpty (_BlockLevelElement);
|
popIfNotEmpty (_BlockLevelElement);
|
||||||
break;
|
break;
|
||||||
|
@ -2614,7 +2614,7 @@ namespace NLGUI
|
||||||
{
|
{
|
||||||
CLuaManager::getInstance().executeLuaScript("\nlocal __ALLREADYDL__=true\n"+_ObjectScript, true);
|
CLuaManager::getInstance().executeLuaScript("\nlocal __ALLREADYDL__=true\n"+_ObjectScript, true);
|
||||||
}
|
}
|
||||||
_ObjectScript = "";
|
_ObjectScript.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_Object = false;
|
_Object = false;
|
||||||
|
@ -2632,7 +2632,7 @@ namespace NLGUI
|
||||||
{
|
{
|
||||||
// we receive an embeded lua script
|
// we receive an embeded lua script
|
||||||
_ParsingLua = _TrustedDomain; // Only parse lua if TrustedDomain
|
_ParsingLua = _TrustedDomain; // Only parse lua if TrustedDomain
|
||||||
_LuaScript = "";
|
_LuaScript.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2687,8 +2687,6 @@ namespace NLGUI
|
||||||
_LI = false;
|
_LI = false;
|
||||||
_SelectOption = false;
|
_SelectOption = false;
|
||||||
_GroupListAdaptor = NULL;
|
_GroupListAdaptor = NULL;
|
||||||
_DocumentUrl = "";
|
|
||||||
_DocumentDomain = "";
|
|
||||||
_UrlFragment.clear();
|
_UrlFragment.clear();
|
||||||
_RefreshUrl.clear();
|
_RefreshUrl.clear();
|
||||||
_NextRefreshTime = 0.0;
|
_NextRefreshTime = 0.0;
|
||||||
|
@ -2741,7 +2739,6 @@ namespace NLGUI
|
||||||
DefaultCheckBoxBitmapOver = "checkbox_over.tga";
|
DefaultCheckBoxBitmapOver = "checkbox_over.tga";
|
||||||
DefaultRadioButtonBitmapNormal = "w_radiobutton.png";
|
DefaultRadioButtonBitmapNormal = "w_radiobutton.png";
|
||||||
DefaultRadioButtonBitmapPushed = "w_radiobutton_pushed.png";
|
DefaultRadioButtonBitmapPushed = "w_radiobutton_pushed.png";
|
||||||
DefaultRadioButtonBitmapOver = "";
|
|
||||||
DefaultBackgroundBitmapView = "bg";
|
DefaultBackgroundBitmapView = "bg";
|
||||||
clearContext();
|
clearContext();
|
||||||
|
|
||||||
|
@ -5825,7 +5822,7 @@ namespace NLGUI
|
||||||
if (it->second == "monospace")
|
if (it->second == "monospace")
|
||||||
style.FontFamily = "monospace";
|
style.FontFamily = "monospace";
|
||||||
else
|
else
|
||||||
style.FontFamily = "";
|
style.FontFamily.clear();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (it->first == "font-weight")
|
if (it->first == "font-weight")
|
||||||
|
|
|
@ -363,7 +363,7 @@ namespace NLGUI
|
||||||
uint32 i;
|
uint32 i;
|
||||||
if( fromString( value, i ) )
|
if( fromString( value, i ) )
|
||||||
_TextId = i;
|
_TextId = i;
|
||||||
_HardText = "";
|
_HardText.clear();
|
||||||
onTextChanged();
|
onTextChanged();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -266,7 +266,7 @@ namespace NLGUI
|
||||||
else
|
else
|
||||||
if (stricmp((char*)cur->name, "action") == 0)
|
if (stricmp((char*)cur->name, "action") == 0)
|
||||||
{
|
{
|
||||||
string strId, strAh, strParams, strCond, strTexture="";
|
string strId, strAh, strParams, strCond, strTexture;
|
||||||
ucstring ucstrName;
|
ucstring ucstrName;
|
||||||
|
|
||||||
if (id) strId = (const char*)id;
|
if (id) strId = (const char*)id;
|
||||||
|
@ -1077,7 +1077,7 @@ namespace NLGUI
|
||||||
for (uint32 i = 0; i < pCurGSM->_Lines.size(); ++i)
|
for (uint32 i = 0; i < pCurGSM->_Lines.size(); ++i)
|
||||||
if (sRest == pCurGSM->_Lines[i].Id)
|
if (sRest == pCurGSM->_Lines[i].Id)
|
||||||
return pCurGSM->_Lines[i].ViewText;
|
return pCurGSM->_Lines[i].ViewText;
|
||||||
sRest = "";
|
sRest.clear();
|
||||||
}
|
}
|
||||||
else // no a lot of token left
|
else // no a lot of token left
|
||||||
{
|
{
|
||||||
|
|
|
@ -337,7 +337,7 @@ namespace NLGUI
|
||||||
if( fromString( value, i ) )
|
if( fromString( value, i ) )
|
||||||
{
|
{
|
||||||
_TextId = i;
|
_TextId = i;
|
||||||
_HardText = "";
|
_HardText.clear();
|
||||||
}
|
}
|
||||||
onTextChanged();
|
onTextChanged();
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -765,7 +765,7 @@ namespace NLGUI
|
||||||
rVR.getTextureSizeFromId(id, _XExtend, dummy);
|
rVR.getTextureSizeFromId(id, _XExtend, dummy);
|
||||||
else
|
else
|
||||||
// if not found, reset, to avoid errors
|
// if not found, reset, to avoid errors
|
||||||
_ArboXExtend= "";
|
_ArboXExtend.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
|
@ -1031,12 +1031,12 @@ namespace NLGUI
|
||||||
if (posid > 0)
|
if (posid > 0)
|
||||||
idTmp = idTmp.substr (0, posid);
|
idTmp = idTmp.substr (0, posid);
|
||||||
else
|
else
|
||||||
idTmp = "";
|
idTmp.clear();
|
||||||
|
|
||||||
if (poslid > 0)
|
if (poslid > 0)
|
||||||
lidTmp = lidTmp.substr (0, poslid);
|
lidTmp = lidTmp.substr (0, poslid);
|
||||||
else
|
else
|
||||||
lidTmp = "";
|
lidTmp.clear();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -665,7 +665,7 @@ namespace NLGUI
|
||||||
if (strchr(ptr, '#') != NULL)
|
if (strchr(ptr, '#') != NULL)
|
||||||
{
|
{
|
||||||
string LastProp = ptr.str();
|
string LastProp = ptr.str();
|
||||||
string NewProp ="";
|
string NewProp;
|
||||||
string RepProp;
|
string RepProp;
|
||||||
|
|
||||||
while (LastProp.size() > 0)
|
while (LastProp.size() > 0)
|
||||||
|
@ -709,7 +709,7 @@ namespace NLGUI
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
NewProp += LastProp;
|
NewProp += LastProp;
|
||||||
LastProp = "";
|
LastProp.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
xmlSetProp(node,props->name, (const xmlChar*)NewProp.c_str());
|
xmlSetProp(node,props->name, (const xmlChar*)NewProp.c_str());
|
||||||
|
|
|
@ -1240,7 +1240,7 @@ const IPrimitive *IPrimitive::getPrimitive (const std::string &absoluteOrRelativ
|
||||||
if (indexStr==string::npos)
|
if (indexStr==string::npos)
|
||||||
{
|
{
|
||||||
childName=path;
|
childName=path;
|
||||||
path="";
|
path.clear();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1664,7 +1664,7 @@ bool IPrimitive::read (xmlNodePtr xmlNode, const char *filename, uint version, C
|
||||||
if (commentNode)
|
if (commentNode)
|
||||||
{
|
{
|
||||||
if (!CIXml::getContentString(_UnparsedProperties, commentNode))
|
if (!CIXml::getContentString(_UnparsedProperties, commentNode))
|
||||||
_UnparsedProperties = "";
|
_UnparsedProperties.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read the expanded flag
|
// Read the expanded flag
|
||||||
|
|
|
@ -183,8 +183,8 @@ bool CPrimitiveClass::read (xmlNodePtr primitiveNode,
|
||||||
// init default parameters
|
// init default parameters
|
||||||
AutoInit = false;
|
AutoInit = false;
|
||||||
Deletable = true;
|
Deletable = true;
|
||||||
FileExtension = "";
|
FileExtension.clear();
|
||||||
FileType = "";
|
FileType.clear();
|
||||||
Collision = false;
|
Collision = false;
|
||||||
LinkBrothers = false;
|
LinkBrothers = false;
|
||||||
ShowArrow = true;
|
ShowArrow = true;
|
||||||
|
@ -351,16 +351,16 @@ bool CPrimitiveClass::read (xmlNodePtr primitiveNode,
|
||||||
parameter.WidgetHeight = (uint)temp;
|
parameter.WidgetHeight = (uint)temp;
|
||||||
|
|
||||||
// Read the file extension
|
// Read the file extension
|
||||||
parameter.FileExtension = "";
|
parameter.FileExtension.clear();
|
||||||
CIXml::getPropertyString (parameter.FileExtension, paramNode, "FILE_EXTENSION");
|
CIXml::getPropertyString (parameter.FileExtension, paramNode, "FILE_EXTENSION");
|
||||||
parameter.FileExtension = toLower(parameter.FileExtension);
|
parameter.FileExtension = toLower(parameter.FileExtension);
|
||||||
|
|
||||||
// Autonaming preference
|
// Autonaming preference
|
||||||
parameter.Autoname = "";
|
parameter.Autoname.clear();
|
||||||
CIXml::getPropertyString (parameter.Autoname, paramNode, "AUTONAME");
|
CIXml::getPropertyString (parameter.Autoname, paramNode, "AUTONAME");
|
||||||
|
|
||||||
// Read the file extension
|
// Read the file extension
|
||||||
parameter.Folder = "";
|
parameter.Folder.clear();
|
||||||
CIXml::getPropertyString (parameter.Folder, paramNode, "FOLDER");
|
CIXml::getPropertyString (parameter.Folder, paramNode, "FOLDER");
|
||||||
parameter.Folder = toLower(parameter.Folder);
|
parameter.Folder = toLower(parameter.Folder);
|
||||||
|
|
||||||
|
@ -650,7 +650,7 @@ void CPrimitiveClass::CParameter::CConstStringValue::getPrimitivesForPrimPath (s
|
||||||
|
|
||||||
bool CPrimitiveClass::CParameter::translateAutoname (std::string &result, const IPrimitive &primitive, const CPrimitiveClass &primitiveClass) const
|
bool CPrimitiveClass::CParameter::translateAutoname (std::string &result, const IPrimitive &primitive, const CPrimitiveClass &primitiveClass) const
|
||||||
{
|
{
|
||||||
result = "";
|
result.clear();
|
||||||
string::size_type strBegin = 0;
|
string::size_type strBegin = 0;
|
||||||
string::size_type strEnd = 0;
|
string::size_type strEnd = 0;
|
||||||
while (strBegin != Autoname.size())
|
while (strBegin != Autoname.size())
|
||||||
|
@ -745,7 +745,7 @@ bool CPrimitiveClass::CParameter::translateAutoname (std::string &result, const
|
||||||
|
|
||||||
bool CPrimitiveClass::CParameter::getDefaultValue (std::string &result, const IPrimitive &primitive, const CPrimitiveClass &primitiveClass, std::string *fromWhere) const
|
bool CPrimitiveClass::CParameter::getDefaultValue (std::string &result, const IPrimitive &primitive, const CPrimitiveClass &primitiveClass, std::string *fromWhere) const
|
||||||
{
|
{
|
||||||
result = "";
|
result.clear();
|
||||||
if (!Autoname.empty())
|
if (!Autoname.empty())
|
||||||
{
|
{
|
||||||
if (fromWhere)
|
if (fromWhere)
|
||||||
|
|
|
@ -88,7 +88,7 @@ void CZoneBankElement::convertSize()
|
||||||
}
|
}
|
||||||
fromString(sTmp, _SizeX);
|
fromString(sTmp, _SizeX);
|
||||||
|
|
||||||
++i; sTmp = "";
|
++i; sTmp.clear();
|
||||||
for (; i < sizeString.size(); ++i)
|
for (; i < sizeString.size(); ++i)
|
||||||
{
|
{
|
||||||
sTmp += sizeString[i];
|
sTmp += sizeString[i];
|
||||||
|
|
|
@ -453,7 +453,7 @@ public:
|
||||||
string shortExc, longExc, subject;
|
string shortExc, longExc, subject;
|
||||||
string addr, ext;
|
string addr, ext;
|
||||||
ULONG_PTR skipNFirst = 0;
|
ULONG_PTR skipNFirst = 0;
|
||||||
_Reason = "";
|
_Reason.clear();
|
||||||
|
|
||||||
if (m_pexp == NULL)
|
if (m_pexp == NULL)
|
||||||
{
|
{
|
||||||
|
@ -491,25 +491,25 @@ public:
|
||||||
case EXCEPTION_STACK_OVERFLOW : shortExc="Stack Overflow"; longExc="Stack overflow. Can occur during errant recursion, or when a function creates a particularly large array on the stack"; break;
|
case EXCEPTION_STACK_OVERFLOW : shortExc="Stack Overflow"; longExc="Stack overflow. Can occur during errant recursion, or when a function creates a particularly large array on the stack"; break;
|
||||||
case EXCEPTION_INVALID_DISPOSITION : shortExc="Invalid Disposition"; longExc="Whatever number the exception filter returned, it wasn't a value the OS knows about"; break;
|
case EXCEPTION_INVALID_DISPOSITION : shortExc="Invalid Disposition"; longExc="Whatever number the exception filter returned, it wasn't a value the OS knows about"; break;
|
||||||
case EXCEPTION_GUARD_PAGE : shortExc="Guard Page"; longExc="Memory Allocated as PAGE_GUARD by VirtualAlloc() has been accessed"; break;
|
case EXCEPTION_GUARD_PAGE : shortExc="Guard Page"; longExc="Memory Allocated as PAGE_GUARD by VirtualAlloc() has been accessed"; break;
|
||||||
case EXCEPTION_INVALID_HANDLE : shortExc="Invalid Handle"; longExc=""; break;
|
case EXCEPTION_INVALID_HANDLE : shortExc="Invalid Handle"; longExc.clear(); break;
|
||||||
case CONTROL_C_EXIT : shortExc="Control-C"; longExc="Lets the debugger know the user hit Ctrl-C. Seemingly for console apps only"; break;
|
case CONTROL_C_EXIT : shortExc="Control-C"; longExc="Lets the debugger know the user hit Ctrl-C. Seemingly for console apps only"; break;
|
||||||
case STATUS_NO_MEMORY : shortExc="No Memory"; longExc="Called by HeapAlloc() if you specify HEAP_GENERATE_EXCEPTIONS and there is no memory or heap corruption";
|
case STATUS_NO_MEMORY : shortExc="No Memory"; longExc="Called by HeapAlloc() if you specify HEAP_GENERATE_EXCEPTIONS and there is no memory or heap corruption";
|
||||||
ext = ", unable to allocate ";
|
ext = ", unable to allocate ";
|
||||||
ext += toString ("%d bytes", m_pexp->ExceptionRecord->ExceptionInformation [0]);
|
ext += toString ("%d bytes", m_pexp->ExceptionRecord->ExceptionInformation [0]);
|
||||||
break;
|
break;
|
||||||
case STATUS_WAIT_0 : shortExc="Wait 0"; longExc=""; break;
|
case STATUS_WAIT_0 : shortExc="Wait 0"; longExc.clear(); break;
|
||||||
case STATUS_ABANDONED_WAIT_0 : shortExc="Abandoned Wait 0"; longExc=""; break;
|
case STATUS_ABANDONED_WAIT_0 : shortExc="Abandoned Wait 0"; longExc.clear(); break;
|
||||||
case STATUS_USER_APC : shortExc="User APC"; longExc="A user APC was delivered to the current thread before the specified Timeout interval expired"; break;
|
case STATUS_USER_APC : shortExc="User APC"; longExc="A user APC was delivered to the current thread before the specified Timeout interval expired"; break;
|
||||||
case STATUS_TIMEOUT : shortExc="Timeout"; longExc=""; break;
|
case STATUS_TIMEOUT : shortExc="Timeout"; longExc.clear(); break;
|
||||||
case STATUS_PENDING : shortExc="Pending"; longExc=""; break;
|
case STATUS_PENDING : shortExc="Pending"; longExc.clear(); break;
|
||||||
case STATUS_SEGMENT_NOTIFICATION : shortExc="Segment Notification"; longExc=""; break;
|
case STATUS_SEGMENT_NOTIFICATION : shortExc="Segment Notification"; longExc.clear(); break;
|
||||||
case STATUS_FLOAT_MULTIPLE_FAULTS : shortExc="Float Multiple Faults"; longExc=""; break;
|
case STATUS_FLOAT_MULTIPLE_FAULTS : shortExc="Float Multiple Faults"; longExc.clear(); break;
|
||||||
case STATUS_FLOAT_MULTIPLE_TRAPS : shortExc="Float Multiple Traps"; longExc=""; break;
|
case STATUS_FLOAT_MULTIPLE_TRAPS : shortExc="Float Multiple Traps"; longExc.clear(); break;
|
||||||
#ifdef NL_COMP_VC6
|
#ifdef NL_COMP_VC6
|
||||||
case STATUS_ILLEGAL_VLM_REFERENCE : shortExc="Illegal VLM Reference"; longExc=""; break;
|
case STATUS_ILLEGAL_VLM_REFERENCE : shortExc="Illegal VLM Reference"; longExc.clear(); break;
|
||||||
#endif
|
#endif
|
||||||
case 0xE06D7363 : shortExc="Microsoft C++ Exception"; longExc="Microsoft C++ Exception"; break; // cpp exception
|
case 0xE06D7363 : shortExc="Microsoft C++ Exception"; longExc="Microsoft C++ Exception"; break; // cpp exception
|
||||||
case 0xACE0ACE : shortExc=""; longExc="";
|
case 0xACE0ACE : shortExc.clear(); longExc.clear();
|
||||||
if (m_pexp->ExceptionRecord->NumberParameters == 1)
|
if (m_pexp->ExceptionRecord->NumberParameters == 1)
|
||||||
skipNFirst = m_pexp->ExceptionRecord->ExceptionInformation [0];
|
skipNFirst = m_pexp->ExceptionRecord->ExceptionInformation [0];
|
||||||
break; // just want the stack
|
break; // just want the stack
|
||||||
|
@ -824,7 +824,7 @@ public:
|
||||||
// replace param with the value of the stack for this param
|
// replace param with the value of the stack for this param
|
||||||
|
|
||||||
string parse = str;
|
string parse = str;
|
||||||
str = "";
|
str.clear();
|
||||||
uint pos2 = 0;
|
uint pos2 = 0;
|
||||||
sint stop = 0;
|
sint stop = 0;
|
||||||
|
|
||||||
|
@ -943,7 +943,7 @@ public:
|
||||||
str += tmp;
|
str += tmp;
|
||||||
}
|
}
|
||||||
str += parse[i];
|
str += parse[i];
|
||||||
type = "";
|
type.clear();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -255,7 +255,7 @@ void CLibrary::freeLibrary()
|
||||||
_PureNelLibrary = NULL;
|
_PureNelLibrary = NULL;
|
||||||
_LibHandle = NULL;
|
_LibHandle = NULL;
|
||||||
_Ownership = false;
|
_Ownership = false;
|
||||||
_LibFileName = "";
|
_LibFileName.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -587,10 +587,10 @@ void CEntityIdTranslator::getEntityIdInfo (const CEntityId &eid, ucstring &entit
|
||||||
if (it == RegisteredEntities.end ())
|
if (it == RegisteredEntities.end ())
|
||||||
{
|
{
|
||||||
nlwarning ("EIT: %s is not registered in CEntityIdTranslator", reid.toString().c_str());
|
nlwarning ("EIT: %s is not registered in CEntityIdTranslator", reid.toString().c_str());
|
||||||
entityName = "";
|
entityName.clear();
|
||||||
entitySlot = -1;
|
entitySlot = -1;
|
||||||
uid = std::numeric_limits<uint32>::max();
|
uid = std::numeric_limits<uint32>::max();
|
||||||
userName = "";
|
userName.clear();
|
||||||
online = false;
|
online = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -550,7 +550,6 @@ uint CIFile::getDbgStreamSize() const
|
||||||
COFile::COFile() : IStream(false)
|
COFile::COFile() : IStream(false)
|
||||||
{
|
{
|
||||||
_F=NULL;
|
_F=NULL;
|
||||||
_FileName = "";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ======================================================================================================
|
// ======================================================================================================
|
||||||
|
|
|
@ -67,7 +67,6 @@ CIXml::CIXml () : IStream (true /* Input mode */)
|
||||||
_CurrentNode = NULL;
|
_CurrentNode = NULL;
|
||||||
_PushBegin = false;
|
_PushBegin = false;
|
||||||
_AttribPresent = false;
|
_AttribPresent = false;
|
||||||
_ErrorString = "";
|
|
||||||
_TryBinaryMode = false;
|
_TryBinaryMode = false;
|
||||||
_BinaryStream = NULL;
|
_BinaryStream = NULL;
|
||||||
}
|
}
|
||||||
|
@ -82,7 +81,6 @@ CIXml::CIXml (bool tryBinaryMode) : IStream (true /* Input mode */)
|
||||||
_CurrentNode = NULL;
|
_CurrentNode = NULL;
|
||||||
_PushBegin = false;
|
_PushBegin = false;
|
||||||
_AttribPresent = false;
|
_AttribPresent = false;
|
||||||
_ErrorString = "";
|
|
||||||
_TryBinaryMode = tryBinaryMode;
|
_TryBinaryMode = tryBinaryMode;
|
||||||
_BinaryStream = NULL;
|
_BinaryStream = NULL;
|
||||||
}
|
}
|
||||||
|
@ -116,7 +114,7 @@ void CIXml::release ()
|
||||||
_CurrentNode = NULL;
|
_CurrentNode = NULL;
|
||||||
_PushBegin = false;
|
_PushBegin = false;
|
||||||
_AttribPresent = false;
|
_AttribPresent = false;
|
||||||
_ErrorString = "";
|
_ErrorString.clear();
|
||||||
|
|
||||||
resetPtrTable();
|
resetPtrTable();
|
||||||
}
|
}
|
||||||
|
@ -195,7 +193,7 @@ bool CIXml::init (IStream &stream)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set error handler
|
// Set error handler
|
||||||
_ErrorString = "";
|
_ErrorString.clear();
|
||||||
xmlSetGenericErrorFunc (this, xmlGenericErrorFuncRead);
|
xmlSetGenericErrorFunc (this, xmlGenericErrorFuncRead);
|
||||||
|
|
||||||
// Ask to get debug info
|
// Ask to get debug info
|
||||||
|
@ -319,7 +317,7 @@ void CIXml::serialSeparatedBufferIn ( string &value, bool checkSeparator )
|
||||||
// If no more node, empty string
|
// If no more node, empty string
|
||||||
if (_CurrentNode == NULL)
|
if (_CurrentNode == NULL)
|
||||||
{
|
{
|
||||||
value = "";
|
value.clear();
|
||||||
_ContentStringIndex = 0;
|
_ContentStringIndex = 0;
|
||||||
_ContentString.erase ();
|
_ContentString.erase ();
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -377,11 +377,11 @@ void CLog::displayRawString (const char *str)
|
||||||
{
|
{
|
||||||
localargs.Date = 0;
|
localargs.Date = 0;
|
||||||
localargs.LogType = CLog::LOG_NO;
|
localargs.LogType = CLog::LOG_NO;
|
||||||
localargs.ProcessName = "";
|
localargs.ProcessName.clear();
|
||||||
localargs.ThreadId = 0;
|
localargs.ThreadId = 0;
|
||||||
localargs.FileName = NULL;
|
localargs.FileName = NULL;
|
||||||
localargs.Line = -1;
|
localargs.Line = -1;
|
||||||
localargs.CallstackAndLog = "";
|
localargs.CallstackAndLog.clear();
|
||||||
|
|
||||||
TempString = str;
|
TempString = str;
|
||||||
}
|
}
|
||||||
|
@ -397,11 +397,11 @@ void CLog::displayRawString (const char *str)
|
||||||
{
|
{
|
||||||
localargs.Date = 0;
|
localargs.Date = 0;
|
||||||
localargs.LogType = CLog::LOG_NO;
|
localargs.LogType = CLog::LOG_NO;
|
||||||
localargs.ProcessName = "";
|
localargs.ProcessName.clear();
|
||||||
localargs.ThreadId = 0;
|
localargs.ThreadId = 0;
|
||||||
localargs.FileName = NULL;
|
localargs.FileName = NULL;
|
||||||
localargs.Line = -1;
|
localargs.Line = -1;
|
||||||
localargs.CallstackAndLog = "";
|
localargs.CallstackAndLog.clear();
|
||||||
|
|
||||||
disp = str;
|
disp = str;
|
||||||
args = &localargs;
|
args = &localargs;
|
||||||
|
|
|
@ -85,7 +85,7 @@ static string getFuncInfo (DWORD_TYPE funcAddr, DWORD_TYPE stackAddr)
|
||||||
// replace param with the value of the stack for this param
|
// replace param with the value of the stack for this param
|
||||||
|
|
||||||
string parse = str;
|
string parse = str;
|
||||||
str = "";
|
str.clear();
|
||||||
uint pos = 0;
|
uint pos = 0;
|
||||||
sint stop = 0;
|
sint stop = 0;
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,7 @@ COXml::COXml () : IStream (false /* Output mode */)
|
||||||
_CurrentNode = NULL;
|
_CurrentNode = NULL;
|
||||||
|
|
||||||
// Content string
|
// Content string
|
||||||
_ContentString = "";
|
_ContentString.clear();
|
||||||
|
|
||||||
// Push begin
|
// Push begin
|
||||||
_PushBegin = false;
|
_PushBegin = false;
|
||||||
|
@ -160,7 +160,7 @@ bool COXml::init (IStream *stream, const char *version)
|
||||||
if (!stream->isReading())
|
if (!stream->isReading())
|
||||||
{
|
{
|
||||||
// Set error handler
|
// Set error handler
|
||||||
_ErrorString = "";
|
_ErrorString.clear();
|
||||||
xmlSetGenericErrorFunc (this, xmlGenericErrorFuncWrite);
|
xmlSetGenericErrorFunc (this, xmlGenericErrorFuncWrite);
|
||||||
|
|
||||||
// Set XML mode
|
// Set XML mode
|
||||||
|
@ -179,7 +179,7 @@ bool COXml::init (IStream *stream, const char *version)
|
||||||
_CurrentNode = NULL;
|
_CurrentNode = NULL;
|
||||||
|
|
||||||
// Content string
|
// Content string
|
||||||
_ContentString = "";
|
_ContentString.clear();
|
||||||
|
|
||||||
// Push begin
|
// Push begin
|
||||||
_PushBegin = false;
|
_PushBegin = false;
|
||||||
|
|
|
@ -33,8 +33,7 @@ CStringMapper CStringMapper::_GlobalMapper;
|
||||||
// ****************************************************************************
|
// ****************************************************************************
|
||||||
CStringMapper::CStringMapper()
|
CStringMapper::CStringMapper()
|
||||||
{
|
{
|
||||||
_EmptyId = new string;
|
_EmptyId = new string();
|
||||||
*_EmptyId = "";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ****************************************************************************
|
// ****************************************************************************
|
||||||
|
|
|
@ -1525,7 +1525,7 @@ NLMISC_CATEGORISED_DYNVARIABLE(nel, string, AvailableHDSpace, "Hard drive space
|
||||||
if (get)
|
if (get)
|
||||||
{
|
{
|
||||||
*pointer = (CSystemInfo::availableHDSpace(location));
|
*pointer = (CSystemInfo::availableHDSpace(location));
|
||||||
location = "";
|
location.clear();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -37,7 +37,7 @@ CTaskManager::CTaskManager() : _RunningTask (""), _TaskQueue (""), _DoneTaskQueu
|
||||||
_IsTaskRunning = false;
|
_IsTaskRunning = false;
|
||||||
_ThreadRunning = true;
|
_ThreadRunning = true;
|
||||||
CSynchronized<string>::CAccessor currentTask(&_RunningTask);
|
CSynchronized<string>::CAccessor currentTask(&_RunningTask);
|
||||||
currentTask.value () = "";
|
currentTask.value ().clear();
|
||||||
_Thread = IThread::create(this);
|
_Thread = IThread::create(this);
|
||||||
_Thread->start();
|
_Thread->start();
|
||||||
_ChangePriorityCallback = NULL;
|
_ChangePriorityCallback = NULL;
|
||||||
|
@ -111,7 +111,7 @@ void CTaskManager::run(void)
|
||||||
CSynchronized<string>::CAccessor currentTask(&_RunningTask);
|
CSynchronized<string>::CAccessor currentTask(&_RunningTask);
|
||||||
CSynchronized<deque<string> >::CAccessor doneTask(&_DoneTaskQueue);
|
CSynchronized<deque<string> >::CAccessor doneTask(&_DoneTaskQueue);
|
||||||
doneTask.value().push_front (currentTask.value ());
|
doneTask.value().push_front (currentTask.value ());
|
||||||
currentTask.value () = "";
|
currentTask.value ().clear();
|
||||||
if (doneTask.value().size () > NLMISC_DONE_TASK_SIZE)
|
if (doneTask.value().size () > NLMISC_DONE_TASK_SIZE)
|
||||||
doneTask.value().resize (NLMISC_DONE_TASK_SIZE);
|
doneTask.value().resize (NLMISC_DONE_TASK_SIZE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -156,7 +156,7 @@ LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
string str;
|
string str;
|
||||||
while (*pos2 != '\0')
|
while (*pos2 != '\0')
|
||||||
{
|
{
|
||||||
str = "";
|
str.clear();
|
||||||
|
|
||||||
// get the string
|
// get the string
|
||||||
while (*pos2 != '\0' && *pos2 != '\n')
|
while (*pos2 != '\0' && *pos2 != '\n')
|
||||||
|
|
|
@ -381,7 +381,7 @@ void serviceGetView (uint32 rid, const string &rawvarpath, TAdminViewResult &ans
|
||||||
if (CCommandRegistry::getInstance().isNamedCommandHandler(varpath.Destination[0].first))
|
if (CCommandRegistry::getInstance().isNamedCommandHandler(varpath.Destination[0].first))
|
||||||
{
|
{
|
||||||
varpath.Destination[0].first += "."+varpath.Destination[0].second;
|
varpath.Destination[0].first += "."+varpath.Destination[0].second;
|
||||||
varpath.Destination[0].second = "";
|
varpath.Destination[0].second.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (varpath.isFinal())
|
if (varpath.isFinal())
|
||||||
|
|
|
@ -84,7 +84,7 @@ CBufSock::~CBufSock()
|
||||||
delete Sock; // the socket disconnects automatically if needed
|
delete Sock; // the socket disconnects automatically if needed
|
||||||
|
|
||||||
// destroy the structur to be sure that other people will not access to this anymore
|
// destroy the structur to be sure that other people will not access to this anymore
|
||||||
AuthorizedCallback = "";
|
AuthorizedCallback.clear();
|
||||||
Sock = NULL;
|
Sock = NULL;
|
||||||
_KnowConnected = false;
|
_KnowConnected = false;
|
||||||
_LastFlushTime = 0;
|
_LastFlushTime = 0;
|
||||||
|
|
|
@ -127,7 +127,7 @@ string CLoginClient::authenticate(const string &loginServiceAddr, const ucstring
|
||||||
|
|
||||||
string CLoginClient::authenticateBegin(const string &loginServiceAddr, const ucstring &login, const string &cpassword, const string &application)
|
string CLoginClient::authenticateBegin(const string &loginServiceAddr, const ucstring &login, const string &cpassword, const string &application)
|
||||||
{
|
{
|
||||||
VerifyLoginPasswordReason = "";
|
VerifyLoginPasswordReason.clear();
|
||||||
VerifyLoginPassword = false;
|
VerifyLoginPassword = false;
|
||||||
|
|
||||||
// S01: connect to the LS
|
// S01: connect to the LS
|
||||||
|
@ -355,7 +355,7 @@ string CLoginClient::selectShardBegin(sint32 shardId)
|
||||||
{
|
{
|
||||||
nlassert(_LSCallbackClient != 0 && _LSCallbackClient->connected());
|
nlassert(_LSCallbackClient != 0 && _LSCallbackClient->connected());
|
||||||
|
|
||||||
ShardChooseShardReason = "";
|
ShardChooseShardReason.clear();
|
||||||
ShardChooseShard = false;
|
ShardChooseShard = false;
|
||||||
|
|
||||||
if (ShardList.empty())
|
if (ShardList.empty())
|
||||||
|
|
|
@ -157,7 +157,7 @@ void cbWSChooseShard (CMessage &msgin, const std::string &/* serviceName */, TSe
|
||||||
// add it to the awaiting client
|
// add it to the awaiting client
|
||||||
nlinfo ("LS: New cookie %s (name '%s' priv '%s' extended '%s' instance %u slot %u) inserted in the pending user list (awaiting new client)", cookie.toString().c_str(), userName.c_str(), userPriv.c_str(), userExtended.c_str(), instanceId, charSlot);
|
nlinfo ("LS: New cookie %s (name '%s' priv '%s' extended '%s' instance %u slot %u) inserted in the pending user list (awaiting new client)", cookie.toString().c_str(), userName.c_str(), userPriv.c_str(), userExtended.c_str(), instanceId, charSlot);
|
||||||
PendingUsers.push_back (CPendingUser (cookie, userName, userPriv, userExtended, instanceId, charSlot));
|
PendingUsers.push_back (CPendingUser (cookie, userName, userPriv, userExtended, instanceId, charSlot));
|
||||||
reason = "";
|
reason.clear();
|
||||||
|
|
||||||
// callback if needed
|
// callback if needed
|
||||||
if (NewCookieCallback != NULL)
|
if (NewCookieCallback != NULL)
|
||||||
|
@ -233,7 +233,7 @@ void cbShardValidation (CMessage &msgin, TSockId from, CCallbackNetBase &netbase
|
||||||
// if the cookie is not valid and we accept them, clear the error
|
// if the cookie is not valid and we accept them, clear the error
|
||||||
if(AcceptInvalidCookie && !reason.empty())
|
if(AcceptInvalidCookie && !reason.empty())
|
||||||
{
|
{
|
||||||
reason = "";
|
reason.clear();
|
||||||
cookie.set (rand(), rand(), rand());
|
cookie.set (rand(), rand(), rand());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -425,7 +425,8 @@ void CLoginServer::addNewCookieCallback(TNewCookieCallback newCookieCb)
|
||||||
|
|
||||||
string CLoginServer::isValidCookie (const CLoginCookie &lc, string &userName, string &userPriv, string &userExtended, uint32 &instanceId, uint32 &charSlot)
|
string CLoginServer::isValidCookie (const CLoginCookie &lc, string &userName, string &userPriv, string &userExtended, uint32 &instanceId, uint32 &charSlot)
|
||||||
{
|
{
|
||||||
userName = userPriv = "";
|
userName.clear();
|
||||||
|
userPriv.clear();
|
||||||
|
|
||||||
if (!AcceptInvalidCookie && !lc.isValid())
|
if (!AcceptInvalidCookie && !lc.isValid())
|
||||||
return "The cookie is invalid";
|
return "The cookie is invalid";
|
||||||
|
|
|
@ -159,7 +159,7 @@ void CMessageRecorder::recordNext( sint64 updatecounter, TNetworkEvent event, TS
|
||||||
void CMessageRecorder::stopRecord()
|
void CMessageRecorder::stopRecord()
|
||||||
{
|
{
|
||||||
_File.close();
|
_File.close();
|
||||||
_Filename = "";
|
_Filename.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -395,7 +395,7 @@ TNetworkEvent CMessageRecorder::replayConnectionAttempt( const CInetAddress& add
|
||||||
void CMessageRecorder::stopReplay()
|
void CMessageRecorder::stopReplay()
|
||||||
{
|
{
|
||||||
_File.close();
|
_File.close();
|
||||||
_Filename = "";
|
_Filename.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1453,7 +1453,7 @@ sint IService::main (const char *serviceShortName, const char *serviceLongName,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dispName.empty())
|
if (dispName.empty())
|
||||||
str = "";
|
str.clear();
|
||||||
else
|
else
|
||||||
str = dispName + ": ";
|
str = dispName + ": ";
|
||||||
|
|
||||||
|
|
|
@ -167,7 +167,7 @@ void CVarPath::decode ()
|
||||||
if (val == "=")
|
if (val == "=")
|
||||||
{
|
{
|
||||||
srv += val + RawVarPath.substr (TokenPos);
|
srv += val + RawVarPath.substr (TokenPos);
|
||||||
var = "";
|
var.clear();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
var = RawVarPath.substr (TokenPos);
|
var = RawVarPath.substr (TokenPos);
|
||||||
|
|
|
@ -631,7 +631,7 @@ bool computeRetriever(CCollisionMeshBuild &cmb, CLocalRetriever &lr, CVector &tr
|
||||||
{
|
{
|
||||||
nlwarning("Edge issues reported !!");
|
nlwarning("Edge issues reported !!");
|
||||||
uint i;
|
uint i;
|
||||||
error = "";
|
error.clear();
|
||||||
for (i=0; i<errors.size(); ++i)
|
for (i=0; i<errors.size(); ++i)
|
||||||
error += errors[i]+"\n";
|
error += errors[i]+"\n";
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -1770,7 +1770,7 @@ void CAudioMixerUser::update()
|
||||||
str += tmp;
|
str += tmp;
|
||||||
}
|
}
|
||||||
nldebug((string("Status1: ")+str).c_str());
|
nldebug((string("Status1: ")+str).c_str());
|
||||||
str = "";
|
str.clear();
|
||||||
for (i=_NbTracks/2; i<_NbTracks; ++i)
|
for (i=_NbTracks/2; i<_NbTracks; ++i)
|
||||||
{
|
{
|
||||||
sprintf(tmp, "[%2u]%8p ", i, _Tracks[i]->getSource());
|
sprintf(tmp, "[%2u]%8p ", i, _Tracks[i]->getSource());
|
||||||
|
|
|
@ -160,7 +160,7 @@ void CContextSound::init()
|
||||||
uint contextArgIndex[SoundContextNbArgs];
|
uint contextArgIndex[SoundContextNbArgs];
|
||||||
bool useRandom = false;
|
bool useRandom = false;
|
||||||
bool parseArg = false;
|
bool parseArg = false;
|
||||||
_BaseName = "";
|
_BaseName.clear();
|
||||||
|
|
||||||
//nldebug("Init the context sound %s", _PatternName.c_str());
|
//nldebug("Init the context sound %s", _PatternName.c_str());
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ void CContextSound::init()
|
||||||
nlassertex(nbJoker < SoundContextNbArgs, ("Error will trying to play ContextSound '%s'", _Name.toString().c_str()/*CStringMapper::unmap(_Name).c_str()*/));
|
nlassertex(nbJoker < SoundContextNbArgs, ("Error will trying to play ContextSound '%s'", _Name.toString().c_str()/*CStringMapper::unmap(_Name).c_str()*/));
|
||||||
fromString(index, contextArgIndex[nbJoker++]);
|
fromString(index, contextArgIndex[nbJoker++]);
|
||||||
parseArg = false;
|
parseArg = false;
|
||||||
index = "";
|
index.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (*first == 'r')
|
else if (*first == 'r')
|
||||||
|
|
|
@ -271,7 +271,7 @@ int main (int argc, char **argv)
|
||||||
bool _256=(type==CTileBank::_256x256);
|
bool _256=(type==CTileBank::_256x256);
|
||||||
|
|
||||||
// Diffuse bitmap filled ?
|
// Diffuse bitmap filled ?
|
||||||
if (pTile->getRelativeFileName (CTile::diffuse)!="")
|
if (!pTile->getRelativeFileName (CTile::diffuse).empty())
|
||||||
{
|
{
|
||||||
// File exist ?
|
// File exist ?
|
||||||
string tileFilename = bank.getAbsPath()+CPath::standardizePath(pTile->getRelativeFileName (CTile::diffuse), false);
|
string tileFilename = bank.getAbsPath()+CPath::standardizePath(pTile->getRelativeFileName (CTile::diffuse), false);
|
||||||
|
@ -302,7 +302,7 @@ int main (int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Additive bitmap filled ?
|
// Additive bitmap filled ?
|
||||||
if (pTile->getRelativeFileName (CTile::additive)!="")
|
if (!pTile->getRelativeFileName (CTile::additive).empty())
|
||||||
{
|
{
|
||||||
// File exist ?
|
// File exist ?
|
||||||
string tileFilename = bank.getAbsPath()+CPath::standardizePath(pTile->getRelativeFileName (CTile::additive), false);
|
string tileFilename = bank.getAbsPath()+CPath::standardizePath(pTile->getRelativeFileName (CTile::additive), false);
|
||||||
|
@ -333,7 +333,7 @@ int main (int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Alpha bitmap filled ?
|
// Alpha bitmap filled ?
|
||||||
if (pTile->getRelativeFileName (CTile::alpha)!="")
|
if (!pTile->getRelativeFileName (CTile::alpha).empty())
|
||||||
{
|
{
|
||||||
// File exist ?
|
// File exist ?
|
||||||
string tileFilename = bank.getAbsPath()+CPath::standardizePath(pTile->getRelativeFileName (CTile::alpha), false);
|
string tileFilename = bank.getAbsPath()+CPath::standardizePath(pTile->getRelativeFileName (CTile::alpha), false);
|
||||||
|
|
|
@ -175,7 +175,6 @@ void LoadSceneScript (const char *ScriptName, CScene* pScene, vector<SDispCS> &D
|
||||||
if (ITemp != NULL)
|
if (ITemp != NULL)
|
||||||
{
|
{
|
||||||
SDispCS dcsTemp;
|
SDispCS dcsTemp;
|
||||||
dcsTemp.Name = "";
|
|
||||||
for (sint32 i = 0; i < (1+nNbPlus); ++i)
|
for (sint32 i = 0; i < (1+nNbPlus); ++i)
|
||||||
dcsTemp.Name += " ";
|
dcsTemp.Name += " ";
|
||||||
dcsTemp.Name += nameIG;
|
dcsTemp.Name += nameIG;
|
||||||
|
|
|
@ -227,7 +227,7 @@ int main(int argc, char* argv[])
|
||||||
CGlobalRetriever *globalRetriever= NULL;
|
CGlobalRetriever *globalRetriever= NULL;
|
||||||
uint32 grFileDate= 0;
|
uint32 grFileDate= 0;
|
||||||
uint32 rbankFileDate= 0;
|
uint32 rbankFileDate= 0;
|
||||||
if( grFile!="" && rbankFile!="" )
|
if( !grFile.empty() && !rbankFile.empty())
|
||||||
{
|
{
|
||||||
CIFile fin;
|
CIFile fin;
|
||||||
// serial the retrieverBank. Exception if not found.
|
// serial the retrieverBank. Exception if not found.
|
||||||
|
|
|
@ -117,7 +117,7 @@ void CAnimationSetDlg::OnAddAnimation ()
|
||||||
c[path.GetLength()+1]=0;
|
c[path.GetLength()+1]=0;
|
||||||
|
|
||||||
// Path is empty
|
// Path is empty
|
||||||
path = "";
|
path.Empty();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -139,9 +139,9 @@ void CCreateFileDlg::OnOK()
|
||||||
|
|
||||||
void CCreateFileDlg::OnCancel()
|
void CCreateFileDlg::OnCancel()
|
||||||
{
|
{
|
||||||
_Filename = "";
|
_Filename.clear();
|
||||||
_Path = "";
|
_Path.clear();
|
||||||
_FullPath = "";
|
_FullPath.clear();
|
||||||
CDialog::OnCancel();
|
CDialog::OnCancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -652,7 +652,7 @@ void CMainFrame::OnFileOpen()
|
||||||
c[path.GetLength()+1]=0;
|
c[path.GetLength()+1]=0;
|
||||||
|
|
||||||
// Path is empty
|
// Path is empty
|
||||||
path = "";
|
path.Empty();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -745,7 +745,7 @@ void CMainFrame::OnFileSaveconfig()
|
||||||
CFileDialog fileDlg( FALSE, _T(".ovcgf"), _T("*.ovcgf"), OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT, szFilter);
|
CFileDialog fileDlg( FALSE, _T(".ovcgf"), _T("*.ovcgf"), OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT, szFilter);
|
||||||
if (fileDlg.DoModal()==IDOK)
|
if (fileDlg.DoModal()==IDOK)
|
||||||
{
|
{
|
||||||
ObjView->ParticleWorkspaceFilename = "";
|
ObjView->ParticleWorkspaceFilename.clear();
|
||||||
CParticleWorkspace *pw = ObjView->getParticleDialog()->getParticleWorkspace();
|
CParticleWorkspace *pw = ObjView->getParticleDialog()->getParticleWorkspace();
|
||||||
if (pw && pw->getNumNode() != 0)
|
if (pw && pw->getNumNode() != 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -166,7 +166,7 @@ void CMeshDlg::updateForMorph()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_ShapeName = "";
|
m_ShapeName.Empty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
updateMeshErrorString();
|
updateMeshErrorString();
|
||||||
|
|
|
@ -1623,7 +1623,7 @@ void CObjectViewer::resetSlots (uint instance)
|
||||||
|
|
||||||
// Set no animation in slot UI
|
// Set no animation in slot UI
|
||||||
for (uint j=0; j<NL3D::CChannelMixer::NumAnimationSlot; j++)
|
for (uint j=0; j<NL3D::CChannelMixer::NumAnimationSlot; j++)
|
||||||
_ListInstance[instance]->Saved.SlotInfo[j].Animation = "";
|
_ListInstance[instance]->Saved.SlotInfo[j].Animation.clear();
|
||||||
|
|
||||||
// Reset the animation list
|
// Reset the animation list
|
||||||
_ListInstance[instance]->Saved.AnimationFileName.clear ();
|
_ListInstance[instance]->Saved.AnimationFileName.clear ();
|
||||||
|
@ -1743,7 +1743,7 @@ void CObjectViewer::serial (NLMISC::IStream& f)
|
||||||
{
|
{
|
||||||
if (ver <=3)
|
if (ver <=3)
|
||||||
{
|
{
|
||||||
ParticleWorkspaceFilename = "";
|
ParticleWorkspaceFilename.clear();
|
||||||
}
|
}
|
||||||
// First instance
|
// First instance
|
||||||
uint firstInstance = (uint)_ListInstance.size();
|
uint firstInstance = (uint)_ListInstance.size();
|
||||||
|
@ -1786,9 +1786,9 @@ void CObjectViewer::serial (NLMISC::IStream& f)
|
||||||
{
|
{
|
||||||
// Add the mesh
|
// Add the mesh
|
||||||
if (readed[i].SkeletonId != 0xffffffff)
|
if (readed[i].SkeletonId != 0xffffffff)
|
||||||
instance = addMesh (serialShape.getShapePointer(), readed[i].ShapeFilename.c_str(), readed[i].SkeletonId + firstInstance, (readed[i].BindBoneName=="")?NULL:readed[i].BindBoneName.c_str());
|
instance = addMesh (serialShape.getShapePointer(), readed[i].ShapeFilename.c_str(), readed[i].SkeletonId + firstInstance, (readed[i].BindBoneName.empty())?NULL:readed[i].BindBoneName.c_str());
|
||||||
else
|
else
|
||||||
instance = addMesh (serialShape.getShapePointer(), readed[i].ShapeFilename.c_str(), 0xffffffff, (readed[i].BindBoneName=="")?NULL:readed[i].BindBoneName.c_str());
|
instance = addMesh (serialShape.getShapePointer(), readed[i].ShapeFilename.c_str(), 0xffffffff, (readed[i].BindBoneName.empty())?NULL:readed[i].BindBoneName.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2151,7 +2151,7 @@ uint CObjectViewer::addMesh (NL3D::IShape* pMeshShape, const std::string &meshNa
|
||||||
{
|
{
|
||||||
// Bind bone name
|
// Bind bone name
|
||||||
uint bindBone = 0xffffffff;
|
uint bindBone = 0xffffffff;
|
||||||
std::string boneName = "";
|
std::string boneName;
|
||||||
|
|
||||||
// Name is passed, look for bone
|
// Name is passed, look for bone
|
||||||
if (bindSkelName)
|
if (bindSkelName)
|
||||||
|
@ -2400,7 +2400,7 @@ void CObjectViewer::setSingleAnimation (NL3D::CAnimation* pAnim, const std::stri
|
||||||
|
|
||||||
// Set the animation in the first slot
|
// Set the animation in the first slot
|
||||||
_ListInstance[instance]->Saved.SlotInfo[0].Animation = name;
|
_ListInstance[instance]->Saved.SlotInfo[0].Animation = name;
|
||||||
_ListInstance[instance]->Saved.SlotInfo[0].Skeleton = "";
|
_ListInstance[instance]->Saved.SlotInfo[0].Skeleton.clear();
|
||||||
_ListInstance[instance]->Saved.SlotInfo[0].Offset = 0;
|
_ListInstance[instance]->Saved.SlotInfo[0].Offset = 0;
|
||||||
_ListInstance[instance]->Saved.SlotInfo[0].StartTime = (int)(pAnim->getBeginTime()*_AnimationDlg->Speed);
|
_ListInstance[instance]->Saved.SlotInfo[0].StartTime = (int)(pAnim->getBeginTime()*_AnimationDlg->Speed);
|
||||||
_ListInstance[instance]->Saved.SlotInfo[0].EndTime = (int)(pAnim->getEndTime()*_AnimationDlg->Speed);
|
_ListInstance[instance]->Saved.SlotInfo[0].EndTime = (int)(pAnim->getEndTime()*_AnimationDlg->Speed);
|
||||||
|
@ -2978,7 +2978,7 @@ void CObjectViewer::loadVegetableLandscapeCfg(NLMISC::CConfigFile &cf)
|
||||||
}
|
}
|
||||||
catch (const EUnknownVar &)
|
catch (const EUnknownVar &)
|
||||||
{
|
{
|
||||||
_VegetableTexture= "";
|
_VegetableTexture.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// vegetable ambient
|
// vegetable ambient
|
||||||
|
@ -3088,7 +3088,7 @@ bool CObjectViewer::createVegetableLandscape()
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if(_VegetableLandscapeTileBank=="")
|
if(_VegetableLandscapeTileBank.empty())
|
||||||
{
|
{
|
||||||
throw Exception("Landscape CFG not fully defined");
|
throw Exception("Landscape CFG not fully defined");
|
||||||
}
|
}
|
||||||
|
|
|
@ -271,9 +271,9 @@ void CParticleSystemEdit::updatePrecomputedBBoxParams()
|
||||||
|
|
||||||
if (!ew)
|
if (!ew)
|
||||||
{
|
{
|
||||||
m_BBoxX = "";
|
m_BBoxX.Empty();
|
||||||
m_BBoxY = "";
|
m_BBoxY.Empty();
|
||||||
m_BBoxZ = "";
|
m_BBoxZ.Empty();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -100,8 +100,8 @@ void CParticleWorkspace::CNode::stickPSToSkeleton(NL3D::CSkeletonModel *skel,
|
||||||
void CParticleWorkspace::CNode::unstickPSFromSkeleton()
|
void CParticleWorkspace::CNode::unstickPSFromSkeleton()
|
||||||
{
|
{
|
||||||
nlassert(_WS);
|
nlassert(_WS);
|
||||||
_ParentSkelName = "";
|
_ParentSkelName.clear();
|
||||||
_ParentBoneName = "";
|
_ParentBoneName.clear();
|
||||||
if (!_PSM) return;
|
if (!_PSM) return;
|
||||||
if (_ParentSkel)
|
if (_ParentSkel)
|
||||||
{
|
{
|
||||||
|
|
|
@ -85,7 +85,9 @@ void CPrecomputedRotationsDlg::updateFromReader(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_NbModels = m_RotSpeedMin = m_RotSpeedMax = "";
|
m_NbModels.Empty();
|
||||||
|
m_RotSpeedMin.Empty();
|
||||||
|
m_RotSpeedMax.Empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateData(FALSE);
|
UpdateData(FALSE);
|
||||||
|
|
|
@ -502,7 +502,7 @@ void CSkeletonScaleDlg::refreshTextViewWithScale(TScaleId sid, float scale, flo
|
||||||
// if different values selected, diff
|
// if different values selected, diff
|
||||||
if(diff)
|
if(diff)
|
||||||
{
|
{
|
||||||
*_ScaleEdits[sid]= "";
|
_ScaleEdits[sid]->Empty();
|
||||||
}
|
}
|
||||||
// else display text
|
// else display text
|
||||||
else
|
else
|
||||||
|
|
|
@ -420,7 +420,7 @@ void CSlotDlg::OnSetAnimation()
|
||||||
updateScrollBar ();
|
updateScrollBar ();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
getSlotInformation ()->Animation = "";
|
getSlotInformation ()->Animation.clear();
|
||||||
}
|
}
|
||||||
refresh (TRUE);
|
refresh (TRUE);
|
||||||
}
|
}
|
||||||
|
@ -444,7 +444,7 @@ void CSlotDlg::OnSetSkeleton()
|
||||||
if (select.Selection!=-1)
|
if (select.Selection!=-1)
|
||||||
getSlotInformation ()->Skeleton = vectString[select.Selection].c_str();
|
getSlotInformation ()->Skeleton = vectString[select.Selection].c_str();
|
||||||
else
|
else
|
||||||
getSlotInformation ()->Skeleton = "";
|
getSlotInformation ()->Skeleton.clear();
|
||||||
|
|
||||||
setWindowName ();
|
setWindowName ();
|
||||||
Invalidate ();
|
Invalidate ();
|
||||||
|
|
|
@ -225,7 +225,7 @@ void CStartStopParticleSystem::updateUIFromState()
|
||||||
GetDlgItem(IDC_BROWSE_ANIM)->EnableWindow(FALSE);
|
GetDlgItem(IDC_BROWSE_ANIM)->EnableWindow(FALSE);
|
||||||
GetDlgItem(IDC_DISPLAY_HELPERS)->EnableWindow(FALSE);
|
GetDlgItem(IDC_DISPLAY_HELPERS)->EnableWindow(FALSE);
|
||||||
GetDlgItem(IDC_CLEAR_ANIM)->EnableWindow(FALSE);
|
GetDlgItem(IDC_CLEAR_ANIM)->EnableWindow(FALSE);
|
||||||
m_TriggerAnim = "";
|
m_TriggerAnim.Empty();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1033,7 +1033,7 @@ void CStartStopParticleSystem::OnBrowseAnim()
|
||||||
void CStartStopParticleSystem::OnClearAnim()
|
void CStartStopParticleSystem::OnClearAnim()
|
||||||
{
|
{
|
||||||
// TODO: Add your control notification handler code here
|
// TODO: Add your control notification handler code here
|
||||||
m_TriggerAnim = "";
|
m_TriggerAnim.Empty();
|
||||||
_ActiveNode->setTriggerAnim("");
|
_ActiveNode->setTriggerAnim("");
|
||||||
_ParticleDlg->ParticleTreeCtrl->updateCaption(*_ActiveNode);
|
_ParticleDlg->ParticleTreeCtrl->updateCaption(*_ActiveNode);
|
||||||
UpdateData(FALSE);
|
UpdateData(FALSE);
|
||||||
|
|
|
@ -293,7 +293,7 @@ void CVegetableDlg::CVegetableDesc::initVegetable(const NL3D::CVegetable &veget
|
||||||
void CVegetableDlg::CVegetableDesc::updateVegetableName()
|
void CVegetableDlg::CVegetableDesc::updateVegetableName()
|
||||||
{
|
{
|
||||||
// Build the vegetable Name according to the ShapeName
|
// Build the vegetable Name according to the ShapeName
|
||||||
if(Vegetable->ShapeName=="")
|
if(Vegetable->ShapeName.empty())
|
||||||
{
|
{
|
||||||
VegetableName= NL_DefaultVegetName;
|
VegetableName= NL_DefaultVegetName;
|
||||||
}
|
}
|
||||||
|
@ -385,7 +385,7 @@ void CVegetableDlg::buildVegetableSet(NL3D::CTileVegetableDesc &vegetSet, bool
|
||||||
for(uint i=0;i<_Vegetables.size();i++)
|
for(uint i=0;i<_Vegetables.size();i++)
|
||||||
{
|
{
|
||||||
// if don't want to keep <default> ShapeNames, skip them.
|
// if don't want to keep <default> ShapeNames, skip them.
|
||||||
if(!keepDefaultShapeName && _Vegetables[i].Vegetable->ShapeName=="")
|
if(!keepDefaultShapeName && _Vegetables[i].Vegetable->ShapeName.empty())
|
||||||
continue;
|
continue;
|
||||||
// if don't want to keep hiden vegetables, skip them.
|
// if don't want to keep hiden vegetables, skip them.
|
||||||
if(!keepHiden && !_Vegetables[i].Visible)
|
if(!keepHiden && !_Vegetables[i].Visible)
|
||||||
|
|
|
@ -147,7 +147,7 @@ protected:
|
||||||
bool loadVegetableSet(NL3D::CTileVegetableDesc &vegetSet, const TCHAR *title);
|
bool loadVegetableSet(NL3D::CTileVegetableDesc &vegetSet, const TCHAR *title);
|
||||||
/** build the vegetSet from the current _Vegetables
|
/** build the vegetSet from the current _Vegetables
|
||||||
* NB: transform Rotate Angle in Radians.
|
* NB: transform Rotate Angle in Radians.
|
||||||
* \param keepDefaultShapeName if true, then vegetables with a ShapeName=="" are kept.
|
* \param keepDefaultShapeName if true, then vegetables with a ShapeName.empty() are kept.
|
||||||
* \param keepHiden if true, then vegetables maked as hiden in ObjectViewer are kept.
|
* \param keepHiden if true, then vegetables maked as hiden in ObjectViewer are kept.
|
||||||
*/
|
*/
|
||||||
void buildVegetableSet(NL3D::CTileVegetableDesc &vegetSet, bool keepDefaultShapeName= true, bool keepHiden= true );
|
void buildVegetableSet(NL3D::CTileVegetableDesc &vegetSet, bool keepDefaultShapeName= true, bool keepHiden= true );
|
||||||
|
|
|
@ -502,7 +502,7 @@ namespace NLQT
|
||||||
// load and set search paths from config
|
// load and set search paths from config
|
||||||
//Modules::config().configSearchPaths();
|
//Modules::config().configSearchPaths();
|
||||||
|
|
||||||
_CurrentInstance = "";
|
_CurrentInstance.clear();
|
||||||
|
|
||||||
nlinfo("Scene cleared");
|
nlinfo("Scene cleared");
|
||||||
}
|
}
|
||||||
|
|
|
@ -2650,7 +2650,7 @@ void CNelExport::OnNodeProperties (const std::set<INode*> &listNode)
|
||||||
{
|
{
|
||||||
// Get a string
|
// Get a string
|
||||||
std::string nameLod=CExportNel::getScriptAppData (node, NEL3D_APPDATA_LOD_NAME+name, "");
|
std::string nameLod=CExportNel::getScriptAppData (node, NEL3D_APPDATA_LOD_NAME+name, "");
|
||||||
if (nameLod!="")
|
if (!nameLod.empty())
|
||||||
{
|
{
|
||||||
param.ListLodName.push_back (nameLod);
|
param.ListLodName.push_back (nameLod);
|
||||||
}
|
}
|
||||||
|
@ -2854,7 +2854,7 @@ void CNelExport::OnNodeProperties (const std::set<INode*> &listNode)
|
||||||
param.SoundGroup = DIFFERENT_VALUE_STRING;
|
param.SoundGroup = DIFFERENT_VALUE_STRING;
|
||||||
if (CExportNel::getScriptAppData(node, NEL3D_APPDATA_ENV_FX, "no fx") != param.EnvironmentFX)
|
if (CExportNel::getScriptAppData(node, NEL3D_APPDATA_ENV_FX, "no fx") != param.EnvironmentFX)
|
||||||
{
|
{
|
||||||
param.EnvironmentFX = "";
|
param.EnvironmentFX.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( param.LightGroup != CExportNel::getScriptAppData (node, NEL3D_APPDATA_LM_LIGHT_GROUP, 0) )
|
if ( param.LightGroup != CExportNel::getScriptAppData (node, NEL3D_APPDATA_LM_LIGHT_GROUP, 0) )
|
||||||
|
@ -2871,7 +2871,7 @@ void CNelExport::OnNodeProperties (const std::set<INode*> &listNode)
|
||||||
if (CExportNel::getScriptAppData (node, NEL3D_APPDATA_IGNAME, "")!=param.InstanceGroupName)
|
if (CExportNel::getScriptAppData (node, NEL3D_APPDATA_IGNAME, "")!=param.InstanceGroupName)
|
||||||
param.InstanceGroupName = DIFFERENT_VALUE_STRING;
|
param.InstanceGroupName = DIFFERENT_VALUE_STRING;
|
||||||
if (CExportNel::getScriptAppData (node, NEL3D_APPDATA_INTERFACE_FILE, "")!=param.InterfaceFileName)
|
if (CExportNel::getScriptAppData (node, NEL3D_APPDATA_INTERFACE_FILE, "")!=param.InterfaceFileName)
|
||||||
param.InterfaceFileName = "";
|
param.InterfaceFileName.clear();
|
||||||
if (CExportNel::getScriptAppData (node, NEL3D_APPDATA_INTERFACE_THRESHOLD, 0.1f)!=param.InterfaceThreshold)
|
if (CExportNel::getScriptAppData (node, NEL3D_APPDATA_INTERFACE_THRESHOLD, 0.1f)!=param.InterfaceThreshold)
|
||||||
param.InterfaceThreshold = -1;
|
param.InterfaceThreshold = -1;
|
||||||
if (CExportNel::getScriptAppData (node, NEL3D_APPDATA_GET_INTERFACE_NORMAL_FROM_SCENE_OBJECTS, 0)!=param.GetInterfaceNormalsFromSceneObjects)
|
if (CExportNel::getScriptAppData (node, NEL3D_APPDATA_GET_INTERFACE_NORMAL_FROM_SCENE_OBJECTS, 0)!=param.GetInterfaceNormalsFromSceneObjects)
|
||||||
|
@ -2942,7 +2942,7 @@ void CNelExport::OnNodeProperties (const std::set<INode*> &listNode)
|
||||||
{
|
{
|
||||||
// Get a string
|
// Get a string
|
||||||
std::string nameLod=CExportNel::getScriptAppData (node, NEL3D_APPDATA_LOD_NAME+name, "");
|
std::string nameLod=CExportNel::getScriptAppData (node, NEL3D_APPDATA_LOD_NAME+name, "");
|
||||||
if (nameLod!="")
|
if (!nameLod.empty())
|
||||||
{
|
{
|
||||||
tmplist.push_back (nameLod);
|
tmplist.push_back (nameLod);
|
||||||
}
|
}
|
||||||
|
|
|
@ -369,7 +369,7 @@ void CNelExport::viewMesh (TimeValue time)
|
||||||
string sTmp = "Object Name: ";
|
string sTmp = "Object Name: ";
|
||||||
sTmp += pNode->GetName();
|
sTmp += pNode->GetName();
|
||||||
ProgBar.setLine (0, sTmp);
|
ProgBar.setLine (0, sTmp);
|
||||||
sTmp = "";
|
sTmp.clear();
|
||||||
for (uint32 i = 1; i < 10; ++i)
|
for (uint32 i = 1; i < 10; ++i)
|
||||||
ProgBar.setLine (i, sTmp);
|
ProgBar.setLine (i, sTmp);
|
||||||
sTmp = "Last Error";
|
sTmp = "Last Error";
|
||||||
|
@ -582,8 +582,8 @@ void CNelExport::viewMesh (TimeValue time)
|
||||||
NLMISC::clamp(slInfo.CellSurfaceLightSize, 0.001f, 1000000.f);
|
NLMISC::clamp(slInfo.CellSurfaceLightSize, 0.001f, 1000000.f);
|
||||||
slInfo.CellRaytraceDeltaZ= theExportSceneStruct.SurfaceLightingDeltaZ;
|
slInfo.CellRaytraceDeltaZ= theExportSceneStruct.SurfaceLightingDeltaZ;
|
||||||
// no more add any prefix to the colision identifier.
|
// no more add any prefix to the colision identifier.
|
||||||
slInfo.ColIdentifierPrefix= "";
|
slInfo.ColIdentifierPrefix.clear();
|
||||||
slInfo.ColIdentifierSuffix= "";
|
slInfo.ColIdentifierSuffix.clear();
|
||||||
// Build RetrieverBank and GlobalRetriever from collisions in scene
|
// Build RetrieverBank and GlobalRetriever from collisions in scene
|
||||||
_ExportNel->computeCollisionRetrieverFromScene(time, slInfo.RetrieverBank, slInfo.GlobalRetriever,
|
_ExportNel->computeCollisionRetrieverFromScene(time, slInfo.RetrieverBank, slInfo.GlobalRetriever,
|
||||||
slInfo.ColIdentifierPrefix.c_str(), slInfo.ColIdentifierSuffix.c_str(), slInfo.IgFileName);
|
slInfo.ColIdentifierPrefix.c_str(), slInfo.ColIdentifierSuffix.c_str(), slInfo.IgFileName);
|
||||||
|
|
|
@ -66,7 +66,7 @@ INT_PTR CALLBACK CalculatingDialogCallback (
|
||||||
SendMessage (GetDlgItem (hwndDlg, IDC_STATICTIMELEFT), WM_SETTEXT, 0, (long)temp);
|
SendMessage (GetDlgItem (hwndDlg, IDC_STATICTIMELEFT), WM_SETTEXT, 0, (long)temp);
|
||||||
SendMessage (GetDlgItem (hwndDlg, IDC_BUTTONCANCEL), WM_PAINT, 0, 0);
|
SendMessage (GetDlgItem (hwndDlg, IDC_BUTTONCANCEL), WM_PAINT, 0, 0);
|
||||||
}
|
}
|
||||||
string all = "";
|
string all;
|
||||||
for (uint32 i = 0; i < 14; ++i)
|
for (uint32 i = 0; i < 14; ++i)
|
||||||
all += pClass->sInfoProgress[i] + "\n";
|
all += pClass->sInfoProgress[i] + "\n";
|
||||||
SendMessage (GetDlgItem (hwndDlg, IDC_STATICINFO), WM_SETTEXT, 0, (long)all.c_str());
|
SendMessage (GetDlgItem (hwndDlg, IDC_STATICINFO), WM_SETTEXT, 0, (long)all.c_str());
|
||||||
|
|
|
@ -2436,7 +2436,7 @@ bool CExportNel::calculateLM( CMesh::CMeshBuild *pZeMeshBuild, CMeshBase::CMeshB
|
||||||
{
|
{
|
||||||
string sTmp = "Placement";
|
string sTmp = "Placement";
|
||||||
gOptions.FeedBack->setLine (3, sTmp);
|
gOptions.FeedBack->setLine (3, sTmp);
|
||||||
sTmp = "";
|
sTmp.clear();
|
||||||
for(i=4;i<10;++i)
|
for(i=4;i<10;++i)
|
||||||
gOptions.FeedBack->setLine (i, sTmp);
|
gOptions.FeedBack->setLine (i, sTmp);
|
||||||
gOptions.FeedBack->update ();
|
gOptions.FeedBack->update ();
|
||||||
|
|
|
@ -391,7 +391,7 @@ void CExportNel::computeCollisionRetrieverFromScene(TimeValue time,
|
||||||
// Default: empty retrieverBank/globalRetriever
|
// Default: empty retrieverBank/globalRetriever
|
||||||
retrieverBank= NULL;
|
retrieverBank= NULL;
|
||||||
globalRetriever= NULL;
|
globalRetriever= NULL;
|
||||||
retIgName= "";
|
retIgName.clear();
|
||||||
|
|
||||||
// get list of nodes from scene
|
// get list of nodes from scene
|
||||||
std::vector<INode*> nodes;
|
std::vector<INode*> nodes;
|
||||||
|
|
|
@ -946,11 +946,11 @@ std::string CExportNel::getAnimatedLight (INode *node)
|
||||||
{
|
{
|
||||||
std::string ret = CExportNel::getScriptAppData (node, NEL3D_APPDATA_LM_ANIMATED_LIGHT, NEL3D_APPDATA_LM_ANIMATED_LIGHT_DEFAULT);
|
std::string ret = CExportNel::getScriptAppData (node, NEL3D_APPDATA_LM_ANIMATED_LIGHT, NEL3D_APPDATA_LM_ANIMATED_LIGHT_DEFAULT);
|
||||||
if (ret == "Sun")
|
if (ret == "Sun")
|
||||||
ret = "";
|
ret.clear();
|
||||||
if (ret == "GlobalLight")
|
if (ret == "GlobalLight")
|
||||||
ret = "";
|
ret.clear();
|
||||||
if (ret == "(Use NelLight Modifier)")
|
if (ret == "(Use NelLight Modifier)")
|
||||||
ret = "";
|
ret.clear();
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -715,7 +715,7 @@ void CExportNel::buildScene (NL3D::CScene &scene, NL3D::CShapeBank &shapeBank, I
|
||||||
sTmp += pNode->GetName();
|
sTmp += pNode->GetName();
|
||||||
if (progress)
|
if (progress)
|
||||||
progress->setLine (0, sTmp);
|
progress->setLine (0, sTmp);
|
||||||
sTmp = "";
|
sTmp.clear();
|
||||||
for (uint32 i = 1; i < 10; ++i)
|
for (uint32 i = 1; i < 10; ++i)
|
||||||
{
|
{
|
||||||
if (progress)
|
if (progress)
|
||||||
|
|
|
@ -1627,7 +1627,7 @@ load_bank_cf(Value** arg_list, int count)
|
||||||
// Check to see if the arguments match up to what we expect
|
// Check to see if the arguments match up to what we expect
|
||||||
// We want to use 'TurnAllTexturesOn <object to use>'
|
// We want to use 'TurnAllTexturesOn <object to use>'
|
||||||
std::string bankName = GetBankPathName ();
|
std::string bankName = GetBankPathName ();
|
||||||
if (bankName!="")
|
if (!bankName.empty())
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -434,7 +434,6 @@ class CBankManager
|
||||||
public:
|
public:
|
||||||
CBankManager ()
|
CBankManager ()
|
||||||
{
|
{
|
||||||
_lastPath="";
|
|
||||||
}
|
}
|
||||||
const NL3D::CTileBank& getBank (std::string& path=GetBankPathName ())
|
const NL3D::CTileBank& getBank (std::string& path=GetBankPathName ())
|
||||||
{
|
{
|
||||||
|
|
|
@ -175,7 +175,7 @@ bool RPatchMesh::exportZone(INode* pNode, PatchMesh* pPM, NL3D::CZone& zone, CZo
|
||||||
|
|
||||||
// Get the bank name
|
// Get the bank name
|
||||||
std::string sName=GetBankPathName ();
|
std::string sName=GetBankPathName ();
|
||||||
if (sName!="")
|
if (!sName.empty())
|
||||||
{
|
{
|
||||||
// Open the bank
|
// Open the bank
|
||||||
CIFile file;
|
CIFile file;
|
||||||
|
|
|
@ -3979,7 +3979,7 @@ void EPM_PaintCMode::DoPaint ()
|
||||||
|
|
||||||
|
|
||||||
std::string sName=GetBankPathName ();
|
std::string sName=GetBankPathName ();
|
||||||
if (sName!="")
|
if (!sName.empty())
|
||||||
{
|
{
|
||||||
CIFile file;
|
CIFile file;
|
||||||
if (file.open (sName))
|
if (file.open (sName))
|
||||||
|
|
|
@ -168,7 +168,7 @@ void CTileSetCont::build (CTileBank& bank, uint tileSet)
|
||||||
std::string fileName=bank.getAbsPath()+bank.getTile (set->getTile128(0))->getRelativeFileName (CTile::diffuse);
|
std::string fileName=bank.getAbsPath()+bank.getTile (set->getTile128(0))->getRelativeFileName (CTile::diffuse);
|
||||||
|
|
||||||
// Valid name?
|
// Valid name?
|
||||||
if (fileName!="")
|
if (!fileName.empty())
|
||||||
{
|
{
|
||||||
// Create it
|
// Create it
|
||||||
MainBitmap=new CTextureFile (fileName);
|
MainBitmap=new CTextureFile (fileName);
|
||||||
|
@ -193,7 +193,7 @@ void CTileSetCont::build (CTileBank& bank, uint tileSet)
|
||||||
std::string fileName=bank.getAbsPath()+pTile->getRelativeFileName (CTile::diffuse);
|
std::string fileName=bank.getAbsPath()+pTile->getRelativeFileName (CTile::diffuse);
|
||||||
|
|
||||||
// Valid name?
|
// Valid name?
|
||||||
if (fileName!="")
|
if (!fileName.empty())
|
||||||
{
|
{
|
||||||
// Create it
|
// Create it
|
||||||
if (GroupBitmap[group]==NULL)
|
if (GroupBitmap[group]==NULL)
|
||||||
|
@ -218,7 +218,7 @@ void CTileSetCont::build (CTileBank& bank, uint tileSet)
|
||||||
std::string fileName=bank.getAbsPath()+pTile->getRelativeFileName (CTile::diffuse);
|
std::string fileName=bank.getAbsPath()+pTile->getRelativeFileName (CTile::diffuse);
|
||||||
|
|
||||||
// Valid name?
|
// Valid name?
|
||||||
if (fileName!="")
|
if (!fileName.empty())
|
||||||
{
|
{
|
||||||
// Create it
|
// Create it
|
||||||
if (GroupBitmap[group]==NULL)
|
if (GroupBitmap[group]==NULL)
|
||||||
|
@ -250,10 +250,10 @@ void CTileSetCont::build (CTileBank& bank, uint tileSet)
|
||||||
// Get the name
|
// Get the name
|
||||||
std::string fileName = bank.getDisplacementMap(dispTile);
|
std::string fileName = bank.getDisplacementMap(dispTile);
|
||||||
if (fileName=="EmptyDisplacementMap")
|
if (fileName=="EmptyDisplacementMap")
|
||||||
fileName="";
|
fileName.clear();
|
||||||
|
|
||||||
// Valid name?
|
// Valid name?
|
||||||
if (fileName!="")
|
if (!fileName.empty())
|
||||||
{
|
{
|
||||||
// Create it
|
// Create it
|
||||||
DisplaceBitmap[displace]=new CTextureFile (bank.getAbsPath()+fileName);
|
DisplaceBitmap[displace]=new CTextureFile (bank.getAbsPath()+fileName);
|
||||||
|
|
|
@ -443,7 +443,7 @@ bool Tile_utility::SetupMaterial () const
|
||||||
mtl->SetShininess (0.0, t);
|
mtl->SetShininess (0.0, t);
|
||||||
mtl->SetSpecular (Color (0,0,0), t);
|
mtl->SetSpecular (Color (0,0,0), t);
|
||||||
|
|
||||||
if ((tile->getRelativeFileName(CTile::diffuse)!="")||(tile->getRelativeFileName(CTile::additive)!=""))
|
if (!tile->getRelativeFileName(CTile::diffuse).empty() || !tile->getRelativeFileName(CTile::additive).empty())
|
||||||
{
|
{
|
||||||
bActive=true;
|
bActive=true;
|
||||||
Texmap* rgb=(Texmap*)GetRGBAddDesc()->Create (FALSE);
|
Texmap* rgb=(Texmap*)GetRGBAddDesc()->Create (FALSE);
|
||||||
|
@ -452,7 +452,7 @@ bool Tile_utility::SetupMaterial () const
|
||||||
mtl->SetSubTexmap (ID_DI, rgb);
|
mtl->SetSubTexmap (ID_DI, rgb);
|
||||||
mtl->SubTexmapOn (ID_DI);
|
mtl->SubTexmapOn (ID_DI);
|
||||||
|
|
||||||
if (tile->getRelativeFileName(CTile::diffuse)!="")
|
if (!tile->getRelativeFileName(CTile::diffuse).empty())
|
||||||
{
|
{
|
||||||
// New BitmapTex
|
// New BitmapTex
|
||||||
BitmapTex* tex=NewDefaultBitmapTex();
|
BitmapTex* tex=NewDefaultBitmapTex();
|
||||||
|
@ -472,7 +472,7 @@ bool Tile_utility::SetupMaterial () const
|
||||||
mtl->NotifyDependents(FOREVER, PART_ALL, REFMSG_CHANGE);
|
mtl->NotifyDependents(FOREVER, PART_ALL, REFMSG_CHANGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tile->getRelativeFileName(CTile::additive)!="")
|
if (!tile->getRelativeFileName(CTile::additive).empty())
|
||||||
{
|
{
|
||||||
// New BitmapTex
|
// New BitmapTex
|
||||||
BitmapTex* tex=NewDefaultBitmapTex();
|
BitmapTex* tex=NewDefaultBitmapTex();
|
||||||
|
|
|
@ -546,7 +546,7 @@ unsigned long Browse::MyControllingFunction( void* pParam )
|
||||||
rot = tileBank2.getTile (index)->getRotAlpha ();
|
rot = tileBank2.getTile (index)->getRotAlpha ();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
path = "";
|
path.clear();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
|
@ -576,7 +576,7 @@ unsigned long Browse::MyControllingFunction( void* pParam )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((path!="") && _LoadBitmap(tileBank2.getAbsPath() + path, pBmp, *bits, pAlpha, rot))
|
if (!path.empty() && _LoadBitmap(tileBank2.getAbsPath() + path, pBmp, *bits, pAlpha, rot))
|
||||||
{
|
{
|
||||||
*ld=1;
|
*ld=1;
|
||||||
int iFV,iLV; br->m_ctrl.GetVisibility(iFV, iLV, br->m_128x128);
|
int iFV,iLV; br->m_ctrl.GetVisibility(iFV, iLV, br->m_128x128);
|
||||||
|
@ -633,7 +633,7 @@ void Browse::Init()
|
||||||
value=256;
|
value=256;
|
||||||
type=REG_SZ;
|
type=REG_SZ;
|
||||||
if (RegQueryValueEx(regkey,REGKEY_LASTPATH,0,&type,(unsigned char *)&sWindowpl,&value)!=ERROR_SUCCESS)
|
if (RegQueryValueEx(regkey,REGKEY_LASTPATH,0,&type,(unsigned char *)&sWindowpl,&value)!=ERROR_SUCCESS)
|
||||||
m_ctrl.LastPath="";
|
m_ctrl.LastPath.clear();
|
||||||
else
|
else
|
||||||
m_ctrl.LastPath=(const char*)sWindowpl;
|
m_ctrl.LastPath=(const char*)sWindowpl;
|
||||||
value=4;
|
value=4;
|
||||||
|
@ -916,7 +916,7 @@ void Browse::OnBatchLoad ()
|
||||||
|
|
||||||
// Transition to patch
|
// Transition to patch
|
||||||
CTileSetTransition* trans=tileBank2.getTileSet (land)->getTransition (transition);
|
CTileSetTransition* trans=tileBank2.getTileSet (land)->getTransition (transition);
|
||||||
if (tileBank2.getTile (trans->getTile())->getRelativeFileName (CTile::alpha)=="")
|
if (tileBank2.getTile (trans->getTile())->getRelativeFileName (CTile::alpha).empty())
|
||||||
{
|
{
|
||||||
// Continue ?
|
// Continue ?
|
||||||
int ok;
|
int ok;
|
||||||
|
@ -958,7 +958,7 @@ void Browse::OnBatchLoad ()
|
||||||
|
|
||||||
// Transition to patch
|
// Transition to patch
|
||||||
CTileSetTransition* trans=tileBank2.getTileSet (land)->getTransition (transition);
|
CTileSetTransition* trans=tileBank2.getTileSet (land)->getTransition (transition);
|
||||||
if (tileBank2.getTile (trans->getTile())->getRelativeFileName (m_ctrl.Texture==1?CTile::diffuse:CTile::additive)=="")
|
if (tileBank2.getTile (trans->getTile())->getRelativeFileName (m_ctrl.Texture==1?CTile::diffuse:CTile::additive).empty())
|
||||||
{
|
{
|
||||||
// Try to load a tile with a file name like /tiletransition0.tga
|
// Try to load a tile with a file name like /tiletransition0.tga
|
||||||
char sName2[256];
|
char sName2[256];
|
||||||
|
|
|
@ -577,7 +577,7 @@ void SelectionTerritoire::OnPath()
|
||||||
const std::string& bitmapPath=tileBank.getTile(tiles)->getRelativeFileName ((CTile::TBitmap)type);
|
const std::string& bitmapPath=tileBank.getTile(tiles)->getRelativeFileName ((CTile::TBitmap)type);
|
||||||
|
|
||||||
// not empty ?
|
// not empty ?
|
||||||
if (bitmapPath!="")
|
if (!bitmapPath.empty())
|
||||||
{
|
{
|
||||||
// Check the path
|
// Check the path
|
||||||
if (CheckPath (bitmapPath, path)==false)
|
if (CheckPath (bitmapPath, path)==false)
|
||||||
|
@ -648,7 +648,7 @@ void SelectionTerritoire::OnPath()
|
||||||
std::string bitmapPath=tileBank.getTile(tiles)->getRelativeFileName ((CTile::TBitmap)type);
|
std::string bitmapPath=tileBank.getTile(tiles)->getRelativeFileName ((CTile::TBitmap)type);
|
||||||
|
|
||||||
// not empty ?
|
// not empty ?
|
||||||
if (bitmapPath!="")
|
if (!bitmapPath.empty())
|
||||||
{
|
{
|
||||||
// Remove the absolute path
|
// Remove the absolute path
|
||||||
bool res=RemovePath (bitmapPath, path);
|
bool res=RemovePath (bitmapPath, path);
|
||||||
|
@ -668,7 +668,7 @@ void SelectionTerritoire::OnPath()
|
||||||
std::string bitmapPath=tileBank.getDisplacementMap (noise);
|
std::string bitmapPath=tileBank.getDisplacementMap (noise);
|
||||||
|
|
||||||
// not empty ?
|
// not empty ?
|
||||||
if (bitmapPath!="")
|
if (!bitmapPath.empty())
|
||||||
{
|
{
|
||||||
// Remove the absolute path
|
// Remove the absolute path
|
||||||
bool res=RemovePath (bitmapPath, path);
|
bool res=RemovePath (bitmapPath, path);
|
||||||
|
|
|
@ -432,7 +432,7 @@ int TileList::setDisplacement (int tile, const std::string& name)
|
||||||
if (RemovePath (troncated, tileBank2.getAbsPath ().c_str()))
|
if (RemovePath (troncated, tileBank2.getAbsPath ().c_str()))
|
||||||
{
|
{
|
||||||
// load it
|
// load it
|
||||||
if (troncated!="")
|
if (!troncated.empty())
|
||||||
{
|
{
|
||||||
// not loaded
|
// not loaded
|
||||||
theListDisplacement[tile].loaded=0;
|
theListDisplacement[tile].loaded=0;
|
||||||
|
@ -670,7 +670,7 @@ const std::string& TileInfo::getRelativeFileName (CTile::TBitmap type, int index
|
||||||
bool TileInfo::Load (int index, std::vector<NLMISC::CBGRA>* Alpha)
|
bool TileInfo::Load (int index, std::vector<NLMISC::CBGRA>* Alpha)
|
||||||
{
|
{
|
||||||
bool bRes=true;
|
bool bRes=true;
|
||||||
if (!loaded && getRelativeFileName (CTile::diffuse, index)!="")
|
if (!loaded && !getRelativeFileName (CTile::diffuse, index).empty())
|
||||||
{
|
{
|
||||||
if (!_LoadBitmap(tileBank2.getAbsPath() + getRelativeFileName (CTile::diffuse, index), &BmpInfo, Bits, Alpha, 0))
|
if (!_LoadBitmap(tileBank2.getAbsPath() + getRelativeFileName (CTile::diffuse, index), &BmpInfo, Bits, Alpha, 0))
|
||||||
{
|
{
|
||||||
|
@ -680,7 +680,7 @@ bool TileInfo::Load (int index, std::vector<NLMISC::CBGRA>* Alpha)
|
||||||
else
|
else
|
||||||
loaded=1;
|
loaded=1;
|
||||||
}
|
}
|
||||||
if (!nightLoaded && getRelativeFileName (CTile::additive, index)!="")
|
if (!nightLoaded && !getRelativeFileName (CTile::additive, index).empty())
|
||||||
{
|
{
|
||||||
if (!_LoadBitmap(tileBank2.getAbsPath() + getRelativeFileName (CTile::additive, index), &nightBmpInfo, nightBits, Alpha, 0))
|
if (!_LoadBitmap(tileBank2.getAbsPath() + getRelativeFileName (CTile::additive, index), &nightBmpInfo, nightBits, Alpha, 0))
|
||||||
{
|
{
|
||||||
|
@ -690,7 +690,7 @@ bool TileInfo::Load (int index, std::vector<NLMISC::CBGRA>* Alpha)
|
||||||
else
|
else
|
||||||
nightLoaded=1;
|
nightLoaded=1;
|
||||||
}
|
}
|
||||||
if (!alphaLoaded && getRelativeFileName (CTile::alpha, index)!="")
|
if (!alphaLoaded && !getRelativeFileName (CTile::alpha, index).empty())
|
||||||
{
|
{
|
||||||
if (!_LoadBitmap(tileBank2.getAbsPath() + getRelativeFileName (CTile::alpha, index), &alphaBmpInfo, alphaBits, NULL,
|
if (!_LoadBitmap(tileBank2.getAbsPath() + getRelativeFileName (CTile::alpha, index), &alphaBmpInfo, alphaBits, NULL,
|
||||||
tileBank2.getTile (index)->getRotAlpha ()))
|
tileBank2.getTile (index)->getRotAlpha ()))
|
||||||
|
@ -1205,7 +1205,7 @@ void CTView::DrawTile(tilelist::iterator i,CDC *pDC,int clear, int n)
|
||||||
if (index!=-1)
|
if (index!=-1)
|
||||||
pth = i->getRelativeFileName ((CTile::TBitmap)(Texture-1), index);
|
pth = i->getRelativeFileName ((CTile::TBitmap)(Texture-1), index);
|
||||||
else
|
else
|
||||||
pth = "";
|
pth.clear();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
|
|
|
@ -77,8 +77,8 @@ BOOL CChooseVegetSet::OnInitDialog()
|
||||||
{
|
{
|
||||||
CDialog::OnInitDialog();
|
CDialog::OnInitDialog();
|
||||||
|
|
||||||
if (FileName != "")
|
if (!FileName.empty())
|
||||||
Name.SetWindowText (FileName.c_str());
|
Name.SetWindowText (utf8ToTStr(FileName));
|
||||||
else
|
else
|
||||||
Name.SetWindowText ("Browse...");
|
Name.SetWindowText ("Browse...");
|
||||||
|
|
||||||
|
@ -88,6 +88,6 @@ BOOL CChooseVegetSet::OnInitDialog()
|
||||||
|
|
||||||
void CChooseVegetSet::OnReset()
|
void CChooseVegetSet::OnReset()
|
||||||
{
|
{
|
||||||
FileName = "";
|
FileName.clear();
|
||||||
Name.SetWindowText ("Browse...");
|
Name.SetWindowText (_T("Browse..."));
|
||||||
}
|
}
|
||||||
|
|
|
@ -149,7 +149,7 @@ void TileInfo::Init(int id, TileType tileType)
|
||||||
bool TileInfo::Load (int index, std::vector<NLMISC::CBGRA>* Alpha)
|
bool TileInfo::Load (int index, std::vector<NLMISC::CBGRA>* Alpha)
|
||||||
{
|
{
|
||||||
bool bRes=true;
|
bool bRes=true;
|
||||||
if (!loaded && getRelativeFileName (Diffuse, index)!="")
|
if (!loaded && !getRelativeFileName (Diffuse, index).empty())
|
||||||
{
|
{
|
||||||
path = fixPath(tileBankBrowser.getAbsPath() + getRelativeFileName (Diffuse, index));
|
path = fixPath(tileBankBrowser.getAbsPath() + getRelativeFileName (Diffuse, index));
|
||||||
|
|
||||||
|
@ -164,7 +164,7 @@ bool TileInfo::Load (int index, std::vector<NLMISC::CBGRA>* Alpha)
|
||||||
else
|
else
|
||||||
loaded=1;
|
loaded=1;
|
||||||
}
|
}
|
||||||
if (!nightLoaded && getRelativeFileName (Additive, index)!="")
|
if (!nightLoaded && !getRelativeFileName (Additive, index).empty())
|
||||||
{
|
{
|
||||||
nightPath = fixPath(tileBankBrowser.getAbsPath() + getRelativeFileName (Additive, index));
|
nightPath = fixPath(tileBankBrowser.getAbsPath() + getRelativeFileName (Additive, index));
|
||||||
if (!loadPixmapBuffer( nightPath, nightBits, Alpha, 0))
|
if (!loadPixmapBuffer( nightPath, nightBits, Alpha, 0))
|
||||||
|
@ -175,7 +175,7 @@ bool TileInfo::Load (int index, std::vector<NLMISC::CBGRA>* Alpha)
|
||||||
else
|
else
|
||||||
nightLoaded=1;
|
nightLoaded=1;
|
||||||
}
|
}
|
||||||
if (!alphaLoaded && getRelativeFileName (::Alpha, index)!="")
|
if (!alphaLoaded && !getRelativeFileName (::Alpha, index).empty())
|
||||||
{
|
{
|
||||||
alphaPath = fixPath(tileBankBrowser.getAbsPath() + getRelativeFileName (::Alpha, index));
|
alphaPath = fixPath(tileBankBrowser.getAbsPath() + getRelativeFileName (::Alpha, index));
|
||||||
if (!loadPixmapBuffer( alphaPath, alphaBits, NULL, tileBankBrowser.getTile (index)->getRotAlpha ()))
|
if (!loadPixmapBuffer( alphaPath, alphaBits, NULL, tileBankBrowser.getTile (index)->getRotAlpha ()))
|
||||||
|
@ -234,7 +234,7 @@ const std::string TileInfo::getRelativeFileName (TileTexture texture, int index)
|
||||||
|
|
||||||
//TODO titegus: remove MAGIC STRING "EmptyDisplacementMap" in Nel \tile_bank.cpp\void CTileNoise::setEmpty () or add an IsEmpty() method !!!!
|
//TODO titegus: remove MAGIC STRING "EmptyDisplacementMap" in Nel \tile_bank.cpp\void CTileNoise::setEmpty () or add an IsEmpty() method !!!!
|
||||||
if (currentPath == "EmptyDisplacementMap")
|
if (currentPath == "EmptyDisplacementMap")
|
||||||
currentPath = "";
|
currentPath.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -421,7 +421,7 @@ void CTile_browser_dlg::on_batchLoadPushButton_clicked()
|
||||||
|
|
||||||
// Transition to patch
|
// Transition to patch
|
||||||
CTileSetTransition* trans=tileBankBrowser.getTileSet (tileSetIndex)->getTransition (transition);
|
CTileSetTransition* trans=tileBankBrowser.getTileSet (tileSetIndex)->getTransition (transition);
|
||||||
if (tileBankBrowser.getTile (trans->getTile())->getRelativeFileName (CTile::alpha)=="")
|
if (tileBankBrowser.getTile (trans->getTile())->getRelativeFileName (CTile::alpha).empty())
|
||||||
{
|
{
|
||||||
// Continue ?
|
// Continue ?
|
||||||
int ok;
|
int ok;
|
||||||
|
@ -465,7 +465,7 @@ void CTile_browser_dlg::on_batchLoadPushButton_clicked()
|
||||||
|
|
||||||
// Transition to patch
|
// Transition to patch
|
||||||
//CTileSetTransition* trans=tileBankBrowser.getTileSet (tileSetIndex)->getTransition (transition);
|
//CTileSetTransition* trans=tileBankBrowser.getTileSet (tileSetIndex)->getTransition (transition);
|
||||||
//if (tileBankBrowser.getTile (trans->getTile())->getRelativeFileName ((CTile::TBitmap)tileTextureButtonGroup->checkedId())=="")
|
//if (tileBankBrowser.getTile (trans->getTile())->getRelativeFileName ((CTile::TBitmap)tileTextureButtonGroup->checkedId()).empty())
|
||||||
//{
|
//{
|
||||||
// // Try to load a tile with a file name like /tiletransition0.tga
|
// // Try to load a tile with a file name like /tiletransition0.tga
|
||||||
// char sName2[256];
|
// char sName2[256];
|
||||||
|
|
|
@ -514,7 +514,7 @@ void CTile_edit_dlg::on_absolutePathPushButton_clicked()
|
||||||
const std::string& bitmapPath=tileBank.getTile(tiles)->getRelativeFileName ((CTile::TBitmap)type);
|
const std::string& bitmapPath=tileBank.getTile(tiles)->getRelativeFileName ((CTile::TBitmap)type);
|
||||||
|
|
||||||
// not empty ?
|
// not empty ?
|
||||||
if (bitmapPath!="")
|
if (!bitmapPath.empty())
|
||||||
{
|
{
|
||||||
// Check the path
|
// Check the path
|
||||||
if ( CheckPath( bitmapPath, path.toUtf8() ) == false )
|
if ( CheckPath( bitmapPath, path.toUtf8() ) == false )
|
||||||
|
@ -583,7 +583,7 @@ void CTile_edit_dlg::on_absolutePathPushButton_clicked()
|
||||||
std::string bitmapPath=tileBank.getTile(tiles)->getRelativeFileName ((CTile::TBitmap)type);
|
std::string bitmapPath=tileBank.getTile(tiles)->getRelativeFileName ((CTile::TBitmap)type);
|
||||||
|
|
||||||
// not empty ?
|
// not empty ?
|
||||||
if (bitmapPath!="")
|
if (!bitmapPath.empty())
|
||||||
{
|
{
|
||||||
// Remove the absolute path
|
// Remove the absolute path
|
||||||
bool res=RemovePath (bitmapPath, path.toUtf8());
|
bool res=RemovePath (bitmapPath, path.toUtf8());
|
||||||
|
@ -603,7 +603,7 @@ void CTile_edit_dlg::on_absolutePathPushButton_clicked()
|
||||||
std::string bitmapPath=tileBank.getDisplacementMap (noise);
|
std::string bitmapPath=tileBank.getDisplacementMap (noise);
|
||||||
|
|
||||||
// not empty ?
|
// not empty ?
|
||||||
if (bitmapPath!="")
|
if (!bitmapPath.empty())
|
||||||
{
|
{
|
||||||
// Remove the absolute path
|
// Remove the absolute path
|
||||||
bool res=RemovePath (bitmapPath, path.toUtf8());
|
bool res=RemovePath (bitmapPath, path.toUtf8());
|
||||||
|
|
|
@ -135,7 +135,6 @@ struct CViewerConfig
|
||||||
LandscapeThreshold = 0.001f;
|
LandscapeThreshold = 0.001f;
|
||||||
LandscapeNoise = true;
|
LandscapeNoise = true;
|
||||||
|
|
||||||
HeightFieldName= "";
|
|
||||||
HeightFieldMaxZ= 100;
|
HeightFieldMaxZ= 100;
|
||||||
HeightFieldOriginX= 16000;
|
HeightFieldOriginX= 16000;
|
||||||
HeightFieldOriginY= -24000;
|
HeightFieldOriginY= -24000;
|
||||||
|
@ -344,7 +343,7 @@ void displayZones()
|
||||||
CBitmap heightBitmap;
|
CBitmap heightBitmap;
|
||||||
CIFile file(ViewerCfg.HeightFieldName);
|
CIFile file(ViewerCfg.HeightFieldName);
|
||||||
|
|
||||||
if( ViewerCfg.HeightFieldName!="" && heightBitmap.load(file) )
|
if( !ViewerCfg.HeightFieldName.empty() && heightBitmap.load(file) )
|
||||||
{
|
{
|
||||||
CHeightMap heightMap;
|
CHeightMap heightMap;
|
||||||
heightMap.buildFromBitmap(heightBitmap);
|
heightMap.buildFromBitmap(heightBitmap);
|
||||||
|
@ -373,7 +372,7 @@ void displayZones()
|
||||||
nlerror (tmp.c_str());
|
nlerror (tmp.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((Landscape->Landscape.TileBank.getAbsPath ()=="")&&(ViewerCfg.TilesPath!=""))
|
if ((Landscape->Landscape.TileBank.getAbsPath ().empty())&&(!ViewerCfg.TilesPath.empty()))
|
||||||
Landscape->Landscape.TileBank.setAbsPath (ViewerCfg.TilesPath + "/");
|
Landscape->Landscape.TileBank.setAbsPath (ViewerCfg.TilesPath + "/");
|
||||||
|
|
||||||
if (ViewerCfg.UseDDS)
|
if (ViewerCfg.UseDDS)
|
||||||
|
|
|
@ -933,7 +933,7 @@ void convertCsvFile( const string &file, bool generate, const string& sheetType
|
||||||
if ( idm==dirmapDirs.end() )
|
if ( idm==dirmapDirs.end() )
|
||||||
{
|
{
|
||||||
nlinfo( "Directory mapping not found for %s (index %u)", filebase.c_str(), letterIndex );
|
nlinfo( "Directory mapping not found for %s (index %u)", filebase.c_str(), letterIndex );
|
||||||
dirbase = ""; // put into root
|
dirbase.clear(); // put into root
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -953,7 +953,7 @@ void convertCsvFile( const string &file, bool generate, const string& sheetType
|
||||||
{
|
{
|
||||||
|
|
||||||
// Load sheet (skip if failed)
|
// Load sheet (skip if failed)
|
||||||
dirbase = "";
|
dirbase.clear();
|
||||||
filename = (*it).second; // whole path
|
filename = (*it).second; // whole path
|
||||||
form = (CForm*)formLoader->loadForm( filename.c_str() );
|
form = (CForm*)formLoader->loadForm( filename.c_str() );
|
||||||
if (form == NULL)
|
if (form == NULL)
|
||||||
|
|
|
@ -688,8 +688,8 @@ void CBranch_patcherDlg::OnButtonExtractTokens()
|
||||||
m_TargetDirLabel = "Target Dir";
|
m_TargetDirLabel = "Target Dir";
|
||||||
m_SrcDir = SrcDirBackup;
|
m_SrcDir = SrcDirBackup;
|
||||||
m_DestDir = TargetDirBackup;
|
m_DestDir = TargetDirBackup;
|
||||||
m_Filename = "";
|
m_Filename.Empty();
|
||||||
((CButton*)GetDlgItem( IDC_ButtonExtractTokens ))->SetWindowText( "Enter Tokens" );
|
((CButton*)GetDlgItem( IDC_ButtonExtractTokens ))->SetWindowText( _T("Enter Tokens") );
|
||||||
GetDlgItem( IDC_TopText )->ShowWindow( SW_SHOW );
|
GetDlgItem( IDC_TopText )->ShowWindow( SW_SHOW );
|
||||||
GetDlgItem( IDC_ButtonClearTokens )->EnableWindow( TRUE );
|
GetDlgItem( IDC_ButtonClearTokens )->EnableWindow( TRUE );
|
||||||
GetDlgItem( IDC_ButtonPatch )->ShowWindow( SW_SHOW );
|
GetDlgItem( IDC_ButtonPatch )->ShowWindow( SW_SHOW );
|
||||||
|
@ -703,8 +703,8 @@ void CBranch_patcherDlg::OnButtonExtractTokens()
|
||||||
|
|
||||||
void CBranch_patcherDlg::OnButtonClearTokens()
|
void CBranch_patcherDlg::OnButtonClearTokens()
|
||||||
{
|
{
|
||||||
Token1 = "";
|
Token1.Empty();
|
||||||
Token2 = "";
|
Token2.Empty();
|
||||||
displayTokens();
|
displayTokens();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -517,7 +517,7 @@ CViewDialog *CLog_analyserDlg::onAddCommon( const vector<CString>& filenames )
|
||||||
view->Filenames = filenames;
|
view->Filenames = filenames;
|
||||||
}
|
}
|
||||||
|
|
||||||
view->LogSessionStartDate = "";
|
view->LogSessionStartDate.Empty();
|
||||||
LogSessionsDialog.clear();
|
LogSessionsDialog.clear();
|
||||||
|
|
||||||
if ( ((CButton*)GetDlgItem( IDC_CheckSessions ))->GetCheck() == 1 )
|
if ( ((CButton*)GetDlgItem( IDC_CheckSessions ))->GetCheck() == 1 )
|
||||||
|
|
|
@ -213,7 +213,7 @@ void CBGDownloaderAccess::resumeBackgroundDownload()
|
||||||
//=====================================================
|
//=====================================================
|
||||||
void CBGDownloaderAccess::CDownloadCoTask::run()
|
void CBGDownloaderAccess::CDownloadCoTask::run()
|
||||||
{
|
{
|
||||||
Parent->_ErrorMsg = "";
|
Parent->_ErrorMsg.clear();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// don't restart downloader before
|
// don't restart downloader before
|
||||||
|
|
|
@ -183,7 +183,7 @@ extern UCamera MainCam;
|
||||||
////////////
|
////////////
|
||||||
// STATIC //
|
// STATIC //
|
||||||
////////////
|
////////////
|
||||||
const std::string CCharacterCL::_EmptyString = "";
|
const std::string CCharacterCL::_EmptyString;
|
||||||
const uint8 CCharacterCL::_BadHairIndex = 0xFF;
|
const uint8 CCharacterCL::_BadHairIndex = 0xFF;
|
||||||
|
|
||||||
H_AUTO_DECL ( RZ_Client_Character_CL_Update_Pos_Combat_Float )
|
H_AUTO_DECL ( RZ_Client_Character_CL_Update_Pos_Combat_Float )
|
||||||
|
|
|
@ -38,7 +38,7 @@ using namespace std;
|
||||||
/////////////
|
/////////////
|
||||||
// METHODS //
|
// METHODS //
|
||||||
/////////////
|
/////////////
|
||||||
const string CGenderInfo::UnknownItemName = "";
|
const string CGenderInfo::UnknownItemName;
|
||||||
|
|
||||||
// description of a visual slot that must be read by CGenderInfo
|
// description of a visual slot that must be read by CGenderInfo
|
||||||
struct CSlotInfo
|
struct CSlotInfo
|
||||||
|
|
|
@ -44,7 +44,7 @@ static void tokenize (const string &zeString, vector<string> &tokens)
|
||||||
if ((nextseppos1 == string::npos) && (nextseppos2 == string::npos))
|
if ((nextseppos1 == string::npos) && (nextseppos2 == string::npos))
|
||||||
{
|
{
|
||||||
tokens.push_back(sTmp);
|
tokens.push_back(sTmp);
|
||||||
sTmp = "";
|
sTmp.clear();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -5236,7 +5236,7 @@ bool CUserCommand::execute(const std::string &/* rawCommandString */, const std:
|
||||||
{
|
{
|
||||||
// Build the final string
|
// Build the final string
|
||||||
static string finalArgs;
|
static string finalArgs;
|
||||||
finalArgs = "";
|
finalArgs.clear();
|
||||||
uint i;
|
uint i;
|
||||||
uint index = 0;
|
uint index = 0;
|
||||||
const vector<string> &keywords = mode->Keywords;
|
const vector<string> &keywords = mode->Keywords;
|
||||||
|
|
|
@ -1976,7 +1976,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NewKeysCharNameValidated = "";
|
NewKeysCharNameValidated.clear();
|
||||||
|
|
||||||
NetMngr.push(out);
|
NetMngr.push(out);
|
||||||
NetMngr.send(NetMngr.getCurrentServerTick());
|
NetMngr.send(NetMngr.getCurrentServerTick());
|
||||||
|
@ -2304,8 +2304,8 @@ public:
|
||||||
|
|
||||||
virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */)
|
virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */)
|
||||||
{
|
{
|
||||||
NewKeysCharNameWanted = "";
|
NewKeysCharNameWanted.clear();
|
||||||
NewKeysCharNameValidated = "";
|
NewKeysCharNameValidated.clear();
|
||||||
GameKeySet = "keys.xml";
|
GameKeySet = "keys.xml";
|
||||||
RingEditorKeySet = "keys_r2ed.xml";
|
RingEditorKeySet = "keys_r2ed.xml";
|
||||||
First = true;
|
First = true;
|
||||||
|
@ -3121,10 +3121,10 @@ class CAHLoadScenario : public IActionHandler
|
||||||
launchScenarioFromRingAccessPoint = true;
|
launchScenarioFromRingAccessPoint = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
string rules="", level="", title="";
|
string rules, level, title;
|
||||||
string initialIsland="", initialEntryPoint="", initialSeason = "";
|
string initialIsland, initialEntryPoint, initialSeason;
|
||||||
std::string lang="", scenarioType="";
|
std::string lang, scenarioType;
|
||||||
std::string otherCharAccess="";
|
std::string otherCharAccess;
|
||||||
std::string nevraxScenario = "0";
|
std::string nevraxScenario = "0";
|
||||||
std::string trialAllowed = "0";
|
std::string trialAllowed = "0";
|
||||||
for(uint i=0; i<values.size(); i++)
|
for(uint i=0; i<values.size(); i++)
|
||||||
|
|
|
@ -170,5 +170,5 @@ bool CContextualCursor::context(const std::string &contextName, float dist, cons
|
||||||
void CContextualCursor::release()
|
void CContextualCursor::release()
|
||||||
{
|
{
|
||||||
_Contexts.clear ();
|
_Contexts.clear ();
|
||||||
_Context = "";
|
_Context.clear();
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,7 +183,7 @@ bool CEntityCL::SInstanceCL::createLoading(const string &strShapeName, const str
|
||||||
if(!Loading.empty())
|
if(!Loading.empty())
|
||||||
{
|
{
|
||||||
Scene->deleteInstance(Loading);
|
Scene->deleteInstance(Loading);
|
||||||
LoadingName = "";
|
LoadingName.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// if the new instance is NULL, then clean ALL
|
// if the new instance is NULL, then clean ALL
|
||||||
|
@ -193,7 +193,7 @@ bool CEntityCL::SInstanceCL::createLoading(const string &strShapeName, const str
|
||||||
{
|
{
|
||||||
releaseStaticFXs();
|
releaseStaticFXs();
|
||||||
Scene->deleteInstance(Current);
|
Scene->deleteInstance(Current);
|
||||||
CurrentName = "";
|
CurrentName.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// else setup into loading
|
// else setup into loading
|
||||||
|
@ -347,7 +347,7 @@ void CEntityCL::SInstanceCL::updateCurrentFromLoading(NL3D::USkeleton Skeleton)
|
||||||
if (!Current.empty())
|
if (!Current.empty())
|
||||||
{
|
{
|
||||||
Scene->deleteInstance(Current);
|
Scene->deleteInstance(Current);
|
||||||
CurrentName = "";
|
CurrentName.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -355,7 +355,7 @@ void CEntityCL::SInstanceCL::updateCurrentFromLoading(NL3D::USkeleton Skeleton)
|
||||||
Current = Loading;
|
Current = Loading;
|
||||||
CurrentName = LoadingName;
|
CurrentName = LoadingName;
|
||||||
Loading = NULL;
|
Loading = NULL;
|
||||||
LoadingName = "";
|
LoadingName.clear();
|
||||||
|
|
||||||
|
|
||||||
// If there is a skeleton, bind the skin to the skeleton.
|
// If there is a skeleton, bind the skin to the skeleton.
|
||||||
|
@ -533,7 +533,6 @@ CEntityCL::CEntityCL()
|
||||||
_SelectionFX = NULL;
|
_SelectionFX = NULL;
|
||||||
_MouseOverFX = NULL;
|
_MouseOverFX = NULL;
|
||||||
_StateFX = NULL;
|
_StateFX = NULL;
|
||||||
_StateFXName = "";
|
|
||||||
_GMTitle = _InvalidGMTitleCode;
|
_GMTitle = _InvalidGMTitleCode;
|
||||||
_LastLocalSelectBoxComputeTime = 0;
|
_LastLocalSelectBoxComputeTime = 0;
|
||||||
_InSceneInterfaceEnabled = true;
|
_InSceneInterfaceEnabled = true;
|
||||||
|
@ -603,7 +602,7 @@ CEntityCL::~CEntityCL()
|
||||||
if (!_StateFX.empty() && Scene)
|
if (!_StateFX.empty() && Scene)
|
||||||
{
|
{
|
||||||
Scene->deleteInstance(_StateFX);
|
Scene->deleteInstance(_StateFX);
|
||||||
_StateFXName = "";
|
_StateFXName.clear();
|
||||||
}
|
}
|
||||||
if (!_SelectionFX.empty() && Scene)
|
if (!_SelectionFX.empty() && Scene)
|
||||||
{
|
{
|
||||||
|
@ -751,7 +750,7 @@ void CEntityCL::init()
|
||||||
_GroundTypeCache= 0;
|
_GroundTypeCache= 0;
|
||||||
|
|
||||||
_StateFX = NULL;
|
_StateFX = NULL;
|
||||||
_StateFXName = "";
|
_StateFXName.clear();
|
||||||
_SelectionFX = NULL;
|
_SelectionFX = NULL;
|
||||||
_MouseOverFX = NULL;
|
_MouseOverFX = NULL;
|
||||||
|
|
||||||
|
@ -3599,7 +3598,7 @@ void CEntityCL::removeStateFx()
|
||||||
if (!_StateFX.empty() && Scene)
|
if (!_StateFX.empty() && Scene)
|
||||||
{
|
{
|
||||||
Scene->deleteInstance(_StateFX);
|
Scene->deleteInstance(_StateFX);
|
||||||
_StateFXName = "";
|
_StateFXName.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue