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