From: Eunki Hong Date: Sun, 7 Jan 2024 00:50:10 +0000 (+0900) Subject: Fix miss implementation of hash salt X-Git-Tag: dali_2.3.6~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9a527c5307b01e81d80ec8e11c18c474afdd23ca;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git Fix miss implementation of hash salt sizeof(T) return as byte. But previous hash function use it like bit. Change-Id: Ia4378a0bb40aca4928a127be4e2adc6db1b84e7f Signed-off-by: Eunki Hong --- diff --git a/dali/internal/graphics/gles-impl/gles-context.cpp b/dali/internal/graphics/gles-impl/gles-context.cpp index dbdb318..e92b8bd 100644 --- a/dali/internal/graphics/gles-impl/gles-context.cpp +++ b/dali/internal/graphics/gles-impl/gles-context.cpp @@ -63,10 +63,10 @@ struct Context::Impl // Make unordered hash value by location. // Note : This hash function varified for locations only under < 20. std::size_t salt = attr.location + 1; - hash += salt << (sizeof(std::size_t) * 3 / 4); + hash += salt << (sizeof(std::size_t) * 6); salt *= salt; salt ^= attr.location; - hash += salt << (sizeof(std::size_t) / 2); + hash += salt << (sizeof(std::size_t) * 4); salt *= salt; hash += salt; }