[PATCH] dom_string valgrinf warning
David Faure
dfaure at trolltech.com
Thu Jul 3 18:02:45 BST 2003
On Thursday 03 July 2003 16:24, Luciano Montanaro wrote:
> const QChar *b = bs.unicode();
> if ( a == b ) return false;
> if ( !( a && b ) ) return true;
> + if ( l != bs.length() ) return true;
Looks good (fast)
> @@ -241,6 +242,7 @@ bool DOM::strcasecmp( const DOMString &a
> const QChar *a = as.unicode();
> int l = as.length();
> if ( !bs ) return ( l != 0 );
> + if ( l != strlen(bs) ) return true;
Looks slow - what about checking *bs inside the loop, instead?
--
David FAURE, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
Qtella users - stability patches at http://blackie.dk/~dfaure/qtella.html
More information about the kfm-devel
mailing list