Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenlib/BLI_color.hh')
-rw-r--r--source/blender/blenlib/BLI_color.hh16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/blenlib/BLI_color.hh b/source/blender/blenlib/BLI_color.hh
index 265013c0013..72caa5b1118 100644
--- a/source/blender/blenlib/BLI_color.hh
+++ b/source/blender/blenlib/BLI_color.hh
@@ -62,12 +62,12 @@ struct Color4f {
return !(a == b);
}
- uint32_t hash() const
+ uint64_t hash() const
{
- uint32_t x1 = *(uint32_t *)&r;
- uint32_t x2 = *(uint32_t *)&g;
- uint32_t x3 = *(uint32_t *)&b;
- uint32_t x4 = *(uint32_t *)&a;
+ uint64_t x1 = *(uint32_t *)&r;
+ uint64_t x2 = *(uint32_t *)&g;
+ uint64_t x3 = *(uint32_t *)&b;
+ uint64_t x4 = *(uint32_t *)&a;
return (x1 * 1283591) ^ (x2 * 850177) ^ (x3 * 735391) ^ (x4 * 442319);
}
};
@@ -119,10 +119,10 @@ struct Color4b {
return !(a == b);
}
- uint32_t hash() const
+ uint64_t hash() const
{
- return ((uint32_t)r * 1283591) ^ ((uint32_t)g * 850177) ^ ((uint32_t)b * 735391) ^
- ((uint32_t)a * 442319);
+ return ((uint64_t)r * 1283591) ^ ((uint64_t)g * 850177) ^ ((uint64_t)b * 735391) ^
+ ((uint64_t)a * 442319);
}
};