Fix UseUintMax definition used by wxAny for VC6.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 22 Oct 2009 11:18:02 +0000 (11:18 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 22 Oct 2009 11:18:02 +0000 (11:18 +0000)
commit982d7f931701e2d65182f798e9182139efd67ed7
tree64d085bf521b2c7e953b8d59f25eb6410cf0b1c4
parent17e48bcebf8f65df995d2bed81f73dcdf532f8eb
Fix UseUintMax definition used by wxAny for VC6.

The old code tried to work around the lack of unsigned __int64 to double
conversion in VC6 by casting from UseUintMax to wxAnyBaseIntType but this was
wrong as this value was -1 when cast to wxAnyBaseIntType (__int64) and so
UseUintMaxF was defined as -1.0.

Use a slightly uglier but simpler work around now: just define the constants
as macros instead of (typed) variables and let the compiler deal with literal
values on its own (which it does correctly).

This fixes the unit test failure: conversion from double to unsigned always
failed when using VC6.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62471 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/common/any.cpp