From c142da9f1573738bb0c9e4c728bab4b3c2c8f438 Mon Sep 17 00:00:00 2001 From: aavit Date: Tue, 7 Sep 2010 10:22:12 +0200 Subject: Minor style improvements --- tests/arthur/common/baselineprotocol.cpp | 14 ++++++-------- 1 file 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 #include @@ -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; } -- cgit v0.12