using reserve where possible
This commit is contained in:
parent
55d5f99575
commit
f86e38ef12
@ -34,9 +34,14 @@ class ListBox : public QskSimpleListBox
|
||||
private:
|
||||
void populate()
|
||||
{
|
||||
const int count = 10000;
|
||||
|
||||
const QString format( "Row %1: The quick brown fox jumps over the lazy dog" );
|
||||
|
||||
QStringList entries;
|
||||
for ( int i = 0; i < 10000; i++ )
|
||||
entries.reserve( count );
|
||||
|
||||
for ( int i = 0; i < count; i++ )
|
||||
{
|
||||
entries += format.arg( i + 1 );
|
||||
}
|
||||
|
@ -182,6 +182,7 @@ static inline QskGradientStops qskExtractedStops(
|
||||
static inline QskGradientStops qskGradientStops( const QGradientStops& qtStops )
|
||||
{
|
||||
QskGradientStops stops;
|
||||
stops.reserve( qtStops.count() );
|
||||
|
||||
for ( const auto& s : qtStops )
|
||||
stops += QskGradientStop( s.first, s.second );
|
||||
|
Loading…
x
Reference in New Issue
Block a user