diff options
Diffstat (limited to 'source/blender/blenlib/BLI_hash.hh')
-rw-r--r-- | source/blender/blenlib/BLI_hash.hh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_hash.hh b/source/blender/blenlib/BLI_hash.hh index 49e619ff1bc..5cd4ce3c1a9 100644 --- a/source/blender/blenlib/BLI_hash.hh +++ b/source/blender/blenlib/BLI_hash.hh @@ -154,6 +154,13 @@ template<> struct DefaultHash<float> { } }; +template<> struct DefaultHash<bool> { + uint32_t operator()(bool value) const + { + return (uint32_t)(value != false) * 1298191; + } +}; + inline uint32_t hash_string(StringRef str) { uint32_t hash = 5381; |