Форматирование
This commit is contained in:
parent
1d5707399f
commit
2964f29139
@ -38,8 +38,7 @@ int slowFunction()
|
||||
constexpr int size = 16 * 1024;
|
||||
double a[size];
|
||||
|
||||
for ( int i = 0; i < size; i++ )
|
||||
{
|
||||
for ( int i = 0; i < size; i++ ) {
|
||||
a[i] = QRandomGenerator::global()->bounded( 4 );
|
||||
for ( int j = 0; j < i; j++ ) a[i] += sin( a[j] );
|
||||
a[0] += a[i];
|
||||
@ -56,8 +55,7 @@ int fastFunction()
|
||||
constexpr int size = 8 * 1024;
|
||||
double a[size];
|
||||
|
||||
for ( int i = 0; i < size; i++ )
|
||||
{
|
||||
for ( int i = 0; i < size; i++ ) {
|
||||
a[i] = QRandomGenerator::global()->bounded( 4 );
|
||||
for ( int j = 0; j < i; j++ ) a[i] += sin( a[j] );
|
||||
a[0] += a[i];
|
||||
@ -80,21 +78,18 @@ int main( int argc, char** argv )
|
||||
QList< int > il;
|
||||
|
||||
il << 111 << 222;
|
||||
Q_FOREACH ( int i, il )
|
||||
{
|
||||
Q_FOREACH ( int i, il ) {
|
||||
qDebug() << i;
|
||||
}
|
||||
|
||||
QStringList sl;
|
||||
|
||||
sl << QStringLiteral("111") << QStringLiteral("222");
|
||||
for ( const auto &s: qAsConst(sl) )
|
||||
{
|
||||
sl << QStringLiteral( "111" ) << QStringLiteral( "222" );
|
||||
for ( const auto& s: qAsConst( sl ) ) {
|
||||
qDebug() << s;
|
||||
}
|
||||
|
||||
for ( auto s: qAsConst( sl ) )
|
||||
{
|
||||
for ( auto s: qAsConst( sl ) ) {
|
||||
s.append( "0" );
|
||||
}
|
||||
|
||||
@ -104,7 +99,7 @@ int main( int argc, char** argv )
|
||||
QFile* f = new QFile();
|
||||
Processor p;
|
||||
|
||||
QObject::connect( &app, &QCoreApplication::aboutToQuit, &p, &Processor::process);
|
||||
QObject::connect( &app, &QCoreApplication::aboutToQuit, &p, &Processor::process );
|
||||
QTimer::singleShot( 100, &app, SLOT(quit()));
|
||||
|
||||
#ifdef PROFILE
|
||||
|
Loading…
x
Reference in New Issue
Block a user