[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: Re: extragear/multimedia/amarok/src/collection/sqlcollection
From: André_Wöbbeking <Woebbeking () kde ! org>
Date: 2008-11-27 22:34:00
Message-ID: 200811272334.00955.Woebbeking () kde ! org
[Download RAW message or body]
On Thursday 27 November 2008, Mark Kretschmann wrote:
> SVN commit 889599 by markey:
>
> Allocate output buffer for MySQL escaping on the stack. This should
> be a bit faster than dynamic memory allocation.
>
> M +4 -6 MySqlEmbeddedCollection.cpp
>
>
> ---
> trunk/extragear/multimedia/amarok/src/collection/sqlcollection/MySqlE
>mbeddedCollection.cpp #889598:889599 @@ -268,15 +268,13 @@
> MySqlEmbeddedCollection::escape( QString text ) const
> {
> const QByteArray utfText = text.toUtf8();
> - long unsigned int length = utfText.length() * 2 + 1;
> - char* to = new char[length];
> + const int length = utfText.length() * 2 + 1;
> + char outputBuffer[length];
Could you use QVarLengthArray to make it compile with -pedantic?
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic