|
Boost : |
From: Jonathan Wakely (cow_at_[hidden])
Date: 2005-03-23 05:51:21
The attached patch fixes a 64 bit portability problem where
std::string::size_type is assigned to unsigned, which is shorter
than size_t on x86-64 and so will be truncated. This means the
following comparison to std::string::npos is always false.
Patch also prevents a warning with GCC; since the compiler doesn't
know that boost::throw_exception never returns it thinks that
cmdline::translate_property() can reach the end of the function without
returning. The patch simply removes the "else" so that throw_exception
is always called if control reaches the end of the function. A better
solution might be to mark boost::throw_exception() with
__attribute__((unused)) for GCC.
The first change is required, the second is optional.
jon
-- "More computing sins are committed in the name of efficiency (without necessarily achieving it) than for any other single reason - including blind stupidity." - W.A. Wulf
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk