summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/qmf/engine/SchemaImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/cpp/src/qmf/engine/SchemaImpl.cpp')
-rw-r--r--qpid/cpp/src/qmf/engine/SchemaImpl.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/qpid/cpp/src/qmf/engine/SchemaImpl.cpp b/qpid/cpp/src/qmf/engine/SchemaImpl.cpp
index f75663e131..e0948a9911 100644
--- a/qpid/cpp/src/qmf/engine/SchemaImpl.cpp
+++ b/qpid/cpp/src/qmf/engine/SchemaImpl.cpp
@@ -55,12 +55,9 @@ void SchemaHash::update(uint8_t data)
void SchemaHash::update(const char* data, uint32_t len)
{
- union h {
- uint8_t b[16];
- uint64_t q[2];
- }* h = reinterpret_cast<union h*>(&hash[0]);
- uint64_t* first = &h->q[0];
- uint64_t* second = &h->q[1];
+ uint64_t* first = (uint64_t*) hash;
+ uint64_t* second = (uint64_t*) hash + 1;
+
for (uint32_t idx = 0; idx < len; idx++) {
*first = *first ^ (uint64_t) data[idx];
*second = *second << 1;