godot/modules
Hein-Pieter van Braam b696beea65 Correct hash behavior for floating point numbers
This fixes HashMap where a key or part of a key is a floating point
number. To fix this the following has been done:

* HashMap now takes an extra template argument Comparator. This class
gets used to compare keys. The default Comperator now works correctly
for common types and floating point numbets.

* Variant implements ::hash_compare() now. This function implements
nan-safe comparison for all types with components that contain floating
point numbers.

* Variant now has a VariantComparator which uses Variant::hash_compare()
safely compare floating point components of variant's types.

* The hash functions for floating point numbers will now normalize NaN
values so that all floating point numbers that are NaN hash to the same
value.

C++ module writers that want to use HashMap internally in their modules
can now also safeguard against this crash by defining their on
Comperator class that safely compares their types.

GDScript users, or writers of modules that don't use HashMap internally
in their modules don't need to do anything.

This fixes #7354 and fixes #6947.
2017-02-16 18:44:29 +01:00
..
cscript renamed joystick to joypad everywhere around source code! 2017-01-08 17:06:33 -03:00
dds Style: Fix whole-line commented code 2017-01-14 14:52:23 +01:00
enet Rename the _MD macro to D_METHOD 2017-02-13 12:50:02 +01:00
etc1 Several bugfixes, improving the import workflow 2017-02-06 00:38:39 -03:00
freetype Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
gdscript Correct hash behavior for floating point numbers 2017-02-16 18:44:29 +01:00
gridmap Many fixes to make exported scenes work better, still buggy. 2017-02-15 08:34:02 -03:00
jpg Memory pool vectors (DVector) have been enormously simplified in code, and renamed to PoolVector 2017-01-07 18:26:38 -03:00
ogg Oops! Audio engine has vanished :D 2017-01-15 16:07:51 -03:00
openssl removed duplicated functions in class hierarchy that were bound more than once 2017-01-14 11:10:42 -03:00
opus Oops! Audio engine has vanished :D 2017-01-15 16:07:51 -03:00
pbm rename String.extension() -> String.get_extension() / String.basename() -> String.get_basename() 2017-01-14 00:51:09 -03:00
pvr Style: Various fixes to play nice with clang-format 2017-01-16 08:49:52 +01:00
regex Rename the _MD macro to D_METHOD 2017-02-13 12:50:02 +01:00
squish Several bugfixes, improving the import workflow 2017-02-06 00:38:39 -03:00
stb_vorbis Rename the _MD macro to D_METHOD 2017-02-13 12:50:02 +01:00
theora Style: No break before list brace 2017-01-16 08:48:24 +01:00
visual_script Rename the _MD macro to D_METHOD 2017-02-13 12:50:02 +01:00
vorbis Style: Various fixes to play nice with clang-format 2017-01-16 08:49:52 +01:00
webm Oops! Audio engine has vanished :D 2017-01-15 16:07:51 -03:00
webp Memory pool vectors (DVector) have been enormously simplified in code, and renamed to PoolVector 2017-01-07 18:26:38 -03:00
register_module_types.h Welcome in 2017, dear changelog reader! 2017-01-01 22:03:33 +01:00
SCsub style: Fix PEP8 whitespace issues in Python files 2016-11-01 00:35:16 +01:00