summaryrefslogtreecommitdiffstats
path: root/tests/arthur/common
diff options
context:
space:
mode:
authoraavit <qt-info@nokia.com>2010-09-07 08:22:12 (GMT)
committeraavit <qt-info@nokia.com>2010-09-07 08:22:12 (GMT)
commitc142da9f1573738bb0c9e4c728bab4b3c2c8f438 (patch)
tree0fd9a4d6fc1c26fe408ee89644f63077a2a3f598 /tests/arthur/common
parent01bc165834ed9dbe7e9c97a7ae988509d86a9312 (diff)
downloadQt-c142da9f1573738bb0c9e4c728bab4b3c2c8f438.zip
Qt-c142da9f1573738bb0c9e4c728bab4b3c2c8f438.tar.gz
Qt-c142da9f1573738bb0c9e4c728bab4b3c2c8f438.tar.bz2
Minor style improvements
Diffstat (limited to 'tests/arthur/common')
-rw-r--r--tests/arthur/common/baselineprotocol.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/tests/arthur/common/baselineprotocol.cpp b/tests/arthur/common/baselineprotocol.cpp
index 7a423d2..24b5b8c 100644
--- a/tests/arthur/common/baselineprotocol.cpp
+++ b/tests/arthur/common/baselineprotocol.cpp
@@ -1,4 +1,3 @@
-
#include "baselineprotocol.h"
#include <QLibraryInfo>
#include <QImage>
@@ -40,16 +39,13 @@ ImageItem &ImageItem::operator=(const ImageItem &other)
// Defined in lookup3.c:
void hashword2 (
-const quint32 *k, /* the key, an array of quint32 values */
-size_t length, /* the length of the key, in quint32s */
-quint32 *pc, /* IN: seed OUT: primary hash value */
-quint32 *pb); /* IN: more seed OUT: secondary hash value */
+const quint32 *k, /* the key, an array of quint32 values */
+size_t length, /* the length of the key, in quint32s */
+quint32 *pc, /* IN: seed OUT: primary hash value */
+quint32 *pb); /* IN: more seed OUT: secondary hash value */
quint64 ImageItem::computeChecksum(const QImage &image)
{
- quint32 h1 = 0xfeedbacc;
- quint32 h2 = 0x21604894;
-
QImage img(image);
const int bpl = img.bytesPerLine();
const int padBytes = bpl - (img.width() * img.depth() / 8);
@@ -68,6 +64,8 @@ quint64 ImageItem::computeChecksum(const QImage &image)
*p++ &= RGB_MASK;
}
+ quint32 h1 = 0xfeedbacc;
+ quint32 h2 = 0x21604894;
hashword2((const quint32 *)img.constBits(), img.byteCount()/4, &h1, &h2);
return (quint64(h1) << 32) | h2;
}