diff --git a/src/kits/tracker/IconCache.cpp b/src/kits/tracker/IconCache.cpp index 7cf444ba44..f54f602665 100644 --- a/src/kits/tracker/IconCache.cpp +++ b/src/kits/tracker/IconCache.cpp @@ -1569,16 +1569,7 @@ NodeCacheEntry::Hash() const uint32 NodeCacheEntry::Hash(const node_ref *node) { - struct hasher { - uint32 int1; - uint32 int2; - uint32 int3; - } *tmp; - - STATIC_ASSERT(sizeof(hasher) == sizeof(node_ref)); - - tmp = (hasher *)node; - return tmp->int1 ^ tmp->int2 ^ tmp->int3; + return node->device ^ ((uint32 *)&node->node)[0] ^ ((uint32 *)&node->node)[1]; } diff --git a/src/kits/tracker/OpenHashTable.h b/src/kits/tracker/OpenHashTable.h index ba9a7bf15d..09858541f1 100644 --- a/src/kits/tracker/OpenHashTable.h +++ b/src/kits/tracker/OpenHashTable.h @@ -37,8 +37,8 @@ All rights reserved. #ifndef __OPEN_HASH_TABLE__ #define __OPEN_HASH_TABLE__ -#include -#include +#include +#include namespace BPrivate { @@ -259,7 +259,7 @@ OpenHashElementArray::OpenHashElementArray(int32 initialSize) { fData = (Element *)calloc((size_t)initialSize , sizeof(Element)); if (!fData) - throw bad_alloc(); + throw std::bad_alloc(); } @@ -337,7 +337,7 @@ OpenHashElementArray::Add() int32 newSize = fSize + kGrowChunk; Element *newData = (Element *)calloc((size_t)newSize , sizeof(Element)); if (!newData) - throw bad_alloc(); + throw std::bad_alloc(); memcpy(newData, fData, fSize * sizeof(Element)); free(fData); fData = newData; diff --git a/src/kits/tracker/PoseView.cpp b/src/kits/tracker/PoseView.cpp index e3a4ad7884..72b26b68cd 100644 --- a/src/kits/tracker/PoseView.cpp +++ b/src/kits/tracker/PoseView.cpp @@ -90,6 +90,10 @@ All rights reserved. #include "WidgetAttributeText.h" +using std::min; +using std::max; + + const float kDoubleClickTresh = 6; const float kCountViewWidth = 62;