Minor style fixups.

Add spaces where necessary, and pull braces back to the same line.

Change-Id: If543686c9727a110f8a91f1a88e08d5d2ac12284
Reviewed-by: Richard J. Moore <rich@kde.org>
bb10
Robin Burchell 2012-01-21 13:54:36 +02:00 committed by Qt by Nokia
parent 3b42024fcc
commit 642155703e
1 changed files with 12 additions and 17 deletions

View File

@ -105,29 +105,24 @@ QVector<DataType> generateData(QString dataSetType, const int length)
{
QVector<DataType> container;
if (dataSetType == "Random") {
for(int i=0; i < length; ++i)
for (int i = 0; i < length; ++i)
container.append(rand());
}
else if (dataSetType == "Ascending") {
for (int i=0; i < length; ++i)
} else if (dataSetType == "Ascending") {
for (int i = 0; i < length; ++i)
container.append(i);
}
else if (dataSetType == "Descending") {
for (int i=0; i < length; ++i)
} else if (dataSetType == "Descending") {
for (int i = 0; i < length; ++i)
container.append(length - i);
}
else if (dataSetType == "Equal") {
for (int i=0; i < length; ++i)
} else if (dataSetType == "Equal") {
for (int i = 0; i < length; ++i)
container.append(43);
}
else if (dataSetType == "Duplicates") {
for (int i=0; i < length; ++i)
} else if (dataSetType == "Duplicates") {
for (int i = 0; i < length; ++i)
container.append(i % 10);
}
else if (dataSetType == "Almost Sorted") {
for (int i=0; i < length; ++i)
} else if (dataSetType == "Almost Sorted") {
for (int i = 0; i < length; ++i)
container.append(i);
for(int i = 0; i<= length / 10; ++i) {
for (int i = 0; i <= length / 10; ++i) {
const int iswap = i * 9;
DataType tmp = container.at(iswap);
container[iswap] = container.at(iswap + 1);