mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-12 12:14:48 +00:00
Changed: Minor changes
This commit is contained in:
parent
6eed3289d0
commit
2523f78805
2 changed files with 22 additions and 18 deletions
|
@ -2607,8 +2607,8 @@ CPSLocatedBindable *CPSLocated::unbind(uint index)
|
||||||
CPSLocatedBindable *lb = _LocatedBoundCont[index];
|
CPSLocatedBindable *lb = _LocatedBoundCont[index];
|
||||||
lb->setOwner(NULL);
|
lb->setOwner(NULL);
|
||||||
_LocatedBoundCont.erase(_LocatedBoundCont.begin() + index);
|
_LocatedBoundCont.erase(_LocatedBoundCont.begin() + index);
|
||||||
return lb;
|
|
||||||
CHECK_PS_INTEGRITY
|
CHECK_PS_INTEGRITY
|
||||||
|
return lb;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// ***************************************************************************************
|
/// ***************************************************************************************
|
||||||
|
|
|
@ -17,6 +17,10 @@
|
||||||
#include "stdmisc.h"
|
#include "stdmisc.h"
|
||||||
#include "nel/misc/sstring.h"
|
#include "nel/misc/sstring.h"
|
||||||
|
|
||||||
|
#ifdef DEBUG_NEW
|
||||||
|
#define new DEBUG_NEW
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace NLMISC
|
namespace NLMISC
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -225,14 +229,14 @@ namespace NLMISC
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// iterate from size-2 to 1
|
// iterate from size-2 to 1
|
||||||
for (uint32 i=(uint32)size()-1; --i;)
|
for (uint i=(uint)size()-1; --i;)
|
||||||
if (!isValidFileNameChar((*this)[i]) && (*this)[i]!=' ')
|
if (!isValidFileNameChar((*this)[i]) && (*this)[i]!=' ')
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// iterate from size-1 to 0
|
// iterate from size-1 to 0
|
||||||
for (uint32 i=(uint32)size(); i--;)
|
for (uint i=(uint)size(); i--;)
|
||||||
if (!isValidFileNameChar((*this)[i]))
|
if (!isValidFileNameChar((*this)[i]))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -253,7 +257,7 @@ namespace NLMISC
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// iterate from size-1 to 1
|
// iterate from size-1 to 1
|
||||||
for (uint32 i=(uint32)size(); --i;)
|
for (uint i=(uint)size(); --i;)
|
||||||
if (!isValidKeywordChar((*this)[i]))
|
if (!isValidKeywordChar((*this)[i]))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -489,9 +493,9 @@ namespace NLMISC
|
||||||
CSString s=strip();
|
CSString s=strip();
|
||||||
while(!s.empty())
|
while(!s.empty())
|
||||||
{
|
{
|
||||||
uint32 pre=(uint32)s.size();
|
uint pre=(uint)s.size();
|
||||||
result.push_back(s.firstWord(true));
|
result.push_back(s.firstWord(true));
|
||||||
uint32 post=(uint32)s.size();
|
uint post=(uint)s.size();
|
||||||
if (post>=pre)
|
if (post>=pre)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -503,9 +507,9 @@ namespace NLMISC
|
||||||
CSString s=*this;
|
CSString s=*this;
|
||||||
while(!s.empty())
|
while(!s.empty())
|
||||||
{
|
{
|
||||||
uint32 pre=(uint32)s.size();
|
uint pre=(uint)s.size();
|
||||||
result.push_back(s.firstWordOrWords(true,useSlashStringEscape,useRepeatQuoteStringEscape));
|
result.push_back(s.firstWordOrWords(true,useSlashStringEscape,useRepeatQuoteStringEscape));
|
||||||
uint32 post=(uint32)s.size();
|
uint post=(uint)s.size();
|
||||||
if (post>=pre)
|
if (post>=pre)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -520,8 +524,8 @@ namespace NLMISC
|
||||||
if (s.contains('\r'))
|
if (s.contains('\r'))
|
||||||
s=s.replace("\r","");
|
s=s.replace("\r","");
|
||||||
|
|
||||||
uint32 it=0;
|
uint it=0;
|
||||||
uint32 len= (uint32)s.size();
|
uint len= (uint)s.size();
|
||||||
while(it<len)
|
while(it<len)
|
||||||
{
|
{
|
||||||
// extract the text up to the next '\n'character
|
// extract the text up to the next '\n'character
|
||||||
|
@ -542,12 +546,12 @@ namespace NLMISC
|
||||||
CSString s=*this;
|
CSString s=*this;
|
||||||
while(!s.empty())
|
while(!s.empty())
|
||||||
{
|
{
|
||||||
uint32 pre=(uint32)s.size();
|
uint pre=(uint)s.size();
|
||||||
result.push_back(s.splitToSeparator(separator,true,useAngleBrace,useSlashStringEscape,
|
result.push_back(s.splitToSeparator(separator,true,useAngleBrace,useSlashStringEscape,
|
||||||
useRepeatQuoteStringEscape,true));
|
useRepeatQuoteStringEscape,true));
|
||||||
if (skipBlankEntries && result.back().empty())
|
if (skipBlankEntries && result.back().empty())
|
||||||
result.pop_back();
|
result.pop_back();
|
||||||
uint32 post=(uint32)s.size();
|
uint post=(uint)s.size();
|
||||||
if (post>=pre)
|
if (post>=pre)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -568,7 +572,7 @@ namespace NLMISC
|
||||||
|
|
||||||
while(!s.empty())
|
while(!s.empty())
|
||||||
{
|
{
|
||||||
uint32 pre=(uint32)s.size();
|
uint pre=(uint)s.size();
|
||||||
result.push_back(s.splitToOneOfSeparators( separators,true,useAngleBrace,useSlashStringEscape,
|
result.push_back(s.splitToOneOfSeparators( separators,true,useAngleBrace,useSlashStringEscape,
|
||||||
useRepeatQuoteStringEscape,!retainSeparators ));
|
useRepeatQuoteStringEscape,!retainSeparators ));
|
||||||
|
|
||||||
|
@ -586,7 +590,7 @@ namespace NLMISC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 post=(uint32)s.size();
|
uint post=(uint)s.size();
|
||||||
if (post>=pre)
|
if (post>=pre)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -716,7 +720,7 @@ namespace NLMISC
|
||||||
for (i=0;i<size();++i)
|
for (i=0;i<size();++i)
|
||||||
{
|
{
|
||||||
// perform a quick string compare
|
// perform a quick string compare
|
||||||
int j;
|
uint j;
|
||||||
for (j=0;s[j]!=0 && s[j]==(&((*this)[i]))[j];++j)
|
for (j=0;s[j]!=0 && s[j]==(&((*this)[i]))[j];++j)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -1022,7 +1026,7 @@ namespace NLMISC
|
||||||
}
|
}
|
||||||
else if ((*this)[0]=='\"' && isDelimitedMonoBlock(false,useSlashStringEscape,useRepeatQuoteStringEscape))
|
else if ((*this)[0]=='\"' && isDelimitedMonoBlock(false,useSlashStringEscape,useRepeatQuoteStringEscape))
|
||||||
{
|
{
|
||||||
i=(uint32)size();
|
i=(uint)size();
|
||||||
}
|
}
|
||||||
if (i!=size())
|
if (i!=size())
|
||||||
return quote(useSlashStringEscape,useRepeatQuoteStringEscape);
|
return quote(useSlashStringEscape,useRepeatQuoteStringEscape);
|
||||||
|
@ -1224,7 +1228,7 @@ namespace NLMISC
|
||||||
{
|
{
|
||||||
bool foundToken= false;
|
bool foundToken= false;
|
||||||
|
|
||||||
for (uint32 i=(uint32)size();i--;)
|
for (uint i=(uint)size();i--;)
|
||||||
{
|
{
|
||||||
switch((*this)[i])
|
switch((*this)[i])
|
||||||
{
|
{
|
||||||
|
@ -1274,7 +1278,7 @@ namespace NLMISC
|
||||||
|
|
||||||
bool CSString::isXMLCompatible(bool isParameter) const
|
bool CSString::isXMLCompatible(bool isParameter) const
|
||||||
{
|
{
|
||||||
for (uint32 i=(uint32)size();i--;)
|
for (uint i=(uint)size();i--;)
|
||||||
{
|
{
|
||||||
switch((*this)[i])
|
switch((*this)[i])
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue