avoided some unneeded conversions of string::npos, minor cleanup of className

- string doesn't use any debug info, remove it
- restructured the macros to add in NoDebug macro versions to className,
  typeInfo.  Might be helpful with tackling the globals bootstrapping issue.
- HashTableName + StaticHashTableName - avoid lookup of debug switch when
  FULLDEBUG is not defined
This commit is contained in:
Mark Olesen
2009-01-09 15:15:21 +01:00
parent f0341171ff
commit b85c9a7487
12 changed files with 212 additions and 47 deletions

View File

@ -217,7 +217,7 @@ void error::printStack(Ostream& os)
string::size_type lPos = msg.find('[');
string::size_type rPos = msg.find(']');
if (lPos != string::npos && rPos != string::npos && lPos<rPos)
if (lPos != string::npos && rPos != string::npos && lPos < rPos)
{
address = msg.substr(lPos+1, rPos-lPos-1);
msg = msg.substr(0, lPos);
@ -232,7 +232,7 @@ void error::printStack(Ostream& os)
// not an absolute path
if (programFile[0] != '/')
{
string tmp = pOpen("which "+programFile);
string tmp = pOpen("which " + programFile);
if (tmp[0] == '/' || tmp[0] == '~')
{
programFile = tmp;
@ -243,13 +243,13 @@ void error::printStack(Ostream& os)
string::size_type bracketPos = msg.find('(');
if (bracketPos != string::size_type(string::npos))
if (bracketPos != string::npos)
{
string::size_type start = bracketPos+1;
string::size_type plusPos = msg.find('+', start);
if (plusPos != string::size_type(string::npos))
if (plusPos != string::npos)
{
string cName(msg.substr(start, plusPos-start));
@ -276,7 +276,7 @@ void error::printStack(Ostream& os)
{
string::size_type endBracketPos = msg.find(')', start);
if (endBracketPos != string::size_type(string::npos))
if (endBracketPos != string::npos)
{
string fullName(msg.substr(start, endBracketPos-start));