[Gtkradiant] [Bug 1109] Wrong calculation of BEZIERCURVETREE_MAX_INDEX

bugzilla-daemon at zerowing.idsoftware.com bugzilla-daemon at zerowing.idsoftware.com
Tue Sep 12 06:53:32 CDT 2006


http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=1109





------- Additional Comments From spam at codecreator.net  2006-09-12 06:53 -------
Both (1 << ((sizeof(std::size_t) * 8) - 1)) and (((std::size_t) 1) << ((sizeof(std::size_t) * 8) - 1))
yield 2147483648 on 32 Bit systems and should do the same on 64 Bit archs.

Try replacing the expression with:
      std::numeric_limits<unsigned int>::max() / 2 + 1

(you have to include <limits>)
This constant should be the same on both systems (and looks alot more readable then
the crude bitshift thing)

-- 
Configure bugmail: http://zerowing.idsoftware.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the Gtkradiant mailing list