diff options
author | Jeremie Guichard <djebrest@gmail.com> | 2017-03-09 23:07:30 +0700 |
---|---|---|
committer | Jeremie Guichard <djebrest@gmail.com> | 2017-03-09 23:07:30 +0700 |
commit | 2b06a0b2234cf2779f80e87038011067be282bcb (patch) | |
tree | 7532b11736a5eaedb3ceddf3e85ee423948d47ce /dives/TestDiveDM4.xml | |
parent | 406e4287eb96e10ddfd22163f0e863e353470c68 (diff) | |
download | subsurface-2b06a0b2234cf2779f80e87038011067be282bcb.tar.gz |
Fix potential double/float to int rounding errors
Not using lrint(f) when converting double/float to int
creates rounding errors.
This error was detected by TestParse::testParseDM4 failure
on Windows. It was creating rounding inconsistencies
on Linux too, see change in TestDiveDM4.xml.
Enable -Wfloat-conversion for gcc version greater than 4.9.0
Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
Diffstat (limited to 'dives/TestDiveDM4.xml')
-rw-r--r-- | dives/TestDiveDM4.xml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dives/TestDiveDM4.xml b/dives/TestDiveDM4.xml index f660cfbc3..2e00cd767 100644 --- a/dives/TestDiveDM4.xml +++ b/dives/TestDiveDM4.xml @@ -141,7 +141,7 @@ <sample time='42:00 min' depth='16.07 m' pressure='91.15 bar' /> <sample time='42:20 min' depth='15.95 m' pressure='90.42 bar' /> <sample time='42:40 min' depth='16.24 m' pressure='89.9 bar' /> - <sample time='43:00 min' depth='16.379 m' pressure='88.92 bar' /> + <sample time='43:00 min' depth='16.38 m' pressure='88.92 bar' /> <sample time='43:20 min' depth='16.67 m' pressure='88.2 bar' /> <sample time='43:40 min' depth='16.61 m' pressure='87.41 bar' /> <sample time='44:00 min' depth='17.17 m' pressure='86.42 bar' /> |