summaryrefslogtreecommitdiffstats
path: root/qtools
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2008-01-23 21:30:39 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2008-01-23 21:30:39 (GMT)
commit0e922bf35ccff96ec03f22df607f3b44303206eb (patch)
treed75127a33593cfe4d77e951e6df541294dc1e9b4 /qtools
parent974f9e82c84412f1b51aff41f21f635f5fb84d9d (diff)
downloadDoxygen-0e922bf35ccff96ec03f22df607f3b44303206eb.zip
Doxygen-0e922bf35ccff96ec03f22df607f3b44303206eb.tar.gz
Doxygen-0e922bf35ccff96ec03f22df607f3b44303206eb.tar.bz2
Release-1.5.4-20080123
Diffstat (limited to 'qtools')
-rw-r--r--qtools/qcstring.cpp2
-rw-r--r--qtools/qcstring.h1
-rw-r--r--qtools/scstring.cpp4
3 files changed, 4 insertions, 3 deletions
diff --git a/qtools/qcstring.cpp b/qtools/qcstring.cpp
index e0e53e4..c3aad40 100644
--- a/qtools/qcstring.cpp
+++ b/qtools/qcstring.cpp
@@ -466,7 +466,7 @@ QCString QCString::simplifyWhiteSpace() const
QCString &QCString::insert( uint index, const char *s )
{
- int len = qstrlen(s);
+ int len = s ? qstrlen(s) : 0;
if ( len == 0 )
return *this;
uint olen = length();
diff --git a/qtools/qcstring.h b/qtools/qcstring.h
index 8df3bfd..ef1189a 100644
--- a/qtools/qcstring.h
+++ b/qtools/qcstring.h
@@ -295,6 +295,7 @@ inline void QCString::duplicate( const char *str)
inline QCString &QCString::duplicate( const char *str, int)
{
+ if (m_data==str) return *this;
if (m_data) free(m_data);
duplicate(str);
return *this;
diff --git a/qtools/scstring.cpp b/qtools/scstring.cpp
index 5632f57..4a02320 100644
--- a/qtools/scstring.cpp
+++ b/qtools/scstring.cpp
@@ -84,6 +84,7 @@ SCString::~SCString()
SCString &SCString::assign( const char *str )
{
+ if (m_data==str) return *this;
if (m_data) free(m_data);
duplicate(str);
return *this;
@@ -562,8 +563,7 @@ SCString &SCString::replace( const QRegExp &rx, const char *str )
QString d = QString::fromLatin1( m_data );
QString r = QString::fromLatin1( str );
d.replace( rx, r );
- operator=( d.ascii() );
- return *this;
+ return assign(d.ascii());
}
long SCString::toLong( bool *ok ) const