Records saving

Everything about development and the OpenMW source code.
Chris
Posts: 1626
Joined: 04 Sep 2011, 08:33

Re: Records saving

Post by Chris »

werdanith wrote:That's why I said I don't know what to do about it. This requires either the ESM_Context struct to be rewritten or a function that converts floats that pretend to be ints into real floats.
Perhaps just treat the version like a 4-byte enum with specific recognized values. No floats. Floating-point equality is a really tricky thing anyway when dealing with numbers that aren't exactly representable. Some compilers even throw warnings about using ==, <=, >= or != with floats.
User avatar
werdanith
Posts: 295
Joined: 26 Aug 2011, 16:18

Re: Records saving

Post by werdanith »

Chris wrote:Perhaps just treat the version like a 4-byte enum with specific recognized values. No floats. Floating-point equality is a really tricky thing anyway when dealing with numbers that aren't exactly representable. Some compilers even throw warnings about using ==, <=, >= or != with floats.
Essentially that's how the esm_reader and my conditional treat it.
Post Reply